diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-08-03 16:05:15 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-08-03 16:05:15 +0200 |
commit | 3cf5bb31f6b6e3b6b8f229ed1658cb867fe6e8f5 (patch) | |
tree | 1b6f62f691f4879fe742c56a7234ca284a86e370 /bench/btl | |
parent | ce1dc1ab165929edd7608d83e448d81e4f968038 (diff) |
* Bye bye MultiplierBase, extend a bit AnyMatrixBase to allow =, +=, and -=
* This probably makes ReturnByValue needless
Diffstat (limited to 'bench/btl')
-rw-r--r-- | bench/btl/libs/C_BLAS/C_BLAS_interface.hh | 16 | ||||
-rw-r--r-- | bench/btl/libs/C_BLAS/main.cpp | 4 | ||||
-rw-r--r-- | bench/btl/libs/eigen2/eigen2_interface.hh | 8 | ||||
-rw-r--r-- | bench/btl/libs/eigen2/main_adv.cpp | 4 |
4 files changed, 17 insertions, 15 deletions
diff --git a/bench/btl/libs/C_BLAS/C_BLAS_interface.hh b/bench/btl/libs/C_BLAS/C_BLAS_interface.hh index e08c4aedc..c8b69883e 100644 --- a/bench/btl/libs/C_BLAS/C_BLAS_interface.hh +++ b/bench/btl/libs/C_BLAS/C_BLAS_interface.hh @@ -237,27 +237,29 @@ public : spotrf_(&uplo, &N, C, &N, &info); } - #ifdef HAS_LAPACK - - static inline void lu_decomp(const gene_matrix & X, gene_matrix & C, int N){ + static inline void partial_lu_decomp(const gene_matrix & X, gene_matrix & C, int N){ int N2 = N*N; scopy_(&N2, X, &intone, C, &intone); char uplo = 'L'; int info = 0; int * ipiv = (int*)alloca(sizeof(int)*N); - int * jpiv = (int*)alloca(sizeof(int)*N); - sgetc2_(&N, C, &N, ipiv, jpiv, &info); + sgetrf_(&N, &N, C, &N, ipiv, &info); } - static inline void partial_lu_decomp(const gene_matrix & X, gene_matrix & C, int N){ + #ifdef HAS_LAPACK + + static inline void lu_decomp(const gene_matrix & X, gene_matrix & C, int N){ int N2 = N*N; scopy_(&N2, X, &intone, C, &intone); char uplo = 'L'; int info = 0; int * ipiv = (int*)alloca(sizeof(int)*N); - sgetrf_(&N, &N, C, &N, ipiv, &info); + int * jpiv = (int*)alloca(sizeof(int)*N); + sgetc2_(&N, C, &N, ipiv, jpiv, &info); } + + static inline void hessenberg(const gene_matrix & X, gene_matrix & C, int N){ #ifdef PUREBLAS { diff --git a/bench/btl/libs/C_BLAS/main.cpp b/bench/btl/libs/C_BLAS/main.cpp index 5c2f8a377..bb3022d3f 100644 --- a/bench/btl/libs/C_BLAS/main.cpp +++ b/bench/btl/libs/C_BLAS/main.cpp @@ -24,7 +24,7 @@ #include "action_cholesky.hh" #include "action_lu_decomp.hh" -// #include "action_partial_lu_decomp.hh" +#include "action_partial_lu.hh" #include "action_trisolve_matrix.hh" #ifdef HAS_LAPACK @@ -52,10 +52,10 @@ int main() bench<Action_trisolve_matrix<C_BLAS_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); bench<Action_cholesky<C_BLAS_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); + bench<Action_partial_lu<C_BLAS_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); #ifdef HAS_LAPACK bench<Action_lu_decomp<C_BLAS_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); -// bench<Action_partial_lu_decomp<C_BLAS_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); bench<Action_hessenberg<C_BLAS_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); bench<Action_tridiagonalization<C_BLAS_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); #endif diff --git a/bench/btl/libs/eigen2/eigen2_interface.hh b/bench/btl/libs/eigen2/eigen2_interface.hh index ffc800a8d..7a014723f 100644 --- a/bench/btl/libs/eigen2/eigen2_interface.hh +++ b/bench/btl/libs/eigen2/eigen2_interface.hh @@ -190,10 +190,10 @@ public : } static inline void trisolve_lower_matrix(const gene_matrix & L, const gene_matrix& B, gene_matrix& X, int N){ -// X = L.template triangularView<LowerTriangular>().solve(B); - X = B; - ei_triangular_solve_matrix<real,ColMajor,ColMajor,LowerTriangular> - ::run(L.cols(), X.cols(), L.data(), L.stride(), X.data(), X.stride()); + X = L.template triangularView<LowerTriangular>().solve(B); +// +// ei_triangular_solve_matrix<real,ColMajor,ColMajor,LowerTriangular> +// ::run(L.cols(), X.cols(), L.data(), L.stride(), X.data(), X.stride()); } static inline void cholesky(const gene_matrix & X, gene_matrix & C, int N){ diff --git a/bench/btl/libs/eigen2/main_adv.cpp b/bench/btl/libs/eigen2/main_adv.cpp index c3e5fac30..d98c0cd39 100644 --- a/bench/btl/libs/eigen2/main_adv.cpp +++ b/bench/btl/libs/eigen2/main_adv.cpp @@ -23,7 +23,7 @@ #include "action_cholesky.hh" #include "action_hessenberg.hh" #include "action_lu_decomp.hh" -// #include "action_partial_lu_decomp.hh" +#include "action_partial_lu.hh" BTL_MAIN; @@ -33,7 +33,7 @@ int main() bench<Action_trisolve_matrix<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); bench<Action_cholesky<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); bench<Action_lu_decomp<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); -// bench<Action_partial_lu_decomp<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); + bench<Action_partial_lu<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); bench<Action_hessenberg<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); bench<Action_tridiagonalization<eigen2_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); |