[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/eigen2
From:       Gael Guennebaud <g.gael () free ! fr>
Date:       2008-05-31 23:21:50
Message-ID: 1212276110.038032.22354.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 815024 by ggael:

added an *optional* Eigen2 dynamic library.
it allows the possiblity to save some compilation time by linking to it
*and* defining the token EIGEN_EXTERN_INSTANCIATIONS


 M  +2 -0      CMakeLists.txt  
 M  +14 -3     Eigen/CMakeLists.txt  
 M  +4 -1      Eigen/Core  
 M  +0 -1      Eigen/src/Core/CacheFriendlyProduct.h  
 A             Eigen/src/Core/CoreInstanciations.cpp   [License: GPL (v3+) LGPL (v3+)]
 M  +7 -0      Eigen/src/Core/util/ForwardDeclarations.h  
 M  +4 -0      test/CMakeLists.txt  


--- branches/work/eigen2/CMakeLists.txt #815023:815024
@@ -1,5 +1,7 @@
 PROJECT(Eigen)
 
+CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
+
 OPTION(BUILD_TESTS "Build tests" OFF)
 OPTION(BUILD_DOC "Build documentation and examples" OFF)
 
--- branches/work/eigen2/Eigen/CMakeLists.txt #815023:815024
@@ -1,14 +1,25 @@
-SET(Eigen_SRCS Core CoreDeclarations LU Cholesky QR)
+SET(Eigen_HEADERS Core CoreDeclarations LU Cholesky QR)
 
+SET(Eigen_SRCS
+  src/Core/CoreInstanciations.cpp
+)
+
+ADD_LIBRARY(Eigen2 ${Eigen_SRCS})
+
 SET(INCLUDE_INSTALL_DIR
     "${CMAKE_INSTALL_PREFIX}/include/eigen2"
     CACHE PATH
     "The directory where we install the header files"
     FORCE)
 
-INSTALL(FILES 
-  ${Eigen_SRCS}
+INSTALL(FILES
+  ${Eigen_HEADERS}
   DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen
   )
 
+INSTALL(TARGETS Eigen2
+        RUNTIME DESTINATION bin
+        LIBRARY DESTINATION lib
+        ARCHIVE DESTINATION lib)
+
 ADD_SUBDIRECTORY(src)
\ No newline at end of file
--- branches/work/eigen2/Eigen/Core #815023:815024
@@ -37,7 +37,6 @@
 #include "src/Core/CwiseUnaryOp.h"
 #include "src/Core/CwiseNullaryOp.h"
 #include "src/Core/InverseProduct.h"
-#include "src/Core/CacheFriendlyProduct.h"
 #include "src/Core/Product.h"
 #include "src/Core/Block.h"
 #include "src/Core/Minor.h"
@@ -55,6 +54,10 @@
 #include "src/Core/Extract.h"
 #include "src/Core/Part.h"
 
+#ifndef EIGEN_EXTERN_INSTANCIATIONS
+#include "src/Core/CacheFriendlyProduct.h"
+#endif
+
 } // namespace Eigen
 
 #endif // EIGEN_CORE_H
--- branches/work/eigen2/Eigen/src/Core/CacheFriendlyProduct.h #815023:815024
@@ -349,5 +349,4 @@
   }
 }
 
-
 #endif // EIGEN_CACHE_FRIENDLY_PRODUCT_H
--- branches/work/eigen2/Eigen/src/Core/util/ForwardDeclarations.h #815023:815024
@@ -75,6 +75,13 @@
 template<typename Scalar> struct ei_scalar_max_op;
 template<typename Scalar> struct ei_scalar_random_op;
 
+template<typename Scalar>
+static void ei_cache_friendly_product(
+  int _rows, int _cols, int depth,
+  bool _lhsRowMajor, const Scalar* _lhs, int _lhsStride,
+  bool _rhsRowMajor, const Scalar* _rhs, int _rhsStride,
+  bool resRowMajor, Scalar* res, int resStride);
+
 template<typename ExpressionType, bool CheckExistence = true> class Inverse;
 template<typename MatrixType> class QR;
 
--- branches/work/eigen2/test/CMakeLists.txt #815023:815024
@@ -53,6 +53,8 @@
 
   EI_ADD_TARGET_PROPERTY(${targetname} COMPILE_FLAGS "-DEIGEN_TEST_FUNC=${testname}")
 
+  target_link_libraries(${targetname} Eigen2)
+
   IF(WIN32)
     ADD_TEST(${testname} "${targetname}")
   ELSE(WIN32)
@@ -64,6 +66,8 @@
 
 ENABLE_TESTING()
 
+ADD_DEFINITIONS("-DEIGEN_EXTERN_INSTANCIATION=1")
+
 EI_ADD_TEST(basicstuff)
 EI_ADD_TEST(linearstructure)
 EI_ADD_TEST(cwiseop)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic