Commit Graph

4186 Commits

Author SHA1 Message Date
Gael Guennebaud
b20a55a608 Workaround wrong instanciation made by VS2010 2015-09-04 15:25:58 +02:00
Gael Guennebaud
ed265258e4 Fix returned index type of inner iterators of sparse blocks. 2015-09-03 15:07:35 +02:00
Gael Guennebaud
a835dfca73 InnerIterator::index() should really return a StorageIndex 2015-09-03 14:53:51 +02:00
Gael Guennebaud
941a99ac1a Add a few missing EIGEN_DEVICE_FUNC declarations 2015-09-03 14:14:54 +02:00
Doug Kwan
5c9ee73eb9 Implement plog and pexp for AltiVec. 2015-07-30 11:12:42 -07:00
Gael Guennebaud
5a1cc5d24c bug #1053: fix SuplerLU::solve with EIGEN_DEFAULT_TO_ROW_MAJOR 2015-09-03 11:25:36 +02:00
Gael Guennebaud
2795ffd6a0 Fix Index vs StorageIndex naming convention 2015-09-03 11:18:27 +02:00
Gael Guennebaud
ef2b54f422 Fix AMD ordering when a column has only one off-diagonal non-zero (also fix bug #1045) 2015-09-03 11:04:06 +02:00
Christoph Hertzberg
5ad7981f73 Use full packet size for Dynamic-sized objects (otherwise, the unalignedcount unit test fails with AVX enabled) 2015-09-02 22:51:43 +02:00
Gael Guennebaud
aa768add0b Since there is no reason for evaluators to be nested by reference, let's remove the evaluator<>::nestedType indirection. 2015-09-02 22:10:39 +02:00
Gael Guennebaud
f8976fdbe0 Make evaluators non-copyable. This guarantee that evaluators storing temporaries do not introduce unwanted copy overhead. 2015-09-02 21:39:49 +02:00
Gael Guennebaud
92b9f0e102 Cleaning pass on evaluators: remove the useless and error prone evaluator<>::type indirection. 2015-09-02 21:38:40 +02:00
Gael Guennebaud
6b99afa5ae Fix LSCG::solve with a sparse destination. 2015-09-02 15:34:03 +02:00
Gael Guennebaud
b5ad3d2cf7 Remove deprecated Flagged expression. 2015-09-02 14:53:50 +02:00
Gael Guennebaud
be5e2ecc21 bug #505: add more examples of bad and correct usages of auto and eval(). 2015-09-02 13:04:30 +02:00
Gael Guennebaud
a75616887e bug #1057: fix a declaration missmatch with MSVC 2015-09-02 09:31:32 +02:00
Gael Guennebaud
280f93ff65 Fix FullPivLU::image documentation 2015-09-02 09:19:27 +02:00
Gael Guennebaud
6059188f9d Simplify implementation of the evaluation's iterator of Sparse*Diagonal products to help the compiler to generate better code. 2015-09-01 22:34:30 +02:00
Gael Guennebaud
0b2412df50 Remove duplicated temporary in Sparse to Sparse assignment 2015-09-01 22:31:30 +02:00
Gael Guennebaud
9001f4a46b Add missing specialization of evaluator of sub-sparse-matrices that can be seen as a SparseCompressedBase. This changeset enable faster iterator for such expressions. 2015-09-01 22:29:17 +02:00
Benoit Steiner
2ed1495eec nvcc doesn't support std::min or std::max on GPU. Use our own custom implementation instead 2015-08-27 16:59:55 -07:00
Sergiu Dotenco
d4c24eb016 fixed Quaternion identity initialization for non-implicitly convertible types 2015-08-20 20:55:37 +02:00
Christoph Hertzberg
78358a7241 Fixed broken commit a09cfe650f
. Missing } and unprotected min/max calls and definitions.
2015-08-22 15:03:16 +02:00
Benoit Steiner
a09cfe650f std::numeric_limits doesn't work reliably on CUDA devices. Use our own definition of numeric_limit<T>::max() and numeric_limit<T>::min() instead of the stl ones. 2015-08-21 16:01:40 -07:00
Christoph Hertzberg
e5c78d85c8 bug #1043: Avoid integer conversion sign warning 2015-08-19 21:50:21 +02:00
Christoph Hertzberg
8097d8d028 surpress some warnings 2015-08-17 21:50:52 +02:00
Christoph Hertzberg
d2e0927127 Define EIGEN_MAX_STATIC_ALIGN_BYTES to 0 for architectures that don't require stack alignment 2015-08-17 16:44:52 +02:00
Gael Guennebaud
dc2c103b3b merge 2015-08-16 14:22:02 +02:00
Christoph Hertzberg
d6a4805fdf Protect further isnan/isfinite/isinf calls 2015-08-16 14:00:02 +02:00
Christoph Hertzberg
61e0977e10 Protect all calls to isnan, isinf and isfinite with parentheses. 2015-08-14 17:32:34 +02:00
Christoph Hertzberg
712e2fed17 bug #829: Introduce macro EIGEN_HAS_CXX11_CONTAINERS and do not specialize std-containers if it is enabled. 2015-08-14 16:09:48 +02:00
Gael Guennebaud
23aab82c0c merge 2015-08-09 21:24:20 +02:00
Christoph Hertzberg
cac6b23033 bug #1053: SparseLU failed with EIGEN_DEFAULT_TO_ROW_MAJOR 2015-08-07 23:10:56 +02:00
Gael Guennebaud
febcce34f1 Enable vectorization with half-packets 2015-08-07 20:05:31 +02:00
Gael Guennebaud
6245591349 Fix prototype of plset and generalize linspace functor. 2015-08-07 19:27:59 +02:00
Gael Guennebaud
60e4260d0d Some functors were not generic wrt packet-type. 2015-08-07 17:41:39 +02:00
Gael Guennebaud
e68c7b8368 Include SSE packetmath when AVX is enabled, and enable AVX's sine function only in fast-math mode (as SSE) 2015-08-07 17:40:39 +02:00
Gael Guennebaud
65bfa5fce7 Allow to use arbitrary packet-types during evaluation.
This is implemented by adding a PacketType template parameter to packet and writePacket members of evaluator<>.
2015-08-07 12:01:39 +02:00
Gael Guennebaud
3602926ed5 Mark ALignedBit as deprecated. 2015-08-07 10:45:02 +02:00
Gael Guennebaud
ce57dbd937 Let unpacket_traits<> exposes the required alignment and make use of it everywhere 2015-08-07 10:44:01 +02:00
Gael Guennebaud
2afdef6a54 Generalize first_aligned to take the requested alignment as a template parameter, and add a first_default_aligned variante calling first_aligned with the requirement of the largest packet for the given scalar type. 2015-08-06 17:52:01 +02:00
Gael Guennebaud
1f5024332e First part of a big refactoring of alignment control to enable the handling of arbitrarily aligned buffers. It includes:
- AlignedBit flag is deprecated. Alignment is now specified by the evaluator through the 'Alignment' enum, e.g., evaluator<Xpr>::Alignment. Its value is in Bytes.
 - Add several enums to specify alignment: Aligned8, Aligned16, Aligned32, Aligned64, Aligned128. AlignedMax corresponds to EIGEN_MAX_ALIGN_BYTES. Such enums are used to define the above Alignment value, and as the 'Options' template parameter of Map<> and Ref<>.
 - The Aligned enum is now deprecated. It is now an alias for Aligned16.
 - Currently, traits<Matrix<>>, traits<Array<>>, traits<Ref<>>, traits<Map<>>, and traits<Block<>> also expose the Alignment enum.
2015-08-06 15:31:07 +02:00
Gael Guennebaud
65186ef18d Fix logic in compute_default_alignment, extend it to Dynamic size, and move it to XprHelper.h file. 2015-08-06 14:07:59 +02:00
Gael Guennebaud
becd89df29 Enable runtime stack alignment in gemm_blocking_space. 2015-08-06 14:00:26 +02:00
Gael Guennebaud
d4f5efc51a Add a EIGEN_DEFAULT_ALIGN_BYTES macro defining default alignment for alloca and aligned_malloc.
It is defined as the max of EIGEN_IDEAL_MAX_ALIGN_BYTES and EIGEN_MAX_ALIGN_BYTES
2015-08-06 13:56:53 +02:00
Gael Guennebaud
506964fc29 Propagate precondition info to the iterative solver. 2015-08-04 16:13:34 +02:00
Gael Guennebaud
f7d5b9323d typo 2015-07-29 11:08:49 +02:00
Gael Guennebaud
175ed636ea bug #973: update macro-level control of alignement by introducing user-controllable EIGEN_MAX_ALIGN_BYTES and EIGEN_MAX_STATIC_ALIGN_BYTES macros. This changeset also removes EIGEN_ALIGN (replaced by EIGEN_MAX_ALIGN_BYTES>0), EIGEN_ALIGN_STATICALLY (replaced by EIGEN_MAX_STATIC_ALIGN_BYTES>0), EIGEN_USER_ALIGN*, EIGEN_ALIGN_DEFAULT (replaced by EIGEN_ALIGN_MAX). 2015-07-29 10:22:25 +02:00
Gael Guennebaud
76874b128e bug #1047: document the structure layout of class Matrix 2015-07-29 10:21:28 +02:00
Gael Guennebaud
41e1f3498c bug #1048: fix unused variable warning 2015-07-28 22:59:50 +02:00
Christoph Hertzberg
a44d022caf bug #792: SparseLU::factorize failed for structurally rank deficient matrices 2015-07-26 20:30:30 +02:00
Benoit Steiner
6d6e6d0b88 Define EIGEN_VECTORIZE_AVX2 and EIGEN_VECTORIZE_FMA when the corresponding instructions can be used by the compiler 2015-07-22 18:22:16 -07:00
Gael Guennebaud
3b0ad02c10 Remove wrongly pushed debugging statements 2015-07-22 14:33:57 +02:00
Jonas Adler
815fa0dbf6 Fixed some compiler bugs in NVCC, now compiles with CUDA.
(chtz: Manually joined sevaral commits to keep the history clean)
2015-07-22 12:29:18 +02:00
Benoit Steiner
d259b719d1 Made sure that the use const expressions are not enabled when compiling with nvcc even when gcc 4.9 is used as the host compiler. 2015-07-21 17:35:58 -07:00
Gael Guennebaud
586d10f7e0 Fix compilation of tri(sparse) * dense with OpenMP 2015-07-21 22:52:21 +02:00
Gael Guennebaud
6544b49e59 Generalize pow(x,e) such that x and e can be a different expression type or a scalar for either x or e. Add x.pow(e) with e an array expression. 2015-07-20 13:57:55 +02:00
Gael Guennebaud
c11971de37 Fix compilation of isnan(complex) 2015-07-20 12:56:01 +02:00
Gael Guennebaud
88e352adac Add support for replicate in CUDA 2015-07-20 10:53:03 +02:00
Benoit Steiner
513e357b48 Added support for prefetching on cuda devices 2015-07-17 15:35:16 -07:00
Benoit Steiner
06a22ca5bd Added support for sigmoid function to the tensor module 2015-07-17 09:29:00 -07:00
Benoit Steiner
979b73cebf Fixed a typo in Macro.h 2015-07-16 14:17:50 -07:00
Gael Guennebaud
f5aa640862 Clean some previous changes and more cuda fixes 2015-07-15 10:57:55 +02:00
Nicolas Mellado
7cecd39a84 Merged eigen/eigen into default 2015-07-15 10:15:54 +02:00
Nicolas Mellado
592ee2a4b4 Add missing EIGEN_DEVICE_FUNC 2015-07-15 10:14:52 +02:00
Christoph Hertzberg
ea87561564 bug #1039: Redefining EIGEN_DEFAULT_DENSE_INDEX_TYPE may lead to errors 2015-07-13 16:08:25 +02:00
Nicolas Mellado
dbb3e2cf8a Cleaning 2015-07-11 18:15:31 +00:00
Nicolas Mellado
0d09845562 Revert files to remove EIGEN_USING_NUMEXT_MATH 2015-07-11 20:11:36 +02:00
Nicolas Mellado
20b96025fd Replace double constants by Scalar constants 2015-07-11 20:02:30 +02:00
Nicolas Mellado
1dd6a329e8 Cuda compatibility: remove explicit call to std math functions 2015-07-11 19:40:15 +02:00
Nicolas Mellado
bc40eb745d Merged eigen/eigen into default 2015-07-11 19:33:43 +02:00
Benoit Steiner
6de6fa9483 Use NumTraits<T>::RequireInitialization instead of internal::is_arithmetic<T>::value to check whether it's possible to bypass the type constructor in the tensor code. 2015-07-07 15:23:56 -07:00
Benoit Steiner
7b7df7b6b8 Updated internal::is_arithmetic::value to be true for complex numbers 2015-07-07 12:57:35 -07:00
Gael Guennebaud
7fa6fe8d8c typo 2015-07-07 17:47:24 +02:00
Gael Guennebaud
fa17358c4b Rotation2D: fix slerp to take the shortest path, and add convenient method to get the angle in [-pi,pi] or [0,pi] 2015-07-07 17:27:12 +02:00
Nicolas Mellado
5359e5cdb2 Protect against compilation errors with nvcc and numext/complex.
Disable functions explicitely involving std::complex when compiling with nvcc.
Improve code compatilibity using the new macro EIGEN_USING_NUMEXT_MATH (same spirit than EIGEN_USING_STD_MATH but for numext functions)
2015-07-06 20:55:01 +02:00
Gael Guennebaud
c2019dfeb3 Merged in Emie/eigen (pull request PR-121)
typo correction in mathFunction
2015-07-06 16:48:54 +02:00
Emilie Guy
ea7113dd0c typo correction in mathFunction 2015-07-06 14:31:08 +02:00
Nicolas Mellado
9115896590 Merged eigen/eigen into default 2015-07-03 00:41:11 +02:00
Benoit Steiner
95ef94f1ee Fixed a typo in the patch 2015-07-02 07:06:55 +00:00
Benoit Steiner
44eedd8915 Marked the cast functions as EIGEN_DEVICE_FUNC to ensure that we can run casting on GPUs 2015-06-30 15:48:55 -07:00
Gael Guennebaud
c911fc8dee split compiler intensive bdcsvd_1 unit test 2015-06-26 16:14:23 +02:00
Gael Guennebaud
98ff17eb9e Add special path for matrix<complex>/real.
This also fixes underflow issues when scaling complex matrices through complex/complex operator.
2015-06-26 16:08:15 +02:00
Gael Guennebaud
e102ddbf1f bug #1026: fix infinite loop for an empty input 2015-06-26 14:02:52 +02:00
Gael Guennebaud
555b9c6843 Doc: explain perf and multithreading issues in sparse iterative solvers 2015-06-26 10:49:40 +02:00
Gael Guennebaud
53b930887d Enable OpenMP parallelization of row-major-sparse * dense products.
I observed significant speed-up of the CG solver.
2015-06-26 10:32:34 +02:00
Gael Guennebaud
7f824dd613 Optimize CG to enable faster spare row-major * dense vector products when the input matrix is complete (Upper|Lower) but column major. 2015-06-25 17:17:38 +02:00
Gael Guennebaud
33e699c9fe Remove redundant accessors in Reverse 2015-06-25 14:14:59 +02:00
Gael Guennebaud
973b0a90db Clarify documentation of the tolerance and error returned in iterative solvers 2015-06-25 13:51:13 +02:00
Gael Guennebaud
b4ab72678c bug #1000: MSVC 2013 does need the operator= workaround 2015-06-25 09:45:22 +02:00
Gael Guennebaud
788941d3b1 Workaround MSVC ambiguous instanciation 2015-06-24 23:35:17 +02:00
Gael Guennebaud
4c8cd13b35 Add explicit ctor for diagonal to sparse conversion 2015-06-24 18:11:06 +02:00
Gael Guennebaud
c38c195321 Document how cross behaves on complex numbers 2015-06-24 18:02:33 +02:00
Gael Guennebaud
62f21e2d11 Add support for sparse = diagonal 2015-06-24 17:55:00 +02:00
Gael Guennebaud
763c833637 Make SparseSelfAdjointView, twists, and SparseQR more evaluator friendly 2015-06-24 17:54:09 +02:00
Gael Guennebaud
36643eec0c Add a call_assignment_no_alias_no_transpose shortcut 2015-06-24 17:50:43 +02:00
Gael Guennebaud
02db7c9bc6 Inherit operator+= and -= with 'using' kkeyword 2015-06-24 17:49:20 +02:00
Gael Guennebaud
95e19be381 Fix compilation of MKL Pardiso support 2015-06-24 14:53:43 +02:00
Gael Guennebaud
b0d08869a9 Fix underflow in 3x3 tridiagonalization 2015-06-23 14:54:31 +02:00
Gael Guennebaud
71523a2e25 Fix a warning with icc 2015-06-23 14:20:20 +02:00
Gael Guennebaud
d9778f3391 Enable VML's pow wrapper on windows (the previous wrapper used the Fortran interface) 2015-06-23 14:04:50 +02:00
Gael Guennebaud
5f9630d7f9 bug #923: update support for Intel's VML wrt new evaluation mechanisms 2015-06-23 14:03:25 +02:00
Gael Guennebaud
793e4c6d77 bug #923: fix EIGEN_USE_BLAS mode 2015-06-23 11:13:24 +02:00
Gael Guennebaud
307c4fc292 Workaround missalignment produced by first_aligned for PacketSize==1 and size==1 2015-06-23 10:10:17 +02:00
Gael Guennebaud
bb3a9b4941 Use Ref<> to bypass forceAlignmentIf 2015-06-22 17:48:28 +02:00
Gael Guennebaud
476beed7f8 bug #1017: apply Christoph's patch preventing underflows in makeHouseholder 2015-06-22 16:51:45 +02:00
Gael Guennebaud
0848ba0a6e Fix return nullary return types: it must be based on the PlainObject type instead of the expression type. 2015-06-22 10:52:08 +02:00
Nicolas Mellado
ad5fdc7ddd Fix double to Scalar unwanted promotions 2015-06-21 20:21:23 +02:00
Gael Guennebaud
40821876ea Fix regression on CompressedStorage::operator= 2015-06-20 13:59:13 +02:00
Gael Guennebaud
84aaef93ba Merged in vanhoucke/eigen_vanhoucke (pull request PR-118)
Fix two small undefined behaviors caught by static analysis.
2015-06-20 13:56:48 +02:00
Gael Guennebaud
6b33b29f00 Get rid of must_nest_by_value 2015-06-19 18:12:40 +02:00
Gael Guennebaud
846b227bb7 Get rid of class internal::nested<> (still have to updated Tensor module) 2015-06-19 17:56:39 +02:00
vanhoucke
368ea23406 Fix undefined behavior. When resizing a default-constructed SparseArray, we end up calling memcpy(ptr, 0, 0), which is technically UB and gets caught by static analysis. 2015-06-19 15:53:30 +00:00
Gael Guennebaud
386d9e5ebd Fix usage of nested versus nested_eval 2015-06-19 17:42:27 +02:00
Gael Guennebaud
a5a7b68b76 Fix ambiguous instanciation using clean class-level SFINAE in product_evaluator 2015-06-19 17:25:13 +02:00
Gael Guennebaud
6fc5438205 Remove a few deprecated internal expressions 2015-06-19 17:06:12 +02:00
Gael Guennebaud
5c84dd5665 Fix permutation/transposiitons products wrt nested_eval 2015-06-19 16:37:04 +02:00
Gael Guennebaud
0c8b0e007b Introduce a AliasFreeProduct option for Permutations and Transpositions 2015-06-19 15:38:19 +02:00
Gael Guennebaud
3f6aa4cd5d Remove useless specializations of evaluator_traits 2015-06-19 14:18:29 +02:00
Gael Guennebaud
4a8888dfbc Improbe compatibility of Transpositions and evaluators 2015-06-19 14:10:44 +02:00
Gael Guennebaud
3af4c6c1c9 Make Transpositions use evaluators 2015-06-19 11:50:24 +02:00
Gael Guennebaud
82b6ac0864 Enforce eigenvectors to be column-major (for performance reasons) 2015-06-19 11:25:46 +02:00
Gael Guennebaud
fad36cc814 Clean implementation of permutation * matrix products. 2015-06-19 10:51:57 +02:00
Gael Guennebaud
06036d8bb1 Fix compilation of BDCSVD with DEFAULT_TO_ROWMAJOR 2015-06-19 10:37:25 +02:00
Gael Guennebaud
d2db15016b Fix storage order computation in traits<Product> 2015-06-19 10:36:38 +02:00
Gael Guennebaud
7baa1ba03e Remove the usage of result_of for DenseBase::redux as discussed in bug #1006 2015-06-15 22:40:18 +02:00
Gael Guennebaud
97cbe28829 Remove support of std::binder* in C++11 2015-06-15 15:34:05 +02:00
Gael Guennebaud
972a535288 Remove aligned-on-scalar assert and fallback to non vectorized path at runtime (first_aligned already had this runtime guard) 2015-06-14 15:04:07 +02:00
Gael Guennebaud
a546be56e0 typo 2015-06-15 15:08:51 +02:00
Gael Guennebaud
321a2cbe3d Add missing forward declaration of AlignedBox 2015-06-15 15:01:20 +02:00
Gael Guennebaud
91b64a9c65 Relax aligned-on-scalar assert as in the 3.2 branch 2015-06-12 11:25:57 +02:00
Gael Guennebaud
84d103bee8 Enable C++11 math function in a more conservative manner. 2015-06-11 21:45:02 +02:00
Gael Guennebaud
d93ba137f2 Introduce EIGEN_PI, get rid of M_PI and acos(-1.0) 2015-06-10 17:12:10 +02:00
Gael Guennebaud
9756c7fb4d Make more use of EIGEN_HAS_C99_MATH 2015-06-10 16:26:55 +02:00
Gael Guennebaud
93a62265dc fix isinf(complex(inf,NaN)) to return false. 2015-06-10 16:19:10 +02:00
Gael Guennebaud
b0d5aaafcc Rename free functions isFinite, isInf, isNaN to be compatible with c++11 2015-06-10 16:17:09 +02:00
Gael Guennebaud
25a98be948 bug #80: merge with d_hood branch on adding more coefficient-wise unary array functors 2015-06-10 15:52:05 +02:00
Gael Guennebaud
192bce2795 bug #890, add a more general routine to check that two dense object reference to the same data 2015-06-10 10:09:04 +02:00
Gael Guennebaud
0b2cbb2bdc bug #897: make umfpack support use Ref<> 2015-06-09 23:30:06 +02:00
Gael Guennebaud
feaf76c001 bug #910: add a StandardCompressedFormat option to Ref<SparseMatrix> to enforce standard compressed storage format.
If the input is not compressed, then this trigger a copy for a const Ref, and a runtime assert for non-const Ref.
2015-06-09 23:11:24 +02:00
Gael Guennebaud
f899aeb301 bug #650: fix sparse * dense wrt noalias and compound assignment 2015-06-09 18:33:24 +02:00
Gael Guennebaud
785b9c0127 bug #1003: assert in MapBase if the provided pointer is not aligned on scalar while it is expected to be. Also add a EIGEN_ALIGN8 macro. 2015-06-09 17:42:09 +02:00
Gael Guennebaud
4aba24a1b2 Clean argument names of some functions 2015-06-09 13:32:12 +02:00
Gael Guennebaud
302cf8ffe2 Add missing documentation for TriangularViewImpl<MatrixType,Mode,Sparse> 2015-06-09 11:40:07 +02:00
Gael Guennebaud
3a4299b245 bug #872: remove usage of deprecated bind1st. 2015-06-09 10:52:04 +02:00
Gael Guennebaud
9a2447b0c9 Fix shadow warnings triggered by clang 2015-06-09 09:11:12 +02:00
Gael Guennebaud
cd8b996f99 Extend unit test and documentation of SelfAdjointEigenSolver::computeDirect 2015-06-08 16:16:42 +02:00
Gael Guennebaud
8f031a3cee bug #997: add missing evaluators for m.lazyProduct(v.homogeneous()) 2015-06-08 15:43:41 +02:00
Gael Guennebaud
274b1f5d7e Fix homogeneous() for 1x1 matrix: in this case, homogeneous follows the storage order guaranteeing that v.transpose().homogeneous() == v.homogeneous().transpose() 2015-06-08 15:40:51 +02:00
Gael Guennebaud
cbe3a1a83e Add missing accessors for 1D index based access to Replicate<> expressions. 2015-06-08 15:39:09 +02:00