aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/btl/libs/INTEL_BLAS
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-07-10 18:28:50 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-07-10 18:28:50 +0000
commit6f71ef8277405d268032f7c3bcaf316c7422c133 (patch)
tree419a7d46b9db1a64a6e94756ca70d1801196b061 /bench/btl/libs/INTEL_BLAS
parent2b53fd4d53c87d41e26e4f178431f904ca2a42cd (diff)
resurrected tvmet, added mt4, intel's MKL and handcoded vectorized backends
in the benchmark suite
Diffstat (limited to 'bench/btl/libs/INTEL_BLAS')
-rw-r--r--bench/btl/libs/INTEL_BLAS/INTEL_BLAS_LU_solve_interface.hh127
-rw-r--r--bench/btl/libs/INTEL_BLAS/INTEL_BLAS_interface.hh95
-rwxr-xr-xbench/btl/libs/INTEL_BLAS/config.sh2
-rw-r--r--bench/btl/libs/INTEL_BLAS/main.cpp49
4 files changed, 0 insertions, 273 deletions
diff --git a/bench/btl/libs/INTEL_BLAS/INTEL_BLAS_LU_solve_interface.hh b/bench/btl/libs/INTEL_BLAS/INTEL_BLAS_LU_solve_interface.hh
deleted file mode 100644
index 616ab4720..000000000
--- a/bench/btl/libs/INTEL_BLAS/INTEL_BLAS_LU_solve_interface.hh
+++ /dev/null
@@ -1,127 +0,0 @@
-//=====================================================
-// File : INTEL_BLAS_LU_solve_interface.hh
-// Author : L. Plagne <laurent.plagne@edf.fr)>
-// Copyright (C) EDF R&D, lun sep 30 14:23:29 CEST 2002
-//=====================================================
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-//
-#ifndef INTEL_BLAS_LU_solve_interface_HH
-#define INTEL_BLAS_LU_solve_interface_HH
-#include "INTEL_BLAS_interface.hh"
-extern "C"
-{
-// void dgetrf_(int *M, int *N, double *A, int *LDA, int *IPIV, int *INFO);
-// void dgetrs_(char *TRANS, int *N, int *NRHS, double *A, int *LDA, int *IPIV, double *B, int *LDB, int *INFO);
-// void sgetrf_(int *M, int *N, float *A, int *LDA, int *IPIV, int *INFO);
-// void sgetrs_(char *TRANS, int *N, int *NRHS, float *A, int *LDA, int *IPIV, double *B, int *LDB, int *INFO);
-#include "mkl_lapack.h"
-
-}
-
-template<class real>
-class INTEL_BLAS_LU_solve_interface : public INTEL_BLAS_interface<real>
-{
-public :
-
- typedef typename INTEL_BLAS_interface<real>::gene_matrix gene_matrix;
- typedef typename INTEL_BLAS_interface<real>::gene_vector gene_vector;
-
- typedef int * Pivot_Vector;
-
- inline static void new_Pivot_Vector(Pivot_Vector & pivot, int N)
- {
-
- pivot = new int[N];
-
- }
-
- inline static void free_Pivot_Vector(Pivot_Vector & pivot)
- {
-
- delete pivot;
-
- }
-
-
- inline static void LU_factor(gene_matrix & LU, Pivot_Vector & pivot, int N)
- {
-
- int info;
- DGETRF(&N,&N,LU,&N,pivot,&info);
-
- }
-
- inline static void LU_solve(const gene_matrix & LU, const Pivot_Vector pivot, const gene_vector &B, gene_vector X, int N)
- {
- int info;
- int one=1;
-
- char * transpose="N";
-
- copy_vector(B,X,N);
- DGETRS(transpose,&N,&one,LU,&N,pivot,X,&N,&info);
-
- }
-
-};
-
-template<>
-class INTEL_BLAS_LU_solve_interface<float> : public INTEL_BLAS_interface<float>
-{
-public :
-
- typedef int * Pivot_Vector;
-
- inline static void new_Pivot_Vector(Pivot_Vector & pivot, int N)
- {
-
- pivot = new int[N];
-
- }
-
- inline static void free_Pivot_Vector(Pivot_Vector & pivot)
- {
-
- delete pivot;
-
- }
-
-
- inline static void LU_factor(gene_matrix & LU, Pivot_Vector & pivot, int N)
- {
-
- int info;
- SGETRF(&N,&N,LU,&N,pivot,&info);
-
- }
-
- inline static void LU_solve(const gene_matrix & LU, const Pivot_Vector pivot, const gene_vector &B, gene_vector X, int N)
- {
-
- char * transpose="N";
- int info;
- int one=1;
- copy_vector(B,X,N);
- SGETRS(transpose,&N,&one,LU,&N,pivot,X,&N,&info);
-
- }
-
-};
-
-
-#endif
-
-
-
diff --git a/bench/btl/libs/INTEL_BLAS/INTEL_BLAS_interface.hh b/bench/btl/libs/INTEL_BLAS/INTEL_BLAS_interface.hh
deleted file mode 100644
index 778aaf8b1..000000000
--- a/bench/btl/libs/INTEL_BLAS/INTEL_BLAS_interface.hh
+++ /dev/null
@@ -1,95 +0,0 @@
-//=====================================================
-// File : INTEL_BLAS_interface.hh
-// Author : L. Plagne <laurent.plagne@edf.fr)>
-// Copyright (C) EDF R&D, lun sep 30 14:23:29 CEST 2002
-//=====================================================
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-//
-#ifndef INTEL_BLAS_PRODUIT_MATRICE_VECTEUR_HH
-#define INTEL_BLAS_PRODUIT_MATRICE_VECTEUR_HH
-#include "f77_interface.hh"
-extern "C"
-{
-#include "mkl_cblas.h"
-}
-
-template<class real>
-class INTEL_BLAS_interface : public f77_interface_base<real>
-{
-public :
-
- typedef typename f77_interface_base<real>::gene_matrix gene_matrix;
- typedef typename f77_interface_base<real>::gene_vector gene_vector;
-
- static inline std::string name( void ) { return "INTEL_BLAS"; }
-
- static inline void matrix_vector_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N) {
- cblas_dgemv(CblasColMajor,CblasNoTrans,N,N,1.0,A,N,B,1,0.0,X,1);
- }
-
- static inline void matrix_matrix_product(gene_matrix & A, gene_matrix & B, gene_matrix & X, int N) {
- cblas_dgemm(CblasColMajor,CblasNoTrans,CblasNoTrans,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 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);
- }
-
- static inline void axpy(real coef, const gene_vector & X, gene_vector & Y, int N) {
- cblas_daxpy(N,coef,X,1,Y,1);
- }
-
-};
-
-template<>
-class INTEL_BLAS_interface<float> : public f77_interface_base<float>
-{
-public :
-
- static inline std::string name() { return "INTEL_BLAS"; }
-
- static inline void matrix_vector_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N) {
- // cblas_sgemv(CblasNoTrans,N,N,1.0,A,N,B,1,0.0,X,1);
- cblas_sgemv(CblasColMajor,CblasNoTrans,N,N,1.0,A,N,B,1,0.0,X,1);
-
- }
-
- static inline void matrix_matrix_product(gene_matrix & A, gene_matrix & B, gene_matrix & X, int N) {
- cblas_sgemm(CblasColMajor,CblasNoTrans,CblasNoTrans,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_sgemm(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_sgemm(CblasColMajor,CblasNoTrans,CblasTrans,N,N,N,1.0,A,N,A,N,0.0,X,N);
- }
-
- static inline void axpy(float coef, const gene_vector & X, gene_vector & Y, int N) {
- cblas_saxpy(N,coef,X,1,Y,1);
- }
-
-};
-
-
-#endif
-
-
-
diff --git a/bench/btl/libs/INTEL_BLAS/config.sh b/bench/btl/libs/INTEL_BLAS/config.sh
deleted file mode 100755
index 0ba48fe90..000000000
--- a/bench/btl/libs/INTEL_BLAS/config.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#! /bin/bash
-export LD_LIBRARY_PATH=/opt/intel/mkl/lib/32:${LD_LIBRARY_PATH}
diff --git a/bench/btl/libs/INTEL_BLAS/main.cpp b/bench/btl/libs/INTEL_BLAS/main.cpp
deleted file mode 100644
index b91d93470..000000000
--- a/bench/btl/libs/INTEL_BLAS/main.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-//=====================================================
-// File : main.cpp
-// Author : L. Plagne <laurent.plagne@edf.fr)>
-// Copyright (C) EDF R&D, lun sep 30 14:23:29 CEST 2002
-//=====================================================
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-//
-#include "utilities.h"
-#include "INTEL_BLAS_interface.hh"
-#include "INTEL_BLAS_LU_solve_interface.hh"
-#include "bench.hh"
-#include "action_matrix_vector_product.hh"
-#include "action_matrix_matrix_product.hh"
-#include "action_axpy.hh"
-#include "action_lu_solve.hh"
-#include "action_ata_product.hh"
-#include "action_aat_product.hh"
-
-int main()
-{
-
- bench<Action_axpy<INTEL_BLAS_interface<REAL_TYPE> > >(MIN_AXPY,MAX_AXPY,NB_POINT);
-
- bench<Action_matrix_vector_product<INTEL_BLAS_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT);
-
- bench<Action_matrix_matrix_product<INTEL_BLAS_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);
-
- bench<Action_ata_product<INTEL_BLAS_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);
-
- bench<Action_aat_product<INTEL_BLAS_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT);
-
-// bench<Action_lu_solve<INTEL_BLAS_LU_solve_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT);
-
- return 0;
-}
-
-