diff options
Diffstat (limited to 'bench/btl/libs/C_BLAS')
-rw-r--r-- | bench/btl/libs/C_BLAS/C_BLAS_interface.hh | 29 | ||||
-rw-r--r-- | bench/btl/libs/C_BLAS/main.cpp | 2 |
2 files changed, 17 insertions, 14 deletions
diff --git a/bench/btl/libs/C_BLAS/C_BLAS_interface.hh b/bench/btl/libs/C_BLAS/C_BLAS_interface.hh index 5701b7b1e..d23d04807 100644 --- a/bench/btl/libs/C_BLAS/C_BLAS_interface.hh +++ b/bench/btl/libs/C_BLAS/C_BLAS_interface.hh @@ -108,12 +108,13 @@ public : cblas_dgemm(CblasColMajor,CblasTrans,CblasTrans,N,N,N,1.0,A,N,B,N,0.0,X,N); } - static inline void ata_product(gene_matrix & A, gene_matrix & X, int N){ - cblas_dgemm(CblasColMajor,CblasTrans,CblasNoTrans,N,N,N,1.0,A,N,A,N,0.0,X,N); - } +// static inline void ata_product(gene_matrix & A, gene_matrix & X, int N){ +// cblas_dgemm(CblasColMajor,CblasTrans,CblasNoTrans,N,N,N,1.0,A,N,A,N,0.0,X,N); +// } static inline void aat_product(gene_matrix & A, gene_matrix & X, int N){ - cblas_dgemm(CblasColMajor,CblasNoTrans,CblasTrans,N,N,N,1.0,A,N,A,N,0.0,X,N); + //cblas_dgemm(CblasColMajor,CblasNoTrans,CblasTrans,N,N,N,1.0,A,N,A,N,0.0,X,N); + cblas_dsyrk(CblasColMajor, CblasLower, CblasTrans, N, N, 1.0, A, N, 0.0, X, N); } static inline void axpy(real coef, const gene_vector & X, gene_vector & Y, int N){ @@ -212,19 +213,21 @@ public : #endif } - static inline void ata_product(gene_matrix & A, gene_matrix & X, int N){ - #ifdef PUREBLAS - sgemm_(&trans,¬rans,&N,&N,&N,&fone,A,&N,A,&N,&fzero,X,&N); - #else - cblas_sgemm(CblasColMajor,CblasTrans,CblasNoTrans,N,N,N,1.0,A,N,A,N,0.0,X,N); - #endif - } +// static inline void ata_product(gene_matrix & A, gene_matrix & X, int N){ +// #ifdef PUREBLAS +// sgemm_(&trans,¬rans,&N,&N,&N,&fone,A,&N,A,&N,&fzero,X,&N); +// #else +// cblas_sgemm(CblasColMajor,CblasTrans,CblasNoTrans,N,N,N,1.0,A,N,A,N,0.0,X,N); +// #endif +// } static inline void aat_product(gene_matrix & A, gene_matrix & X, int N){ #ifdef PUREBLAS - sgemm_(¬rans,&trans,&N,&N,&N,&fone,A,&N,A,&N,&fzero,X,&N); + // sgemm_(¬rans,&trans,&N,&N,&N,&fone,A,&N,A,&N,&fzero,X,&N); + ssyrk_(&lower,¬rans,&N,&N,&fone,A,&N,&fzero,X,&N); #else - cblas_sgemm(CblasColMajor,CblasNoTrans,CblasTrans,N,N,N,1.0,A,N,A,N,0.0,X,N); +// cblas_sgemm(CblasColMajor,CblasNoTrans,CblasTrans,N,N,N,1.0,A,N,A,N,0.0,X,N); + cblas_ssyrk(CblasColMajor, CblasLower, CblasNoTrans, N, N, 1.0, A, N, 0.0, X, N); #endif } diff --git a/bench/btl/libs/C_BLAS/main.cpp b/bench/btl/libs/C_BLAS/main.cpp index 99f512f9b..d7af129f7 100644 --- a/bench/btl/libs/C_BLAS/main.cpp +++ b/bench/btl/libs/C_BLAS/main.cpp @@ -48,7 +48,7 @@ int main() bench<Action_rot<C_BLAS_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT); bench<Action_matrix_matrix_product<C_BLAS_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); - bench<Action_ata_product<C_BLAS_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); +// bench<Action_ata_product<C_BLAS_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); bench<Action_aat_product<C_BLAS_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); bench<Action_trisolve<C_BLAS_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); |