ab4046970b
* Add fixed-size template versions of corner(), start(), end(). * Use them to write an unrolled path in echelon.cpp, as an experiment before I do this LU module. * For floating-point types, make ei_random() use an amplitude of 1.
Benoit Jacob
2008-04-12 17:37:27 +00:00
dcebc46cdc
- cleaner use of OpenMP (no code duplication anymore) using a macro and _Pragma. - use OpenMP also in cacheOptimalProduct and in the vectorized paths as well - kill the vector assignment unroller. implement in operator= the logic for assigning a row-vector in a col-vector. - CMakeLists support for building tests/examples with -fopenmp and/or -msse2 - updates in bench/, especially replace identity() by ones() which prevents underflows from perturbing bench results.
Benoit Jacob
2008-04-11 14:28:42 +00:00
7bee90a62a
Merge Gael's experimental OpenMP parallelization support into Assign.h.
Benoit Jacob
2008-04-11 08:18:47 +00:00
187b1543ce
added a vectorized version of Product::_cacheOptimalProduct, added the possibility to disable the vectorization using EIGEN_DONT_VECTORIZE (some architectures has SSE support by default)
Gael Guennebaud
2008-04-10 12:34:22 +00:00
613c49b475
* add typedefs for matrices/vectors with LargeBit * add -pedantic to CXXFLAGS * cleanup intricated expressions with && and || which gave warnings because of "missing" parentheses * fix compile error in NumTraits, apparently discovered by -pedantic
Benoit Jacob
2008-04-10 10:33:50 +00:00
ca448d2537
split those files in util/ some more renaming
Benoit Jacob
2008-04-10 09:41:13 +00:00
9d8876ce82
* rename XprCopy -> Nested * rename OperatorEquals -> Assign * move Util.h and FwDecl.h to a util/ subdir
Benoit Jacob
2008-04-10 09:01:28 +00:00
212da8ffe0
fix priority operator bugs in the computation of the VectorizableBit flag, now benchmark.cpp is properly vectorized
Gael Guennebaud
2008-04-09 18:24:13 +00:00
8f957564ec
a better bugfix in ei_matrix_operator_equals_packet_unroller
Gael Guennebaud
2008-04-09 18:04:26 +00:00
d95d952e92
bugfix in ei_matrix_operator_equals_packet_unroller
Gael Guennebaud
2008-04-09 17:44:59 +00:00
1985fb0551
Added initial experimental support for explicit vectorization. Currently only the following platform/operations are supported: - SSE2 compatible architecture - compiler compatible with intel's SSE2 intrinsics - float, double and int data types - fixed size matrices with a storage major dimension multiple of 4 (or 2 for double) - scalar-matrix product, component wise: +,-,*,min,max - matrix-matrix product only if the left matrix is vectorizable and column major or the right matrix is vectorizable and row major, e.g.: a.transpose() * b is not vectorized with the default column major storage. To use it you must define EIGEN_VECTORIZE and EIGEN_INTEL_PLATFORM.
Gael Guennebaud
2008-04-09 12:31:55 +00:00
4920f2011e
finish making use of CoeffReadCost and the new XprCopy everywhere seems appropriate to me.
Benoit Jacob
2008-04-08 14:15:01 +00:00
371d302efb
- merge ei_xpr_copy and ei_eval_if_needed_before_nesting - make use of CoeffReadCost to determine when to unroll the loops, for now only in Product.h and in OperatorEquals.h performance remains the same: generally still not as good as before the big changes.
Benoit Jacob
2008-04-06 18:01:03 +00:00
30ec34de36
fix compilation (finish removal of EIGEN_UNROLLED_LOOPS)
Benoit Jacob
2008-04-05 14:20:30 +00:00
61e58cf602
fixes as discussed with Gael on IRC. Mainly, in Fuzzy.h, and Dot.h, use ei_xpr_copy to evaluate args when needed. Had to introduce an ugly trick with ei_unref as when the XprCopy type is a reference one can't directly access member typedefs such as Scalar.
Benoit Jacob
2008-04-05 14:15:02 +00:00
b4a156671f
* make use of the EvalBeforeNestingBit and EvalBeforeAssigningBit in ei_xpr_copy and operator=, respectively. * added Matrix::lazyAssign() when EvalBeforeAssigningBit must be skipped (mainly internal use only) * all expressions are now stored by const reference * added Temporary xpr: .temporary() must be called on any temporary expression not directly returned by a function (mainly internal use only) * moved all functors in the Functors.h header * added some preliminaries stuff for the explicit vectorization
Gael Guennebaud
2008-04-05 11:10:54 +00:00
048910caae
* added cwise comparisons * added "all" and "any" special redux operators * added support bool matrices * added support for cost model of STL functors via ei_functor_traits (By default ei_functor_traits query the functor member Cost)
Gael Guennebaud
2008-04-03 18:13:27 +00:00
249dc4f482
current state of the mess. One line fails in the tests, and useless copies are made when evaluating nested expressions. Changes: - kill LazyBit, introduce EvalBeforeNestingBit and EvalBeforeAssigningBit - product and random don't evaluate immediately anymore - eval() always evaluates - change the value of Dynamic to some large positive value, in preparation of future simplifications
Benoit Jacob
2008-04-03 16:54:19 +00:00
b8900d0b80
More clever evaluation of arguments: now it occurs in earlier, in operator*, before the Product<> type is constructed. This resets template depth on each intermediate evaluation, and gives simpler code. Introducing ei_eval_if_expensive<Derived, n> which evaluates Derived if it's worth it given that each of its coeffs will be accessed n times. Operator* uses this with adequate values of n to evaluate args exactly when needed.
Benoit Jacob
2008-04-03 14:17:56 +00:00
4448f2620d
fix a compilation issue with gcc-3.3 and ei_result_of
Gael Guennebaud
2008-04-03 12:39:39 +00:00
d1a29d6319
-new: recursive costs system, useful to determine automatically when to evaluate arguments and when to meta-unroll. -use it in Product to determine when to eval args. not yet used to determine when to unroll. for now, not used anywhere else but that'll follow. -fix badness of my last commit
Benoit Jacob
2008-04-03 11:10:17 +00:00
e74fbfb2bc
- remove Eval/EvalOMP (moving them to a disabled/ subdir in order to preserve SVN history). They are made useless by the new ei_eval_unless_lazy. - introduce a generic Eval member typedef so one can do e.g. T t; U u; Product<T, U>::Eval m; m = t*u;
Benoit Jacob
2008-03-31 17:24:09 +00:00
cff5e3ce9c
Make use of the LazyBit, introduce .lazy(), remove lazyProduct.
Benoit Jacob
2008-03-31 16:20:06 +00:00
f279162ec4
* introducte recursive Flags system for the expressions -- currently 3 flags: RowMajor, Lazy and Large -- only RowMajor actually used for now * many minor improvements
Benoit Jacob
2008-03-30 18:43:22 +00:00
758b26551a
* fix compilation with gcc-4.0 which doesn't like "using" too much * add Eigen:: in some macros to allow using them from outside of namespace Eigen Problems and solutions communicated by Gael.
Benoit Jacob
2008-03-29 16:48:04 +00:00
c9b0dcd733
look at that subtle difference in Product.h... the cacheOptimal is only good for large enough matrices. When taking a block in a fixed-size (hence small) matrix, the SizeAtCompileTime is Dynamic hence that's not a good indicator. This example shows that the good indicator is MaxSizeAtCompileTime. Result: +10% speed in echelon.cpp
Benoit Jacob
2008-03-26 09:29:29 +00:00
a994e51c96
* add Gael copyright lines on 2 more files * macro renaming: EIGEN_NDEBUG becomes EIGEN_NO_DEBUG as this is much better (and similar to Qt) and EIGEN_CUSTOM_ASSERT becomes EIGEN_USE_CUSTOM_ASSERT * protect Core header by a EIGEN_CORE_H
Benoit Jacob
2008-03-26 09:13:11 +00:00
729618c945
* #define EIGEN_NDEBUG now also disables asserts. Useful to disable eigen's asserts without disabling one's own program's asserts. Notice that Eigen code should now use ei_assert() instead of assert(). * Remove findBiggestCoeff() as it's now almost redundant. * Improve echelon.cpp: inner for loop replaced by xprs. * remove useless "(*this)." here and there. I think they were first introduced by automatic search&replace. * fix compilation in Visitor.h (issue triggered by echelon.cpp) * improve comment on swap().
Benoit Jacob
2008-03-26 08:48:04 +00:00
4342f024d9
* support for matrix-scalar quotient with integer scalar types. * added cache efficient matrix-matrix product. - provides a huge speed-up for large matrices. - currently it is enabled when an explicit unrolling is not possible.
Gael Guennebaud
2008-03-21 20:26:14 +00:00
0ef1efdbdb
* cleanup: in public api docs, don't put \sa links to \internal things. (the global funcs in MathFunctions.h and Fuzzy.h don't count as internal). * Mainpage.dox. Add a few prospective Eigen users; change the recommended -finline-limit from 10000 to 1000. The reason is: it could be harmful to have a too big value here, couldn't it? (e.g. exceedingly large executables, cache misses). Looking at gcc, a value of 900 would exactly mean "determine the inlining of all functions as if they were marked with 'inline' keyword". So a value of 1000 seems a reasonable round number. In the benchmark that motivated this (TestEigenSolvers) a value of 400 is enough on my system.
Benoit Jacob
2008-03-17 07:35:22 +00:00
af131fe770
update to fix compilation
Benoit Jacob
2008-03-16 21:04:33 +00:00
612350e3f8
* Added a generic *redux* mini framework allowing custom redux operations as well as partial redux (vertical or horizontal redux). Includes shortcuts for: sum, minCoeff and maxCoeff. There is no shortcut for the partial redux.
Gael Guennebaud
2008-03-16 14:36:25 +00:00
29184ad27d
- introduce sum() returning the sum of the coeffs of a vector - reimplement trace() as just diagonal().sum() - apidoc fixes
Benoit Jacob
2008-03-15 11:05:38 +00:00
fb3438e609
- expand MathFunctions.h to provide more functions, like exp, log... - add cwiseExp(), cwiseLog()... --> for example, doing a gamma-correction on a bitmap image stored as an array of floats is a simple matter of: Eigen::Map<VectorXf> m = VectorXf::map(bitmap,size); m = m.cwisePow(gamma); - apidoc improvements, reorganization of the \name's - remove obsolete examples - remove EIGEN_ALWAYS_INLINE on lazyProduct(), it seems useless.
Benoit Jacob
2008-03-14 10:38:37 +00:00
fe569b060c
get rid of MatrixRef, simplifications.
Benoit Jacob
2008-03-13 20:36:01 +00:00
908a0fbab5
small fix of VERIFY_ASSERT in debug mode
Gael Guennebaud
2008-03-13 09:51:18 +00:00
afc64f3332
a lot of renaming internal classes: AaBb -> ei_aa_bb IntAtRunTimeIfDynamic -> ei_int_if_dynamic unify UNROLLING_LIMIT (there was no reason to have operator= use a higher limit) etc...
Benoit Jacob
2008-03-13 09:33:26 +00:00
16257d44dd
fixed an issue with VERIFY_ASSERT
Gael Guennebaud
2008-03-12 18:44:42 +00:00
35bce20954
Removed Column and Row in favor of Block
Gael Guennebaud
2008-03-12 18:10:52 +00:00
6da4d9d256
fix compilation (forgot to update that file after last big change)
Benoit Jacob
2008-03-12 17:25:14 +00:00
2ee68a074e
generalized ei_traits<>. Finally the importing macro is named EIGEN_BASIC_PUBLIC_INTERFACE because it does not only import the ei_traits, it also makes the base class a friend, etc.
Benoit Jacob
2008-03-12 17:17:36 +00:00
01572b9f54
big change: MatrixBase only takes one template parameter "Derived", the template parameter "Scalar" is removed. This is achieved by introducting a template <typename Derived> struct Scalar to achieve a forward-declaration of the Scalar typedefs.
Benoit Jacob
2008-03-10 17:23:11 +00:00
9d9d81ad71
* basic support for multicore CPU via a .evalOMP() which internaly uses OpenMP if enabled at compile time. * added a bench/ folder with a couple benchmarks and benchmark tools.
Gael Guennebaud
2008-03-09 16:13:47 +00:00
f64311e07d
Extended the comma initializer to support xpr on the right side: Matrix3i mat; Vector2i vec(33,66); mat << vec.transpose(), 99, vec, Matrix2i::random();
Gael Guennebaud
2008-03-08 19:46:06 +00:00
721626dfc5
* Added support for a comma initializer: mat.block(i,j,2,2) << 1, 2, 3, 4; If the number of coefficients does not match the matrix size, then an assertion is raised. No support for xpr on the right side for the moment.
Gael Guennebaud
2008-03-08 19:02:24 +00:00
138aad0ed0
* coefficient wise operators are more generic, with controllable result type. - compatible with current STL's functors as well as with the extention proposal (TR1) * thanks to the above, Cast and ScalarMultiple have been removed * benchmark_suite is more flexible (compiler and matrix size)
Gael Guennebaud
2008-03-06 11:36:27 +00:00
8e0d548039
* Fix a compilation issue with large fixed-size matrices: the unrollers were always instanciated. * the unrolling limits are configurable at compile time.
Gael Guennebaud
2008-03-05 13:18:19 +00:00
861c6f4c9b
renaming: ref() --> asArg()
Benoit Jacob
2008-03-04 17:08:23 +00:00
f65cca5d1d
* Eigen compiles with any GCC versions from, at least, 3.3 without the previous ugly hack :) * Renamed the scalar functors with the "Scalar" prefix (instead of "Cwise")
Gael Guennebaud
2008-03-04 12:34:58 +00:00
46885d33bf
Removed trailling spaces.
Gael Guennebaud
2008-03-03 11:02:52 +00:00
255689231d
* Added generic unary operators (replace Opposite and Conjugate) * functor templates are not template template parameter anymore (this allows to make templated functors !) * Main page: extented compiler discussion * A small hack to support gcc 3.4 and 4.0 (see the main page) * Fix a cast type issue in Cast * Various doxygen updates (mainly Cwise stuff and added doxygen groups in MatrixBase to split the huge memeber list, still not perfect though) * Updated Gael's email address
Gael Guennebaud
2008-03-03 10:52:44 +00:00
ed20f64d68
release alpha4, Gael edition
Benoit Jacob
2008-02-29 14:50:11 +00:00
a2f8d4be6a
Patch by Gael Guennebaud: coeff-wise binary operators. This unifies + and - and moreover this patch introduces coeff-wise * and / based on this. Also, corresponding test.
Benoit Jacob
2008-02-29 14:35:14 +00:00
f12e9c53ac
Patch by Gael Guennebaud: unify fixed-size and dynamic-size Block expressions, update documentation.
Benoit Jacob
2008-02-29 13:56:40 +00:00
b3268a6e2f
-merge patch from Gael Guennebaud adding NumTraits for long long and long double. -define scalar-multiple operators only for the current Scalar type; thanks to Gael for expaining how to make the compiler understand when automatic casting is needed. -take ScalarMultiple take only 1 template param, again. We lose some flexibility especially when dealing with complex numbers, but we gain a lot of extensibility to new scalar types.
Benoit Jacob
2008-02-29 13:20:44 +00:00
aa8e2bcbde
Patch by Gael Guennebaud: Rework the matrix storage to ensure optimal sizeof in all cases, while keeping the decoupling of matrix sizes versus storage sizes. Also fixing (recently introduced) bugs caused by unwanted reallocations of the buffers.
Benoit Jacob
2008-02-29 10:55:53 +00:00
3698d8cf33
Relicense --> dual-license LGPL3+/GPL2+
Benoit Jacob
2008-02-28 15:44:45 +00:00
6907886a15
prefix global functions with ei_ as previous solution was rather fragile. also fix compilation with g++ 4.3.
Benoit Jacob
2008-02-28 12:38:12 +00:00
c67e717404
alpha 3.1. in this commit: - finally get the Eval stuff right. get back to having Eval as a subclass of Matrix with limited functionality, and then, add a typedef MatrixType to get the actual matrix type. - add swap(), findBiggestCoeff() - bugfix by Ramon in Transpose - new demo: doc/echelon.cpp
Benoit Jacob
2008-01-15 13:55:47 +00:00
9c9a42cc49
Eval is now implemented like the other expression types, it no longer inherits Matrix. Remove the typedefs I added in Matrix.
Benoit Jacob
2008-01-14 22:36:37 +00:00
2ee7969f0a
re-optimize Matrix::resize(), add some comments
Benoit Jacob
2008-01-14 13:14:49 +00:00
e20aceb6eb
cleanup in Eval; instead introduce convenient typedefs in Matrix for naming special related matrix types: RowType, ColumnType, BlockType
Benoit Jacob
2008-01-14 11:25:09 +00:00
183bf54d27
final fixes and updates for alpha3
Benoit Jacob
2008-01-13 23:38:48 +00:00
57d7b7d97b
documentation update for alpha 3
Benoit Jacob
2008-01-13 23:17:51 +00:00
6ce996f219
big improvement of the block-manipulation API - reduction of sizeof(Block) for vector types - variants of block() and fixedBlock() for vector blocks - convenience methods start() and end() for vectors - convenience method corner() for matrices
Benoit Jacob
2008-01-13 22:48:57 +00:00
95dc68dc86
renaming: Block -> FixedBlock DynBlock -> Block indeed, previous commit solves the main issue with DynBlock so is should now be the more commonly used one.
Benoit Jacob
2008-01-13 20:19:14 +00:00
89a134ba0b
big architecture change dissociating "actual" dimensions from "maximum possible" dimension. The advantage is that evaluating a dynamic-sized block in a fixed-size matrix no longer causes a dynamic memory allocation. Other new thing: IntAtRunTimeIfDynamic allows storing an integer at zero cost if it is known at compile time.
Benoit Jacob
2008-01-13 19:55:23 +00:00
e05a1aba1d
one bugfix and one optimization
Benoit Jacob
2008-01-11 16:06:31 +00:00
bcf7b29185
rework Identity API: no longer restricted to square matrices
Benoit Jacob
2008-01-11 15:56:21 +00:00
e092cbc75c
-add set...() methods and their documentation; remove Generic -use row-major traversal when the number of columns is fixed and the number of rows is dynamic -other minor changes
Benoit Jacob
2008-01-11 15:08:04 +00:00
aae0667e1e
reorganization/cleanup
Benoit Jacob
2008-01-11 07:16:18 +00:00
45a4b61b5f
switch to enums everywhere
Benoit Jacob
2008-01-10 20:45:35 +00:00
209cf7c91f
TODO is now on techbase
Benoit Jacob
2008-01-09 13:04:04 +00:00
47d354924b
revert most of previous commit. It really is better to forbid default constructor for dynamic-size matrices. Now why do I feel like a beheaded chicken running around?
Benoit Jacob
2008-01-08 10:39:36 +00:00
b036eca902
Revert to allowing default Matrix constructor even for dynamic size (which is then set to 1). Discussion with jonasp made me remember why we did so in Eigen1. Also add default constructor to Eval
Benoit Jacob
2008-01-07 21:19:36 +00:00
8ba3055447
Ready for alpha2 release. - complete documentation - add TODO - update copyright years
Benoit Jacob
2008-01-07 09:34:21 +00:00
5111ace0d6
move default parameter values from function definition to function declaration. doxygen likes it and this fixes compilation on ICC.
Benoit Jacob
2008-01-06 19:34:28 +00:00
84934ea217
- move: DerivedTraits becomes MatrixBase::Traits - the static constants are private again in the Derived classes - more documentation and code snippets - new isDiagonal() method
Benoit Jacob
2008-01-06 16:35:21 +00:00
aaf889e72b
remove all the _Order mechanics, now we are always traversing matrices in column-major order, even if storage is row-major. Benchmark showed that adapting the traversal order to the storage order brought no benefit.
Benoit Jacob
2008-01-06 13:57:29 +00:00
495eb7053a
Patch by Gael Guennebaud, making Eigen compatible with the Intel compiler (icc).
Benoit Jacob
2008-01-06 13:17:07 +00:00
d1d55e67e9
- make MatrixBase and all expressions aware of their preferred traversal order. Honor this preference in operator=. - add several methods to the API - rework API for diagonal matrices - add benchmarking code
Benoit Jacob
2008-01-05 10:57:14 +00:00
23ffede3d0
more documentation, 12 more code snippets
Benoit Jacob
2008-01-03 19:36:32 +00:00
42f6590bb2
cleanup: remove copy contructors when the compiler is able to generate a satisfactory default copy constructor; remove useless static_cast's; some misc cleanup.
Benoit Jacob
2007-12-31 13:29:51 +00:00
86220784b6
part 2 of the reorganization. Benefits/changes: 1) Eigen2 co-installable with Eigen1 without conflict, without affecting programs including either. 2) #include<Eigen/Core> without the .h without conflict with the Core/ directory 3) Uniformize coding style of the CMakeLists.
Benoit Jacob
2007-12-28 16:20:00 +00:00
dfdad129a3
move Core/ to a src/ subdir, in preparation for following changes
Benoit Jacob
2007-12-28 16:00:55 +00:00
e7bdbe2e6a
matrix storage order can now also be row-dominant (choosable for each matrix separately) map() moves from MatrixBase to Matrix much more documentation/examples/snippets
Benoit Jacob
2007-12-27 21:43:10 +00:00
6b9370e0f0
more changes in ScalarMultiple, reintroduce FloatingPoint in NumTraits, improve examples
Benoit Jacob
2007-12-26 09:25:00 +00:00
05a49547e1
in ScalarMultiple, make the factor type independent from the matrix scalar type. This is an optimization for complex matrices, allowing to do only a real multiplication when a complex multiplication is not needed, e.g. in normalized().
Benoit Jacob
2007-12-26 08:30:21 +00:00
dad245af56
- eigen2 now fully enforces constness! found a way to achieve that with minimal code duplication. There now are only two (2) const_cast remaining in the whole source code. - eigen2 now fully allows copying a row-vector into a column-vector. added a unit-test for that. - split unit tests, improve docs, various improvements.
Benoit Jacob
2007-12-25 17:20:58 +00:00
3cd2a125b2
- rework the coefficients API - make vectors use a separate loop unroller, so that copying a row-vector into a col-vector is now possible - add much more documentation - misc improvements
Benoit Jacob
2007-12-24 11:14:25 +00:00
e937583655
everything works, make now runs doxygen once and only once, after all the required files have been generated.
Benoit Jacob
2007-12-21 11:29:04 +00:00
c38156a217
now we also have a examples/ directory for self-contained examples, and this is already used to document DynBlock
Benoit Jacob
2007-12-21 10:35:00 +00:00
eb6ee51fdf
will svn finally let me remove this dir?
Benoit Jacob
2007-12-21 09:31:17 +00:00
a316cd8a76
now cmake takes snippets of code, completes them into compilable sources, builds them, executes them and stores their output in files.
Benoit Jacob
2007-12-21 09:30:32 +00:00
ee3410f79a
renaming (commit in order to avoid svn breakage)
Benoit Jacob
2007-12-21 09:05:41 +00:00
04e3512eb6
first version of CMakeLists auto-generating examples outputs
Benoit Jacob
2007-12-21 09:02:24 +00:00
64f5d5d318
move the documentation to doc/, add dummy documentation to srcdir/ compiling to an explanation of how to generate the docs
Benoit Jacob
2007-12-21 07:30:15 +00:00
a52c74095f
rename src/ to Eigen/ so that we're able to #include<Eigen/Core.h> in the examples instead of ugly things like #include"../../src/Core.h"
Benoit Jacob
2007-12-20 21:25:13 +00:00
647a817b2e
more documentation and examples, add Doxyfile and Mainpage.dox and also the benchmark program
Benoit Jacob
2007-12-20 21:11:05 +00:00
cddeeee17d
- make RowsAtCompileTime and ColsAtCompileTime public in MatrixBase and private in derived types - initial documentation in MatrixBase
Benoit Jacob
2007-12-19 09:30:53 +00:00