Commit Graph

702 Commits

Author SHA1 Message Date
Benoit Jacob
f22ade8ee4 restrict operator[] to vectors, not matrices. 2010-04-23 09:05:46 -04:00
Adolfo Rodriguez Tsouroukdissian
28dde19e40 - Added problem size constructor to decompositions that did not have one. It preallocates member data structures.
- Updated unit tests to check above constructor.
- In the compute() method of decompositions: Made temporary matrices/vectors class members to avoid heap allocations during compute() (when dynamic matrices are used, of course).

These  changes can speed up decomposition computation time when a solver instance is used to solve multiple same-sized problems. An added benefit is that the compute() method can now be invoked in contexts were heap allocations are forbidden, such as in real-time control loops.

CAVEAT: Not all of the decompositions in the Eigenvalues module have a heap-allocation-free compute() method. A future patch may address this issue, but some required API changes need to be incorporated first.
2010-04-21 17:15:57 +02:00
Benoit Jacob
34b14c48f3 shut up stupid gcc 4.5.0 warning 2010-04-18 22:14:03 -04:00
Hauke Heibel
214d5a892d Added support for STL lists with aligned Eigen types. 2010-04-18 20:10:43 +02:00
Benoit Jacob
d9ee28851e fix ei_blas_traits directaccess check: in the case of vectors, having a nontrivial inner stride is OK. 2010-04-16 14:12:53 -04:00
Benoit Jacob
04c663840b * add some 1x1 tests
* temporarily disable tests that strangely fail, with a big FIXME
2010-04-16 12:32:33 -04:00
Benoit Jacob
0ab431d7b8 * merge with mainline
* adapt Eigenvalues module to the new rule that the RowMajorBit must have the proper value for vectors
* Fix RowMajorBit in ei_traits<ProductBase>
* Fix vectorizability logic in CoeffBasedProduct
2010-04-16 11:25:50 -04:00
Benoit Jacob
ff6a46105d * Refactoring of the class hierarchy: introduction of DenseDirectAccessBase, removal of extra _Base/_Options template parameters.
* Introduction of strides-at-compile-time so for example the optimized code really knows when it needs to evaluate to a temporary
* StorageKind / XprKind
* Quaternion::setFromTwoVectors: use JacobiSVD instead of SVD
* ComplexSchur: support the 1x1 case
2010-04-16 10:13:32 -04:00
Gael Guennebaud
a2324d6265 fix sparse squared norm 2010-04-13 10:40:55 +02:00
Jitse Niesen
73d3a27667 RealSchur: Make sure zeros are really zero (cont'd); add default ctor, docs. 2010-04-12 18:14:32 +01:00
Jitse Niesen
a16a36ecf2 Add tests for real and complex Schur; extend test for Hessenberg.
Make a minor correction to the ComplexSchur class.
2010-04-02 14:32:20 +01:00
Manuel Yguel
89f2d5667f Add the possibility to use the polynomial solver of the gsl. 2010-03-25 03:25:47 +01:00
Benoit Jacob
92da574ec2 * allow matrix dimensions to be 0 (also at compile time) and provide a specialization
of ei_matrix_array for size 0
* adapt many xprs to have the right storage order, now that it matters
* add static assert on expressions to check that vector xprs
  have the righ storage order
* adapt ei_plain_matrix_type_(column|row)_major
* implement assignment of selfadjointview to matrix
  (was before failing to compile) and add nestedExpression() methods
* expand product_symm test
* in ei_gemv_selector, use the PlainObject type instead of a custom Matrix<...> type
* fix VectorBlock and Block mistakes
2010-03-21 11:28:03 -04:00
Jitse Niesen
d91ffffc37 Allow ComplexEigenSolver and ComplexSchur to work with real matrices.
Add a test which covers this case.
2010-03-20 17:04:40 +00:00
Benoit Jacob
b81351cb07 nomalloc: minor cleanup 2010-03-08 21:30:06 -05:00
Adolfo Rodriguez Tsouroukdissian
5a36f4a8d1 Propagate all five matrix template parameters to members and temporaries of decomposition classes. One particular advantage of this is that decomposing matrices with max sizes known at compile time will not allocate.
NOTE: The ComplexEigenSolver class currently _does_ allocate (line 135 of Eigenvalues/ComplexEigenSolver.h), but the reason appears to be in the implementation of matrix-matrix products, and not in the decomposition itself.
The nomalloc unit test has been extended to verify that decompositions do not allocate when max sizes are specified. There are currently two workarounds to prevent the test from failing (see comments in test/nomalloc.cpp), both of which are related to matrix products that allocate on the stack.
2010-03-08 19:31:27 +01:00
Mark Borgerding
101cc03176 merge 2010-03-07 23:46:26 -05:00
Gael Guennebaud
aeea00a9cf fix compilation 2010-03-07 12:32:24 +01:00
Gael Guennebaud
a7d199bf9a fix trsolve 2010-03-06 21:37:14 +01:00
Benoit Jacob
2bd31d3fbc * include Macros.h much earlier: since it takes care of the alignment platform detection, it is needed before we do the vectorization stuff in Eigen/Core !!
* kill EIGEN_DONT_ALIGN_HEAP option (one should use EIGEN_DONT_ALIGN)
* rename EIGEN_DONT_ALIGN_STACK to EIGEN_DONT_ALIGN_STATICALLY. hope it's a better name.
2010-03-06 09:05:15 -05:00
Benoit Jacob
f03d95348d introduce EIGEN_DONT_ALIGN_STACK (disables alignment attributes) and EIGEN_DONT_ALIGN_HEAP (disables aligned malloc)...
you can still use EIGEN_DONT_ALIGN to do both at once.
2010-03-06 02:17:37 -05:00
Gael Guennebaud
7dd81aad74 factorize default performance related settings to a single file
included after the architecture specific files such that they
can be adapted by each platform.
2010-03-03 18:47:58 +01:00
Konstantinos Margaritis
112c550b4a Added initial NEON support, most tests pass however we had to use some hackish workarounds
as gcc on ARM (both CodeSourcery 4.4.1 used and experimental 4.5) fail to
ensure proper alignment with __attribute__((aligned(16))). This has to be
fixed upstream to remove the workarounds.
2010-03-03 11:25:41 -06:00
Gael Guennebaud
c7828ac45c add missing implementation of uniform scaling products 2010-03-02 17:38:40 +01:00
Benoit Jacob
bca04bd983 fix compilation 2010-03-02 08:41:35 -05:00
Jitse Niesen
a1ac56a7c7 Add (failing) test for computing HouseholderQR of a 1x1 matrix. 2010-03-01 13:46:41 +00:00
Benoit Jacob
27f5250258 Only include <iosfwd> unless either EIGEN_DEBUG_ASSIGN is defined or we're in eigen2 support mode 2010-02-27 19:04:22 -05:00
Thomas Capricelli
e0830cb1b7 Use a specialization of test_is_equal() instead of defining COMPARE() 2010-02-27 17:56:22 +01:00
Thomas Capricelli
15a33622ac * define COMPARE(,), which prints expected/actual results in case of failure
* use it in test/NonLinearOptimization.cpp
2010-02-27 16:30:15 +01:00
Benoit Jacob
b1f666d007 Fix Map-with-Stride and cover it by new unit tests. 2010-02-26 20:12:51 -05:00
Benoit Jacob
32115bff1e * add VERIFY_IS_EQUAL, should compile faster and it's natural when no arithmetic is involved.
* rename 'submatrices' test to 'block'
* add block-inside-of-block tests
* remove old cruft
* split diagonal() tests into separate file
2010-02-26 09:03:13 -05:00
Benoit Jacob
b1c6c215a4 merge 2010-02-25 21:07:30 -05:00
Benoit Jacob
769641bc58 * Implement the ByOuterInner accessors
* use them (big simplification in Assign.h)
* axe (Inner|Outer)StrideAtCompileTime that were just introduced
* ei_int_if_dynamic now asserts that the size is the expected one: adapt to that in Block.h
* add rowStride() / colStride() in DenseBase
* implement innerStride() / outerStride() everywhere needed
2010-02-25 21:01:52 -05:00
Gael Guennebaud
959a1b5d63 detect and implement inplace permutations 2010-02-25 16:30:58 +01:00
Gael Guennebaud
d9ca0c0d36 optimize inverse permutations 2010-02-25 15:31:15 +01:00
Gael Guennebaud
7c98c04412 add reconstructedMatrix() to LLT, and LUs
=> they show that some improvements have still to be done
   for permutations, tr*tr, trapezoidal matrices
2010-02-24 19:16:10 +01:00
Gael Guennebaud
a7e4c0f825 make testsuite aware of EIGEN_CTEST_ARGS 2010-02-24 11:28:38 +01:00
Benoit Jacob
d92df336ad Further LU test improvements. I'm not aware of any test failures anymore, not even with huge numbers of repetitions.
Finally the createRandomMatrixOfRank() function is renamed to createRandomPIMatrixOfRank, where PI stands for 'partial isometry', that is, a matrix whose singular values are 0 or 1.
2010-02-23 15:40:24 -05:00
Benoit Jacob
7dc75380c1 * FullPivLU: replace "remaining==0" termination condition (from Golub) by a fuzzy compare
(fixes lu test failures when testing solve())
* LU test: set appropriate threshold and limit the number of times that a specially tricky test
  is run. (fixes lu test failures when testing rank()).
* Tests: rename createRandomMatrixOfRank to createRandomProjectionOfRank
2010-02-23 09:04:59 -05:00
Hauke Heibel
abc8c01080 Renamed PlainMatrixType to PlainObject (Array != Matrix).
Renamed ReturnByValue::ReturnMatrixType ReturnByValue::ReturnType (again, Array != Matrix).
2010-02-20 15:53:57 +01:00
Benoit Jacob
b73e22905d miserable half-working state, commiting to a fork just in case, just to perfect
my day, my hard disk would die.
Will write a more detailed commit message once it's working.
2010-02-18 20:42:38 -05:00
Gael Guennebaud
d00bff91ad workaround weird gcc 4.0.1 compilation error 2010-02-15 11:00:30 +01:00
Gael Guennebaud
a76950bdab fix a couple of ICE with gcc 4.0.1 2010-02-12 09:41:56 +01:00
Hauke Heibel
13ce92f5ba Fixed notemporary unit test. 2010-02-11 11:31:36 +01:00
Hauke Heibel
d0e8342a04 Fixed warning. 2010-02-10 18:00:36 +01:00
Manuel Yguel
71b64d3498 Updated tests for enhanced AlignedBox with volume, diagonal and better handling of integral types. 2010-01-20 14:55:10 +01:00
Gael Guennebaud
fe0827495a * move dummy_precision and epsilon to NumTraits
* make NumTraits inherits std::numeric_limits
2010-02-10 10:52:28 +01:00
Hauke Heibel
c11df02f0d Deactivated test which requires variadic macros. 2010-02-09 20:52:15 +01:00
Hauke Heibel
5da3049b80 Regression tests for number of nested temporaries.
Moved EIGEN_DEBUG_MATRIX_CTOR to ei_matrix_storage to capture resize related allocations.
2010-02-09 20:32:48 +01:00
Gael Guennebaud
71e580c4aa fix nesting in Arraywrapper and nesting_ops 2010-02-09 16:38:36 +01:00