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/libs/C_BLAS | |
parent | ce1dc1ab165929edd7608d83e448d81e4f968038 (diff) |
* Bye bye MultiplierBase, extend a bit AnyMatrixBase to allow =, +=, and -=
* This probably makes ReturnByValue needless
Diffstat (limited to 'bench/btl/libs/C_BLAS')
-rw-r--r-- | bench/btl/libs/C_BLAS/C_BLAS_interface.hh | 16 | ||||
-rw-r--r-- | bench/btl/libs/C_BLAS/main.cpp | 4 |
2 files changed, 11 insertions, 9 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 |