diff options
author | Gael Guennebaud <g.gael@free.fr> | 2008-07-09 13:54:21 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2008-07-09 13:54:21 +0000 |
commit | 5f55ab524cf0aad34dd6884bcae09eaa6c43c247 (patch) | |
tree | 089cc17ee20e630924c7d72bb08533938a3a9498 | |
parent | 783eb6da9b7a31d856fd13958560a6fbe73332b4 (diff) |
* added a lazyAssign overload skipping .lazy() such that c = (<xpr>).lazy() such that
lazyAssign overloads of <xpr> are automatically called (this also reduces assign instansiations)
-rw-r--r-- | Eigen/CMakeLists.txt | 16 | ||||
-rw-r--r-- | Eigen/src/Core/MatrixBase.h | 11 |
2 files changed, 15 insertions, 12 deletions
diff --git a/Eigen/CMakeLists.txt b/Eigen/CMakeLists.txt index 7ca3640ce..d64b6218f 100644 --- a/Eigen/CMakeLists.txt +++ b/Eigen/CMakeLists.txt @@ -1,6 +1,6 @@ SET(Eigen_HEADERS Core CoreDeclarations LU Cholesky QR Geometry Sparse Array) -IF(TEST_LIB) +IF(BUILD_LIB) SET(Eigen_SRCS src/Core/CoreInstantiations.cpp src/Cholesky/CholeskyInstantiations.cpp @@ -8,7 +8,12 @@ IF(TEST_LIB) ) ADD_LIBRARY(Eigen2 SHARED ${Eigen_SRCS}) -ENDIF(TEST_LIB) + + INSTALL(TARGETS Eigen2 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) +ENDIF(BUILD_LIB) IF(CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g1 -O2") @@ -26,11 +31,4 @@ INSTALL(FILES DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen ) -IF(TEST_LIB) - INSTALL(TARGETS Eigen2 - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -ENDIF(TEST_LIB) - ADD_SUBDIRECTORY(src)
\ No newline at end of file diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index 26f05738f..aba4817ac 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -212,9 +212,14 @@ template<typename Derived> class MatrixBase return this->operator=<Derived>(other); } - /** Overloaded for optimal product evaluation */ - template<typename Derived1, typename Derived2> - Derived& lazyAssign(const Product<Derived1,Derived2,CacheFriendlyProduct>& product); + /** Overloaded for cache friendly product evaluation */ + template<typename Lhs, typename Rhs> + Derived& lazyAssign(const Product<Lhs,Rhs,CacheFriendlyProduct>& product); + + /** Overloaded for cache friendly product evaluation */ + template<typename OtherDerived> + Derived& lazyAssign(const Flagged<OtherDerived, 0, EvalBeforeNestingBit | EvalBeforeAssigningBit>& other) + { lazyAssign(other._expression()); } /** Overloaded for sparse product evaluation */ template<typename Derived1, typename Derived2> |