Commit Graph

1278 Commits

Author SHA1 Message Date
Christoph Hertzberg
608733415a Free functions should only be declared as static in separate compilation units
(grafted from d85abc89c5
)
2014-12-12 12:01:03 +01:00
Christoph Hertzberg
e8cdbedefb bug #877, bug #572: Introduce a global Index typedef. Rename Sparse*::Index to StorageIndex, make Dense*::StorageIndex an alias to DenseIndex. Overall this commit gets rid of all Index conversion warnings. 2014-12-04 22:48:53 +01:00
Gael Guennebaud
6ccf97f3e6 Fix GL support wrt evaluators 2014-12-04 22:05:28 +01:00
Gael Guennebaud
5fc4ce6449 bug #876: remove usage of atanh2 in matrix power 2014-12-08 16:44:05 +01:00
Gael Guennebaud
77294047d6 bug #876, matrix_log_compute_2x2: directly use logp1 instead of atanh2 2014-12-08 16:28:06 +01:00
Gael Guennebaud
8efd9142b3 Merged in infinitei/eigen-opengl-fixes (pull request PR-90)
Adding missing OPENGL_LIBRARIES for openglsupport test.
2014-12-05 12:54:57 +01:00
Abhijit Kundu
48db34a7b9 Adding missing OPENGL_LIBRARIES for openglsupport test. Also adding OpenGL include directories as a better pratice even though these are system include directories in most systems. 2014-12-04 01:18:47 -05:00
Benoit Steiner
b33cf92878 Fixed the evaluation of expressions involving tensors of 2 or 3 elements on CUDA devices. 2014-11-18 14:32:41 -08:00
Benoit Steiner
1d3c8306f8 Fixed compilation errors with clang.
H: Enter commit message.  Lines beginning with 'HG:' are removed.
2014-11-13 19:13:17 -08:00
Benoit Steiner
ec785b0180 Added support for extraction of patches from images 2014-11-13 09:28:54 -08:00
Benoit Steiner
eeabf7975e Optimized broadcasting 2014-11-12 22:35:44 -08:00
Benoit Steiner
c2d1074932 Added support for static list of indices 2014-11-12 22:25:38 -08:00
Benoit Steiner
cb37f818ca Fixed a compilation error triggered by some operations on fixed sized tensors 2014-11-05 23:25:11 -08:00
Benoit Steiner
9a06a71627 Fixed a test 2014-11-05 07:49:51 -08:00
Benoit Steiner
9ea09179b5 Fixed the return type of the coefficient-wise tensor operations. 2014-11-04 10:24:42 -08:00
Benoit Steiner
b1789c112b Improved handling of 1d tensors 2014-11-03 08:51:33 -08:00
Benoit Steiner
7f2c6ed2fa Fixed a compilation warning 2014-10-31 11:45:21 -07:00
Benoit Steiner
85c3389b28 Fixed a test 2014-10-31 00:04:13 -07:00
Benoit Steiner
67fcf47ecb Merged from trunk 2014-10-30 21:59:22 -07:00
Benoit Steiner
fcecafde3a Fixed a compilation error with clang 2014-10-30 21:58:14 -07:00
Benoit Steiner
d62bfe73a9 Use the proper index type in the padding code 2014-10-30 18:15:05 -07:00
Benoit Steiner
bc99c5f7db fixed some potential alignment issues. 2014-10-30 18:09:53 -07:00
Benoit Steiner
5e62427e22 Use the proper index type 2014-10-30 17:49:39 -07:00
Gael Guennebaud
21c0a2ce0c Move D&C SVD to official SVD module. 2014-10-29 11:29:33 +01:00
Benoit Steiner
debc97821c Added support for tensor references 2014-10-28 23:10:13 -07:00
Benjamin Chrétien
c426054767 BDCSVD: fix CMake install (missing separator). 2014-10-24 15:10:56 +02:00
Christoph Hertzberg
1fa793cb97 Removed weird self assignment. 2014-10-24 13:19:19 +02:00
Gael Guennebaud
fe57b2f963 bug #701: workaround (min) and (max) blocking ADL by introducing numext::mini and numext::maxi internal functions and a EIGEN_NOT_A_MACRO macro. 2014-10-20 15:55:32 +02:00
Benoit Steiner
f786897e4b Added access to the unerlying raw data of a tnsor slice/chip whenever possible 2014-10-17 15:33:27 -07:00
Benoit Steiner
7acd38d19e Created some benchmarks for the tensor code 2014-10-17 09:49:03 -07:00
Gael Guennebaud
4b7c3abbea Fix D&C SVD wrt zero matrices 2014-10-17 15:32:55 +02:00
Benoit Steiner
65af852b54 Silenced one last warning 2014-10-16 15:02:30 -07:00
Benoit Steiner
ae697b471c Silenced a few compilation warnings
Generalized a TensorMap constructor
2014-10-16 14:52:50 -07:00
Benoit Steiner
94e47798f4 Fixed the return types of unary and binary expressions to properly handle the case where it is different from the input type (e.g. abs(complex<float>)) 2014-10-16 10:41:07 -07:00
Benoit Steiner
d853adffdb Avoid calling get_future() more than once on a given promise. 2014-10-16 10:10:04 -07:00
Benoit Steiner
bfdd9f3ac9 Made the blocking computation aware of the l3 cache
Also optimized the blocking parameters to take into account the number of threads used for a computation
2014-10-15 15:32:59 -07:00
Benoit Steiner
dba55041ab Added support for promises
Started to improve multithreaded contractions
2014-10-15 11:20:36 -07:00
Gael Guennebaud
2cc41dbe83 D&C SVD: fix some numerical issues by truly skipping deflated singular values when computing them 2014-10-15 15:21:12 +02:00
Gael Guennebaud
c26e8a1af3 D&C SVD: fix deflation of repeated singular values, fix sorting of singular values, fix case of complete deflation 2014-10-15 11:59:21 +02:00
Benoit Steiner
99d75235a9 Misc improvements and cleanups 2014-10-13 17:02:09 -07:00
Benoit Steiner
4c70b0a762 Added support for patch extraction 2014-10-13 10:04:04 -07:00
Benoit Steiner
0219f8aed4 Added ability to print a tensor using an iostream. 2014-10-10 16:17:26 -07:00
Benoit Steiner
2ed1838aeb Added support for tensor chips 2014-10-10 16:11:27 -07:00
Benoit Steiner
4b36c3591f Fixed the tensor shuffling test 2014-10-10 15:43:21 -07:00
Benoit Steiner
a991f94c0e Fixed the thread pool test 2014-10-10 15:20:37 -07:00
Benoit Steiner
498b7eed25 Rewrote the TensorBase::random method to support the generation of random number on gpu. 2014-10-09 15:39:13 -07:00
Benoit Steiner
767424af18 Improved the functors defined for standard reductions
Added a functor to encapsulate the generation of random numbers on cpu and gpu.
2014-10-09 15:36:23 -07:00
Gael Guennebaud
ccd70ba123 Various numerical fixes in D&C SVD: I cannot make it fail with double, but still need to tune for single precision, and carefully test with duplicated singular values 2014-10-09 23:29:01 +02:00
Benoit Steiner
44beee9d68 Removed dead code 2014-10-08 14:14:20 -07:00
Benoit Steiner
0a07ac574e Added support for the *= and /* operators to TensorBase 2014-10-08 13:32:41 -07:00
Benoit Steiner
6c047d398d Fixed a comment 2014-10-08 13:29:36 -07:00
Gael Guennebaud
118b1113d9 Workaround MSVC issue. 2014-10-07 09:53:39 +02:00
Gael Guennebaud
503c176d8e Fix missing outer() member in DynamicSparseMatrix 2014-10-07 09:53:27 +02:00
Gael Guennebaud
dbdd8b0883 D&C SVD: add scaling to avoid overflow, fix handling of fixed size matrices 2014-10-06 19:35:57 +02:00
Benoit Steiner
152f3218ac Improved contraction test 2014-10-03 19:33:44 -07:00
Benoit Steiner
af2e5995e2 Improved support for CUDA devices.
Improved contractions on GPU
2014-10-03 19:18:07 -07:00
Benoit Steiner
1269392822 Created the IndexPair type to store pair of tensor indices. CUDA doesn't support std::pair so we can't use them when targeting GPUs.
Improved the performance on tensor contractions
2014-10-03 10:16:59 -07:00
Benoit Steiner
b7271dffb5 Generalized the gebp apis 2014-10-02 16:51:57 -07:00
Benoit Steiner
8b2afe33a1 Fixes for the forced evaluation of tensor expressions
More tests
2014-10-02 10:39:36 -07:00
Benoit Steiner
5cc23199be More tests to validate the const-correctness of the tensor code. 2014-10-02 10:30:44 -07:00
Benoit Steiner
7caaf6453b Added support for tensor reductions and concatenations 2014-10-01 20:38:22 -07:00
Benoit Steiner
1c236f4c9a Added tests for tensors of const values and tensors of stringswwq:: 2014-10-01 20:21:42 -07:00
Christoph Hertzberg
6d26deb894 Missing outerStride in AlignedVector3 resulted in infinite recursion 2014-09-30 16:43:19 +02:00
Gael Guennebaud
842e31cf5c Let KroneckerProduct exploits the recently introduced generic InnerIterator class. 2014-09-29 13:37:49 +02:00
Georg Drenkhahn
8a502233d8 Correcting the ReturnType in traits<KroneckerProduct<>> to include the correct Index type.
Fixed mixup of types Rhs::Index and Lhs:Index in various loop variables.
Added explicit type conversion for arithmetic expressions which may return a wider type.
2014-09-21 23:19:29 +02:00
Georg Drenkhahn
3bd31e21b5 Fixed compiler warning on implicit integer conversion by separating index type for matrix and permutation matrix which may not be equal. 2014-09-20 15:00:36 +02:00
Georg Drenkhahn
75e269c77b Fixed warning on implicit integer conversion in test case code by using type VectorXd::Index instead of int. 2014-09-20 14:57:42 +02:00
Gael Guennebaud
abba11bdcf Many improvements in Divide&Conquer SVD:
- Fix many numerical issues, in particular regarding deflation.
- Add heavy debugging output to help track numerical issues (there are still fews)
- Make use of Eiegn's apply-inplane-rotation feature.
2014-09-22 15:22:52 +02:00
Gael Guennebaud
03dd4dd91a Unify unit test for BDC and Jacobi SVD. This reveals some numerical issues in BDCSVD. 2014-09-19 15:25:48 +02:00
Gael Guennebaud
e70506dd8f Fix inner-stride of AlignedVector3 2014-09-18 22:46:46 +02:00
Gael Guennebaud
2ae20d558b Update KroneckerProduct wrt evaluator changes 2014-09-18 22:08:49 +02:00
Gael Guennebaud
62bce6e5e6 Make MatrixFunction use nested_eval instead of nested 2014-09-18 17:31:17 +02:00
Gael Guennebaud
060e835ee9 Add evaluator for the experimental AlignedVector3 2014-09-18 17:30:21 +02:00
Gael Guennebaud
0ca43f7e9a Remove deprecated code not used by evaluators 2014-09-18 15:15:27 +02:00
Benoit Steiner
10a79ca3a3 Merged latest updates from the Eigen trunk. 2014-09-15 09:18:16 -07:00
Gael Guennebaud
749b56f6af merge with default branch 2014-09-14 17:34:54 +02:00
Benoit Steiner
efdff15749 Fixed a typo in the contraction code 2014-09-06 13:28:24 -07:00
Gael Guennebaud
dacd39ea76 Exploit sparse structure in naiveU and naiveV when updating them. 2014-09-05 17:51:46 +02:00
Benoit Steiner
74db22455a Misc fixes. 2014-09-05 07:47:43 -07:00
Benoit Steiner
1abe4ed14c Created more regression tests 2014-09-04 20:27:28 -07:00
Benoit Steiner
d43f737b4a Added support for evaluation of tensor shuffling operations as lvalues 2014-09-04 20:02:28 -07:00
Benoit Steiner
f50548e86a Added missing tensor copy constructors. As a result it is now possible to declare and initialize a tensor on the same line, as in:
Tensor<bla> T = A + B;  or
  Tensor<bla> T(A.reshape(new_shape));
2014-09-04 19:50:27 -07:00
Gael Guennebaud
15bad3670b Apply Householder U and V in-place. 2014-09-04 09:17:01 +02:00
Benoit Steiner
b24fe22b1a Improved the performance of the tensor convolution code by a factor of about 4. 2014-09-03 11:38:13 -07:00
Gael Guennebaud
c82dc227f1 Cleaning in BDCSVD (formating, handling of transpose case, remove some for loops) 2014-09-03 10:15:24 +02:00
Gael Guennebaud
a96f3d629c Clean bdcsvd 2014-09-02 22:30:23 +02:00
Gael Guennebaud
1f398dfc82 Factorize *SVD::solve to SVDBase 2014-09-01 18:31:54 +02:00
Gael Guennebaud
b3a0365429 merge with default branch 2014-09-01 18:21:01 +02:00
Gael Guennebaud
eb39296028 Reafctoring in D&C SVD unsupported module: clean and merge the SVDBase class to Eigen/SVD, rm copy/pasted JacobiSVD.h file 2014-09-01 18:16:20 +02:00
Gael Guennebaud
72c4f8ca8f Disable a few unit tests in unsupported 2014-09-01 17:35:58 +02:00
Gael Guennebaud
8754341848 Fix remaining garbage during a merge. 2014-09-01 17:25:13 +02:00
Gael Guennebaud
daad9585a3 Fix Kronecker product in legacy mode. 2014-09-01 17:24:07 +02:00
Gael Guennebaud
b051bbd64f Make unsupport sparse solvers use SparseSolverBase 2014-09-01 17:21:47 +02:00
Gael Guennebaud
b3d63b4db2 Add evaluator for DynamicSparseMatrix 2014-09-01 17:21:05 +02:00
Gael Guennebaud
124d12a915 merge default branch 2014-08-29 15:20:31 +02:00
Freddie Witherden
c3e4080474 Allow LevenbergMarquardt to work with non-standard types. 2014-08-27 15:24:51 +01:00
Benoit Steiner
2959045f2f Optimized the tensor padding code. 2014-08-26 09:47:18 -07:00
Benoit Steiner
36fffe48f7 Misc api improvements and cleanups 2014-08-23 14:35:41 -07:00
Benoit Steiner
fb5c1e9097 Optimized and cleaned up the tensor morphing code 2014-08-23 13:18:30 -07:00
Georg Drenkhahn
0ba490cf80 Fixed CMakeLists.txt files to prevent CMake 3.0.0 warnings about deprecated LOCATION target property.
Small whitespace cleanup in CMakelLists.txt.
2014-08-22 12:13:07 +02:00
Benoit Steiner
3d298da269 Added support for broadcasting 2014-08-20 17:00:50 -07:00
Benoit Steiner
9ac3c821ea Improved the speed of convolutions when running on cuda devices 2014-08-19 16:57:10 -07:00
Benoit Steiner
33c702c79f Added support for fast integer divisions by a constant
Sped up tensor slicing by a factor of 3 by using these fast integer divisions.
2014-08-14 22:13:21 -07:00
Benoit Steiner
756292f8aa Fixed compilation errors 2014-08-14 00:32:59 -07:00
Benoit Steiner
8c8db49331 Added a few regression tests 2014-08-14 00:25:22 -07:00
Benoit Steiner
eeb43f9e2b Added support for padding, stridding, and shuffling 2014-08-14 00:22:47 -07:00
Benoit Steiner
16047c8d4a Pulled in the latest changes from the Eigen trunk 2014-08-13 22:25:29 -07:00
Benoit Steiner
916ef48846 Added ability to get the nth element from an abstract array type. 2014-08-13 08:44:47 -07:00
Benoit Steiner
f1d8c13dbc Fixed misc typos. 2014-08-13 08:40:26 -07:00
Benoit Steiner
9faad2932f Added missing apis. 2014-08-13 08:36:33 -07:00
Benoit Steiner
f8fad09301 Updated the convolution and contraction evaluators to follow the new EvalSubExprsIfNeeded apu. 2014-08-13 08:33:18 -07:00
Benoit Steiner
72e7529708 Fixed a typo. 2014-08-13 08:29:40 -07:00
Benoit Steiner
1aa2bf8274 Support for in place evaluation of expressions containing slicing and reshaping operations 2014-08-13 08:27:58 -07:00
Benoit Steiner
b1892ab14d Added suppor for in place evaluation to simple tensor expressions.
Use mempy to speedup tensor copies whenever possible.
2014-08-13 08:26:44 -07:00
Benoit Steiner
439feca139 Reworked the TensorExecutor code to support in place evaluation. 2014-08-13 08:22:05 -07:00
Jitse Niesen
abb33258ce Doc: difference between array and matrix cosine etc (bug #830) 2014-09-06 14:59:44 +01:00
Gael Guennebaud
60314beb38 Update reference value for testNistLanczos1 test 2014-09-02 17:35:11 +02:00
Gael Guennebaud
280661e67d Remove LM::sqrt_() member function in favor of a shortcut for sqrt(epsilon()) 2014-09-02 17:29:06 +02:00
Gael Guennebaud
ff9bfc45f7 relax some LM unit tests 2014-09-02 17:10:17 +02:00
Kolja Brix
953ec08089 Correct GMRES:
* Fix error in calculation of residual at restart.
* Use relative residual as stopping criterion.
* Improve documentation.
2014-08-02 18:39:15 +02:00
Benoit Steiner
647622281e The tensor assignment code now resizes the destination tensor as needed. 2014-07-31 17:39:04 -07:00
Gael Guennebaud
d79516660c Make loadMarket use the sparse-matrix index type, thus enabling loading huge matrices. 2014-07-31 16:43:19 +02:00
Benoit Steiner
2116e261fb Made sure that the data stored in fixed sized tensor is aligned. 2014-07-25 09:47:59 -07:00
Jitse Niesen
5f3d542b8a Fix typo in MatrixExponential noticed by Markos. 2014-07-25 13:34:03 +01:00
Benoit Steiner
1f371e78e6 Added a few tests to validate the behavior of the assignment operator. 2014-07-22 10:32:40 -07:00
Benoit Steiner
f7bb7ee3f3 Fixed the assignment operator of the Tensor and TensorMap classes. 2014-07-22 10:31:21 -07:00
Gael Guennebaud
36e6c9064f bug #770: fix out of bounds access 2014-07-18 14:19:18 +02:00
Gael Guennebaud
5e72151ca5 bug #842: warn user about MPFR++ being under the GPL 2014-07-17 12:06:20 +02:00
Gael Guennebaud
2cd38a6634 merge 2014-07-17 12:01:55 +02:00
Gael Guennebaud
84ad8ce7e3 Fix bug #770: workaround thread safety in mpreal 2014-07-17 12:00:56 +02:00
Gael Guennebaud
40b74411e4 bug #842: update mpreal copy (fix compilation with clang) 2014-07-17 11:59:51 +02:00
Christoph Hertzberg
14c8793a70 Remove unnecessary <bench/BenchTimer.h>include 2014-07-17 11:14:14 +02:00
Gael Guennebaud
424c3ad266 bug #842: fix specialized product for mpreal 2014-07-17 09:41:33 +02:00
Hauke Heibel
5f1eedd655 Merged in complexzeros/eigen (pull request PR-69)
Added Spline interpolation with derivatives.
2014-07-11 12:03:10 +02:00
Benoit Steiner
40bb98e76a Added primitives to compare tensor dimensions 2014-07-10 11:29:51 -07:00
Benoit Steiner
9b7a6f0122 Added tests for tensor slicing 2014-07-10 11:27:27 -07:00
Benoit Steiner
ffd3654f67 Vectorized the evaluation of expressions involving tensor slices. 2014-07-10 11:09:46 -07:00
Jeff
b1169ce40c Fixed index that would cause crash with two point, two derivative interpolation. Added static_cast. 2014-07-10 12:03:42 -06:00
Kolja Brix
e955725ff1 Fix GMRES: Initialize essential Householder vector with correct dimension. Add check if initial guess is already a sufficient approximation. 2014-07-10 08:20:55 +02:00
Benoit Steiner
25b2f6624d Improved the speed of slicing operations. 2014-07-09 12:48:34 -07:00
Benoit Steiner
ea0906dfd8 Improved evaluation of tensor expressions when used as rvalues 2014-07-08 16:43:28 -07:00
Benoit Steiner
cc1bacea5b Improved the efficiency of the tensor evaluation code on thread pools and gpus. 2014-07-08 16:39:28 -07:00
Benoit Steiner
c285fda7f4 Extended the functionality of the TensorDeviceType classes 2014-07-08 16:30:48 -07:00
Gael Guennebaud
904509fbb6 Move using std::abs from Eigen's namespace to function scope. 2014-07-08 10:28:09 +02:00
Benoit Steiner
7d53633e05 Added support for tensor slicing 2014-07-07 14:10:36 -07:00
Benoit Steiner
bc072c5cba Added support for tensor slicing 2014-07-07 14:08:45 -07:00
Benoit Steiner
47981c5925 Added support for tensor slicing 2014-07-07 14:07:57 -07:00
Chen-Pang He
85777fc131 Mark internal namespace as \internal 2014-07-06 13:45:54 +08:00
Christoph Hertzberg
ef4a86d6b8 Fix trivial warnings in MPRealSupport 2014-07-18 16:39:58 +02:00
Gael Guennebaud
ac1bb3e5b3 bug #770: fix out of bounds access 2014-07-18 14:22:33 +02:00
Chen-Pang He
4860da2de1 Percent "Eigen" in dox to prevent linking if not referring to the Eigen namespace 2014-07-05 23:01:27 +08:00
Chen-Pang He
7a915f6846 Move Doxygen-only stuff to *.dox 2014-07-05 22:41:58 +08:00
Chen-Pang He
1a817d3b70 Document internal namespace 2014-07-05 21:50:05 +08:00
Chen-Pang He
8ee38d2db6 Fix dox for namespaces 2014-07-05 21:48:48 +08:00
Christoph Hertzberg
324e7e8fc9 Removed the deprecated EIGEN2_SUPPORT, as previously announced. A compilation error is raised, if this compile-switch is defined. The documentation references to the corresponding pages from Eigen3.2 now. Also, the Eigen2 testsuite has been removed. 2014-07-01 16:58:11 +02:00
Jeff
08c615f1e4 IndexArray is now a typename.
Changed interpolate with derivatives test to use VERIFY_IS_APPROX.
2014-06-25 19:02:57 -06:00
Jeff
f9496d341f Merged. 2014-06-23 20:24:31 -06:00
Jeff
e745a450de Removed tabs and fixed indentation. 2014-06-23 20:18:16 -06:00
Jeff
e86adc87e9 Fixed type mixing issues. 2014-06-23 19:52:42 -06:00
Jeff
b59f045c07 Using LU decomposition with complete pivoting for better accuracy. 2014-06-23 19:04:52 -06:00
Jeff
957c2c291b Changed uint to unsigned int. 2014-06-23 08:34:11 -06:00
Jeff
5dbbe6b400 Added Spline interpolation with derivatives. 2014-06-20 22:12:45 -06:00
Benoit Steiner
774c3c1e0a Created additional unit tests for the tensor code and improved existing ones. 2014-06-13 10:20:28 -07:00
Benoit Steiner
f80c8e17eb Silenced a compilation warning 2014-06-13 10:12:12 -07:00
Benoit Steiner
38ab7e6ed0 Reworked the expression evaluation mechanism in order to make it possible to efficiently compute convolutions and contractions in the future:
* The scheduling of computation is moved out the the assignment code and into a new TensorExecutor class
 * The assignment itself is now a regular node on the expression tree
 * The expression evaluators start by recursively evaluating all their subexpressions if needed
2014-06-13 09:56:51 -07:00
Benoit Steiner
aa664eabb9 Fixed a few compilation errors. 2014-06-10 10:31:29 -07:00
Benoit Steiner
4304c73542 Pulled latest updates from the Eigen main trunk. 2014-06-10 10:23:32 -07:00
Benoit Steiner
925fb6b937 TensorEval are now typed on the device: this will make it possible to use partial template specialization to optimize the strategy of each evaluator for each device type.
Started work on partial evaluations.
2014-06-10 09:14:44 -07:00
Benoit Steiner
a77458a8ff Fixes compilation errors triggered when compiling the tensor contraction code with cxx11 enabled. 2014-06-09 10:06:57 -07:00
Benoit Steiner
a669052f12 Improved support for rvalues in tensor expressions. 2014-06-09 09:45:30 -07:00
Benoit Steiner
36a2b2e9dc Prevent the generation of unlaunchable cuda kernels when compiling in debug mode. 2014-06-09 09:43:51 -07:00
Benoit Steiner
2859a31ac8 Fixed compilation error 2014-06-09 09:42:34 -07:00
Benoit Steiner
fe102248ac Fixed the threadpool test 2014-06-09 09:19:21 -07:00
Benoit Steiner
79085e08e9 Fixed a typo 2014-06-06 20:16:13 -07:00
Benoit Steiner
a961d72e65 Added support for convolution and reshaping of tensors. 2014-06-06 16:25:16 -07:00
Benoit Steiner
8998f4099e Created additional tests for the tensor code. 2014-06-05 10:49:34 -07:00
Christian Seiler
96cb58fa3b unsupported/TensorSymmetry: factor out completely from Tensor module
Remove the symCoeff() method of the the Tensor module and move the
functionality into a new operator() of the symmetry classes. This makes
the Tensor module now completely self-contained without symmetry
support (even though previously it was only a forward declaration and a
otherwise harmless trivial templated method) and also removes the
inconsistency with the rest of eigen w.r.t. the method's naming scheme.
2014-06-04 20:44:22 +02:00
Christian Seiler
ea99433523 unsupported/TensorSymmetry: make symgroup construction autodetect number of indices
When constructing a symmetry group, make the code automatically detect
the number of indices required from the indices of the group's
generators. Also, allow the symmetry group to be applied to lists of
indices that are larger than the number of indices of the symmetry
group.

Before:
SGroup<4, Symmetry<0, 1>, Symmetry<2,3>> group;
group.apply<SomeOp, int>(std::array<int,4>{{0, 1, 2, 3}}, 0);

After:
SGroup<Symmetry<0, 1>, Symmetry<2,3>> group;
group.apply<SomeOp, int>(std::array<int,4>{{0, 1, 2, 3}}, 0);
group.apply<SomeOp, int>(std::array<int,5>{{0, 1, 2, 3, 4}}, 0);

This should make the symmetry group easier to use - especially if one
wants to reuse the same symmetry group for different tensors of maybe
different rank.

static/runtime asserts remain for the case where the length of the
index list to which a symmetry group is to be applied is too small.
2014-06-04 20:27:42 +02:00
Christian Seiler
cee62018fc unsupported/CXX11/Core: allow gen_numeric_list to have a starting point
Add a template parameter to gen_numeric_list that acts as a starting
point for the list, i.e. gen_numeric_list<int, 5, 4> will generate a
numeric_list<int, 4, 5, 6, 7, 8>.
2014-06-04 19:54:22 +02:00
Christian Seiler
58cfac9a12 unsupported/ C++11 workarounds: don't use hack for libc++ if not required
libc++ from 3.4 onwards supports constexpr std::get, but only if
compiled with -std=c++1y. Change the detection so that libc++'s
internals are only used if either -std=c++1y is not specified or the
library is too old, making the whole hack a bit more future-proof.
2014-06-04 18:47:42 +02:00
Christian Seiler
45515779d3 Fix compilation for CXX11/Tensor module if unsupported is not in include path 2014-06-04 18:31:02 +02:00
Benoit Steiner
6fa6cdd2b9 Added support for tensor contractions
Updated expression evaluation mechanism to also compute the size of the tensor result
Misc fixes and improvements.
2014-06-04 09:21:48 -07:00
Benoit Steiner
736267cf6b Added support for additional tensor operations:
* comparison (<, <=, ==, !=, ...)
  * selection
  * nullary ops such as random or constant generation
  * misc unary ops such as log(), exp(), or a user defined unaryExpr()
Cleaned up the code a little.
2014-05-22 16:22:35 -07:00
Benoit Steiner
7402fea0a8 Vectorized the evaluation of tensor expression (using SSE, AVX, NEON, ...)
Added the ability to parallelize the evaluation of a tensor expression over multiple cpu cores.
Added the ability to offload the evaluation of a tensor expression to a GPU.
2014-05-16 15:08:05 -07:00
Benjamin Chrétien
c55c5763fe PolynomialSolver: fix typo. 2014-05-19 19:24:02 +02:00
Benjamin Chrétien
eda79321be PolynomialSolver: fix bugs related to linear polynomials. 2014-05-19 19:08:51 +02:00
Benjamin Chrétien
df92649379 PolynomialSolver: add missing constructors. 2014-05-19 18:40:29 +02:00
Benjamin Chrétien
0f94607947 PolynomialSolver: test template constructor in test suite. 2014-05-19 18:34:10 +02:00
Benjamin Chrétien
edebb15275 PolynomialSolver: add a test to reveal a bug. 2014-05-19 18:21:29 +02:00
Benoit Steiner
0320f7e3a7 Added support for fixed sized tensors.
Improved support for tensor expressions.
2014-05-06 11:18:37 -07:00
Benoit Steiner
c0f2cb016e Extended support for Tensors:
* Added ability to map a region of the memory to a tensor
  * Added basic support for unary and binary coefficient wise expressions, such as addition or square root
  * Provided an emulation layer to make it possible to compile the code with compilers (such as nvcc) that don't support cxx11.
2014-04-28 10:32:27 -07:00
Gael Guennebaud
20c840be15 Merged in benoitsteiner/eigen-fixes/nvcc_fixes (pull request PR-56)
Fixed a typo in CXX11Meta.h
2014-04-15 10:38:25 +02:00
Benoit Steiner
1afd50e0f3 Fixed a typo in CXX11Meta.h 2014-04-14 14:26:30 -07:00
Freddie Witherden
91288e9bf9 Add include LevenbergMarquardt in CMakeLists.txt.
This fixes bug #768.
2014-04-12 12:53:09 +01:00
Christoph Hertzberg
1cb8de1250 Make some actual verifications inside the autodiff unit test 2014-04-01 17:44:48 +02:00
Gael Guennebaud
1221dd90aa Fix no newline at end of file warning 2014-04-01 11:21:14 +02:00
giacomo po
3e42b775ea MINRES, bug #715: add support for zero rhs, and remove square test. 2014-03-17 16:33:52 -07:00
Bo Li
4fe56a0e02 fix Spline constructor 2014-03-15 08:42:20 +08:00
Gael Guennebaud
bd6eca059d Fix compilation of SPlines module 2014-02-17 10:00:38 +01:00
Gael Guennebaud
3bb57e21a8 Fix FFTW unit test with clang 2014-02-17 09:56:46 +01:00
Gael Guennebaud
3283d98d13 optimize sparse-sparse Kronecker product 2014-02-14 14:46:01 +01:00
Jitse Niesen
c1921ad3e2 Remove unused typedef in polynomialsolver test. 2014-02-08 20:31:35 +00:00
Naumov Maks
9e71ecbeec fix typo in evalSolverSugarFunction() 2014-02-08 10:40:51 +00:00
Hauke Heibel
e722f36ffa Fixed issue #734 (thanks to Philipp Büttgenbach for reporting the issue and proposing a fix).
Kept ColMajor layout if possible in order to keep derivatives of the same order adjacent in memory.
2014-02-01 20:49:48 +01:00
Christoph Hertzberg
febfc7b9b4 Fix bug #730: Path of OpenGL headers is different on MacOS 2014-01-29 22:05:39 +01:00
Anton Gladky
4cd4be97a7 Port unsupported constrained CG to Eigen3 2014-01-15 17:49:52 +01:00
Christian Seiler
f6bac196d5 C++11/Tensor: Fix copyright headers 2013-11-16 00:03:23 +01:00
Christian Seiler
03a956925a CXX11/TensorSymmetry: add symmetry support for Tensor class
Add a symCoeff() method to the Tensor class template that allows the
user of the class to set multiple elements of a tensor at once if they
are connected by a symmetry operation with respect to the tensor's
indices (symmetry/antisymmetry/hermiticity/antihermiticity under
echange of two indices and combination thereof for different pairs of
indices).

A compile-time resolution of the required symmetry groups via meta
templates is also implemented. For small enough groups this is used to
unroll the loop that goes through all the elements of the Tensor that
are connected by this group. For larger groups or groups where the
symmetries are defined at run time, a standard run-time implementation
of the same algorithm is provided.

For example, the following code completely initializes all elements of
the totally antisymmetric tensor in three dimensions ('epsilon
tensor'):

SGroup<3, AntiSymmetry<0,1>, AntiSymmetry<1,2>> sym;
Eigen::Tensor<double, 3> epsilon(3,3,3);
epsilon.setZero();
epsilon.symCoeff(sym, 0, 1, 2) =  1;
2013-11-14 23:35:11 +01:00
Christian Seiler
f97b3cd024 CXX11/Tensor: add simple initial tensor implementation
This commit adds an initial implementation of a class template Tensor
that allows for the storage of objects with more than two indices.
Currently, only storing data and setting the object to zero for POD
data types are implemented.
2013-11-14 22:52:37 +01:00
Christian Seiler
5e28c41549 C++11: add template metaprogramming helpers
Create a new directory CXX11 under unsupported/Eigen that contains code
that requires C++11. In that directory, add a few generic templates
useful for any module relying on C++11. These templates may be included
with #include <[unsupported/]Eigen/CXX11/Core>. At the moment, this
will only provide templates in the Eigen::internal namespace.
2013-11-14 22:27:06 +01:00
Christoph Hertzberg
ae83f5ede9 Fixed bug #702 and added unit test.
Thanks to Alexander Werner for the report.
2013-11-07 18:32:24 +01:00
Gael Guennebaud
5974685866 Fix parenthesis min/max issue in mpreal 2013-10-29 17:43:21 +01:00
Desire NUENTSA
4bb1c48f25 Add a block sparse matrix class. tests to be added 2013-09-20 18:54:17 +02:00
Gael Guennebaud
ed78a76161 Merged in advanpix/eigen-mp-devs (pull request PR-32)
Fixes for SparseMatrix to support non-POD scalar types
2013-09-03 22:05:14 +02:00
Jitse Niesen
16cbd3d72d BDCSVD: Use rational interpolation to solve secular equation.
Algorithm is rather ad-hoc and falls back on bisection if required.
2013-08-27 15:30:11 +01:00
Hauke Heibel
86daf2f75c Added missing inline statements in order to prevent linker errors. 2013-08-27 15:41:18 +02:00
Pavel Holoborodko
d2c4f4ab21 Updated mpfr::mpreal. Move semantic support, RVO, other new features 2013-08-26 00:22:18 +09:00
Jitse Niesen
d1c48f1606 BDCSVD: Use HouseholderSeq directly. 2013-08-21 14:34:48 +01:00
Jitse Niesen
403be74861 BDCSVD: Compute SVD of combined problem directly.
First step at implementing final stage in BDCSVD algorithm.
Uses bisection method to solve nonlinear equation.
Still lots of room for optimization.
2013-08-20 14:10:55 +01:00
Gael Guennebaud
916d29e58f Backout parts of changeset 6719e56b5b
(these changes were not intended to be commited)
2013-08-11 19:26:41 +02:00
Gael Guennebaud
6719e56b5b Ref<> objects must be nested by reference because they potentially store a temporary object 2013-08-11 17:52:43 +02:00
Jitse Niesen
306ce33e1c BDCSVD: Streamline compute() and copyUV() 2013-08-07 16:34:34 +01:00
Hauke Heibel
8f4d93a4b7 Fix compilation.
The Matrix is required to be mutable but it also needs to be a reference and
temporaries do not bind to non-const references - thus we need a hack and
cast away the constness.
2013-08-02 22:40:36 +02:00
Hauke Heibel
51b361b3bb Ensure that (potentially aligned) stack objects are passed by reference. 2013-08-02 21:07:39 +02:00
Jitse Niesen
68168e9eae MatrixFunctions: replace eval() by nested.
This eliminates an unnecessary copy in some situations, e.g. Map.
2013-07-31 14:57:20 +01:00
Hauke Heibel
9ef3645cc7 Removed 'T' prefix from types and thus fixed compilation for GCC. 2013-07-29 12:08:50 +02:00
Jitse Niesen
70131120ab Fix bug in MatrixFunctions for matrices with multiple eigenvalues.
Store indices, not eigenvalues, in clusters.
Bug was introduced in changeset a3a55357db
.
2013-07-26 15:39:18 +01:00
Jitse Niesen
6d86cd7224 merge 2013-07-26 14:30:28 +01:00
Hauke Heibel
75dab1ce5e Fixed floating point warning.
Fixed evaluation of matrix_exp_computeUV.
2013-07-26 15:13:54 +02:00
Jitse Niesen
e43934d60f MatrixFunctions: Clean up StemFunction.h 2013-07-26 13:51:10 +01:00
Hauke Heibel
75edc7cc8b Fixed VC11 compilation.
The typedefs Lhs/Rhs in the base class are now accessible by derived classes.
2013-07-26 11:05:21 +02:00
Jitse Niesen
a3a55357db Clean up MatrixFunction and MatrixLogarithm. 2013-07-25 15:08:53 +01:00
Jitse Niesen
084dc63b4c Clean-up of MatrixSquareRoot. 2013-07-22 13:56:15 +01:00
Jitse Niesen
463343fb37 Clean-up of MatrixExponential:
* put internal stuff in the internal namespace
* replace member functions by free functions
2013-07-21 21:31:15 +01:00
Jitse Niesen
5879937f58 Merge in jdh8's branch.
* Enable singular matrix power and complex exponents.
* Eliminate unnecessary copying for sparse Kronecker product.
2013-07-21 20:50:15 +01:00
Chen-Pang He
01190b3544 Directly code failing example, or it breaks make doc. 2013-07-21 18:09:11 +08:00
Chen-Pang He
c00f688c64 Fix doc. (It is also used by computeFracPower) 2013-07-21 05:40:56 +08:00
Chen-Pang He
51573da3a4 Warn about power of a matrix with non-semisimple 0 eigenvalue. 2013-07-21 01:00:36 +08:00
Chen-Pang He
1191949e87 Improve documentation on Kronecker product module. 2013-07-21 00:19:46 +08:00
Chen-Pang He
3d94ed9fa0 Document on MatrixExponential::ScalingOp 2013-07-21 00:18:19 +08:00
Chen-Pang He
ede27f5780 Apply argument-dependent lookup on user-defined types. (using std::) 2013-07-20 23:30:37 +08:00
Chen-Pang He
dda869051d Optimize MatrixPower::computeIntPower 2013-07-20 18:47:54 +08:00
Chen-Pang He
2320073e41 Comment on private members of MatrixPower. 2013-07-20 17:58:12 +08:00
Chen-Pang He
c587e63631 Simplify MatrixPower::split 2013-07-20 17:49:38 +08:00
Gael Guennebaud
e3774e93b7 Fix vompilation of bdcsvd with ICC. 2013-07-17 09:20:30 +02:00
Gael Guennebaud
c76990664b Add bdcsvd unit test in CMakeLists 2013-07-15 21:16:57 +02:00
Chen-Pang He
4b780553e0 Eliminate unnecessary copying for sparse Kronecker product. 2013-07-15 09:10:17 +08:00
Chen-Pang He
9be658f701 generateTestMatrix can use processTriangularMatrix 2013-07-15 00:43:14 +08:00
Chen-Pang He
b8f0364a1c Test singular matrix power with square roots. Exponent laws are too unstable. 2013-07-15 00:10:17 +08:00
Chen-Pang He
cbe92de2b5 Fix typo in testSingular. 2013-07-14 17:27:44 +08:00
Chen-Pang He
eeb744dc8d Add test3dRotation. 2013-07-14 02:00:50 +08:00
Chen-Pang He
d5501d3a90 Document on MatrixPowerAtomic. 2013-07-13 23:13:07 +08:00
Chen-Pang He
3c423ccfe2 Document on complex matrix power. 2013-07-13 22:12:09 +08:00
Chen-Pang He
738d75d3eb Document on the return type of MatrixPower::operator() 2013-07-13 22:11:36 +08:00
Gael Guennebaud
6d1f5dbaae Add no_assignment_operator to a few classes that must not be assigned, and fix a couple of warnings. 2013-07-10 23:48:26 +02:00
Chen-Pang He
a992fa74eb Make non-conversion unary constructors explicit. 2013-07-11 02:31:13 +08:00
Chen-Pang He
4466875d54 The only(?) way to test complex matrix power. 2013-07-10 02:59:16 +08:00
Chen-Pang He
5c95892b83 Test power of singular matrices. 2013-07-10 02:57:54 +08:00
Chen-Pang He
639d03d900 These casts are unnecessary because isApprox already casts them. 2013-07-10 02:53:15 +08:00
Chen-Pang He
d204bb57d0 Remove unused struct definition in test. 2013-07-10 02:48:17 +08:00
Chen-Pang He
c52cbd9de9 Write doc for positive power of a matrix with a semisimple zero eigenvalue. 2013-07-10 02:44:38 +08:00
Chen-Pang He
159a3bed9e Write doc for complex power of a matrix. 2013-07-10 02:43:10 +08:00
Chen-Pang He
25544dbec3 Add assertion against undefined matrix power. 2013-07-10 02:36:34 +08:00
Chen-Pang He
00e30a5fc4 We need not prohibit assignment here. Thanks to changeset 3edd4681f2
.
2013-07-07 19:57:23 +08:00
Chen-Pang He
55ec3cc6d5 Prevent copying with internal::noncopyable. 2013-07-07 19:34:13 +08:00
Chen-Pang He
9e2b4eeac0 Const-correct the scaling functor. 2013-07-05 23:28:57 +08:00
Chen-Pang He
c273a6c37c Avoid pow(Scalar, int) for C++11 conformance. 2013-07-05 03:33:56 +08:00
Chen-Pang He
04a9ad6e10 Let complex power fall back to "log, scale, exp". 2013-07-05 00:28:28 +08:00
Chen-Pang He
cce68d4e91 Remove unused inclusions. 2013-07-04 18:39:33 +08:00
Chen-Pang He
75b3391e3f Enable singular matrix power using unitary similarities. 2013-07-04 18:37:46 +08:00
Chen-Pang He
3cda1deb52 Simplify class hierarchy. 2013-07-04 05:10:43 +08:00
Chen-Pang He
eaf92ef48c Remove unreachable MatrixPowerTriangular, paving the way to future cleanups. 2013-07-04 04:42:02 +08:00
Chen-Pang He
7b6e94fb58 Clean namespace pollution. 2013-06-25 02:56:30 +08:00
Chen-Pang He
b9543ce237 Matrix square root can process 0 eigenvalue. 2013-06-24 23:57:57 +08:00
Chen-Pang He
b9fc9d8f32 Remove mat.pow * vec specialization, which causes segfault for mat.pow * mat.pow 2013-06-24 23:56:17 +08:00
Chen-Pang He
ee8a28fb85 Fix segfault and bug with equal eivals in matrix power (bug #614). 2013-06-24 13:58:51 +01:00
Gael Guennebaud
dd964ec08c Fix a couple of warnings 2013-06-21 19:06:45 +02:00
Gael Guennebaud
cf5c5ed725 Fix warning typedef XXX locally defined but not used 2013-06-21 09:27:38 +02:00
Gauthier Brun
8105b5ed3f new unsupported and not finished SVD, using a divide and conquert algorithm, with tests and benchmark 2013-06-19 00:03:27 +02:00
Kolja Brix
05da15bf40 bug #230, fix compilation issues and wrong static assertions 2013-06-18 09:44:40 +02:00
Gael Guennebaud
f6c1841316 compilation fixes in unsupported 2013-06-12 12:52:41 +02:00
Gael Guennebaud
62670c83a0 Fix bug #314: move remaining math functions from internal to numext namespace 2013-06-10 23:40:56 +02:00
Thomas Capricelli
62e337eb01 fix a weird typo I commited in ae76c97704
(Nov 10th, 2009)
2013-06-03 23:09:33 +02:00
Desire NUENTSA
cf939f154f Fix bug #596 : Recover plain SparseMatrix from SparseQR matrixQ() 2013-05-21 17:35:10 +02:00
Gael Guennebaud
9816e8532e Fix bug #482: pass scalar value by const reference (it remained a few cases) 2013-04-12 15:26:55 +02:00
Gael Guennebaud
899c0c2b6c Clean source code and unit tests with respect to -Wunused-local-typedefs 2013-04-10 22:27:35 +02:00
Gael Guennebaud
225fd0f579 adapt AutoDiff to scalar_product_traits 2013-03-20 21:20:13 +01:00
Desire NUENTSA
f350f34560 Add complex support to dgmres and the unit test 2013-03-20 18:38:22 +01:00
Desire NUENTSA
da6219b19d Bug567 : Fix iterative solvers to immediately return when the initial guess is the true solution and for trivial solution 2013-03-20 16:15:18 +01:00
Desire NUENTSA
4107b371e3 Handle zero right hand side in CG and GMRES 2013-03-20 11:22:45 +01:00
Gael Guennebaud
9bfeeba1c5 Add Official/Unsupported labels to unit tests and add a ctest driver to submit subprojects to cdash 2013-03-20 08:40:13 +01:00
Christoph Hertzberg
6357fd68da Patch by Kolja Brix <brix@igpm.rwth-aachen.de> that fixes bug #565 and adds a testcase to verify that. 2013-03-17 13:55:31 +01:00
Jitse Niesen
79f93247c5 Relax tolerances in matrix_power tests to avoid intermittent failures. 2013-03-09 17:20:16 +00:00
Gael Guennebaud
03373f41cb Fix bug #561: remove useless sign macro 2013-03-07 23:35:26 +01:00
Gael Guennebaud
b9fe79153b Fix a couple of remaining warnings (missing newlines, inline-noinline, meaningless type qualifiers) 2013-03-01 14:42:36 +01:00
Gael Guennebaud
87142237b5 Fix "missing return statement at end of non-void function" 2013-03-01 14:33:11 +01:00
Gael Guennebaud
210a56ff48 Update to latest mpreal. 2013-03-01 14:31:11 +01:00
Gael Guennebaud
1bb1945078 Fix "explicit instantiation of 'Eigen::Spline' must occur in namespace 'Eigen'" warnings 2013-02-28 20:22:26 +01:00
Hauke Heibel
83aac6d54c MSVC fix; the compiler failed to detect the correct overload. 2013-02-28 11:38:34 +01:00
Gael Guennebaud
bd8c9c69e4 Protect min with parenthesis in IncompleteLLT 2013-02-22 14:41:32 +01:00