diff options
author | Gael Guennebaud <g.gael@free.fr> | 2008-06-14 13:02:41 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2008-06-14 13:02:41 +0000 |
commit | f07f90781043c47078f57ba4b97eb68356bc6d3b (patch) | |
tree | 219609870d437547256b7623b363b5ef9290ea64 /Eigen/Cholesky | |
parent | 53289a8b643e69fc86fcfbc5195e1324b306c57d (diff) |
Add QR and Cholesky module instantiations in the lib.
To try it with the unit tests set the cmake variable TEST_LIB to ON.
Diffstat (limited to 'Eigen/Cholesky')
-rw-r--r-- | Eigen/Cholesky | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Eigen/Cholesky b/Eigen/Cholesky index 448dd506f..d4b487ce7 100644 --- a/Eigen/Cholesky +++ b/Eigen/Cholesky @@ -3,6 +3,15 @@ #include "Core" +// Note that EIGEN_HIDE_HEAVY_CODE has to be defined per module +#if (defined EIGEN_EXTERN_INSTANTIATIONS) && (EIGEN_EXTERN_INSTANTIATIONS>=2) + #ifndef EIGEN_HIDE_HEAVY_CODE + #define EIGEN_HIDE_HEAVY_CODE + #endif +#elif defined EIGEN_HIDE_HEAVY_CODE + #undef EIGEN_HIDE_HEAVY_CODE +#endif + namespace Eigen { #include "src/Cholesky/Cholesky.h" @@ -10,4 +19,27 @@ namespace Eigen { } // namespace Eigen +#define EIGEN_CHOLESKY_MODULE_INSTANTIATE_TYPE(MATRIXTYPE,PREFIX) \ + PREFIX template class Cholesky<MATRIXTYPE>; \ + PREFIX template class CholeskyWithoutSquareRoot<MATRIXTYPE> + +#define EIGEN_CHOLESKY_MODULE_INSTANTIATE(PREFIX) \ + EIGEN_CHOLESKY_MODULE_INSTANTIATE_TYPE(Matrix2f,PREFIX); \ + EIGEN_CHOLESKY_MODULE_INSTANTIATE_TYPE(Matrix2d,PREFIX); \ + EIGEN_CHOLESKY_MODULE_INSTANTIATE_TYPE(Matrix3f,PREFIX); \ + EIGEN_CHOLESKY_MODULE_INSTANTIATE_TYPE(Matrix3d,PREFIX); \ + EIGEN_CHOLESKY_MODULE_INSTANTIATE_TYPE(Matrix4f,PREFIX); \ + EIGEN_CHOLESKY_MODULE_INSTANTIATE_TYPE(Matrix4d,PREFIX); \ + EIGEN_CHOLESKY_MODULE_INSTANTIATE_TYPE(MatrixXf,PREFIX); \ + EIGEN_CHOLESKY_MODULE_INSTANTIATE_TYPE(MatrixXd,PREFIX); \ + EIGEN_CHOLESKY_MODULE_INSTANTIATE_TYPE(MatrixXcf,PREFIX); \ + EIGEN_CHOLESKY_MODULE_INSTANTIATE_TYPE(MatrixXcd,PREFIX) + +#ifdef EIGEN_EXTERN_INSTANTIATIONS + +namespace Eigen { + EIGEN_CHOLESKY_MODULE_INSTANTIATE(extern); +} // namespace Eigen +#endif + #endif // EIGEN_CHOLESKY_MODULE_H |