From e35b1ef3f39bac2fc4391a8326b50602425fb588 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 23 Mar 2011 10:07:24 +0100 Subject: BTL: rm stupid backends --- bench/btl/CMakeLists.txt | 8 +- bench/btl/actions/action_hessenberg.hh | 10 +- bench/btl/libs/C/CMakeLists.txt | 3 - bench/btl/libs/C/C_interface.hh | 117 ---- bench/btl/libs/C/main.cpp | 48 -- bench/btl/libs/STL_algo/CMakeLists.txt | 2 - bench/btl/libs/STL_algo/STL_algo_interface.hh | 138 ---- bench/btl/libs/STL_algo/main.cpp | 39 -- bench/btl/libs/f77/CMakeLists.txt | 6 - bench/btl/libs/f77/daat.f | 14 - bench/btl/libs/f77/data.f | 14 - bench/btl/libs/f77/daxpy.f | 18 - bench/btl/libs/f77/dmxm.f | 32 - bench/btl/libs/f77/dmxm.f.mfr | 36 -- bench/btl/libs/f77/dmxv.f | 39 -- bench/btl/libs/f77/f77_interface.hh | 129 ---- bench/btl/libs/f77/f77_interface_base.hh | 91 --- bench/btl/libs/f77/main.cpp | 47 -- bench/btl/libs/f77/saat.f | 14 - bench/btl/libs/f77/sata.f | 14 - bench/btl/libs/f77/saxpy.f | 16 - bench/btl/libs/f77/smxm.f | 32 - bench/btl/libs/f77/smxv.f | 38 -- bench/btl/libs/f77/test_interface.hh | 36 -- bench/btl/libs/hand_vec/CMakeLists.txt | 12 - bench/btl/libs/hand_vec/hand_vec_interface.hh | 886 -------------------------- bench/btl/libs/hand_vec/main.cpp | 50 -- 27 files changed, 7 insertions(+), 1882 deletions(-) delete mode 100644 bench/btl/libs/C/CMakeLists.txt delete mode 100755 bench/btl/libs/C/C_interface.hh delete mode 100644 bench/btl/libs/C/main.cpp delete mode 100644 bench/btl/libs/STL_algo/CMakeLists.txt delete mode 100644 bench/btl/libs/STL_algo/STL_algo_interface.hh delete mode 100644 bench/btl/libs/STL_algo/main.cpp delete mode 100644 bench/btl/libs/f77/CMakeLists.txt delete mode 100644 bench/btl/libs/f77/daat.f delete mode 100644 bench/btl/libs/f77/data.f delete mode 100644 bench/btl/libs/f77/daxpy.f delete mode 100644 bench/btl/libs/f77/dmxm.f delete mode 100644 bench/btl/libs/f77/dmxm.f.mfr delete mode 100644 bench/btl/libs/f77/dmxv.f delete mode 100644 bench/btl/libs/f77/f77_interface.hh delete mode 100644 bench/btl/libs/f77/f77_interface_base.hh delete mode 100644 bench/btl/libs/f77/main.cpp delete mode 100644 bench/btl/libs/f77/saat.f delete mode 100644 bench/btl/libs/f77/sata.f delete mode 100644 bench/btl/libs/f77/saxpy.f delete mode 100644 bench/btl/libs/f77/smxm.f delete mode 100644 bench/btl/libs/f77/smxv.f delete mode 100644 bench/btl/libs/f77/test_interface.hh delete mode 100644 bench/btl/libs/hand_vec/CMakeLists.txt delete mode 100755 bench/btl/libs/hand_vec/hand_vec_interface.hh delete mode 100644 bench/btl/libs/hand_vec/main.cpp (limited to 'bench/btl') diff --git a/bench/btl/CMakeLists.txt b/bench/btl/CMakeLists.txt index 95ffbf42a..2159415f0 100644 --- a/bench/btl/CMakeLists.txt +++ b/bench/btl/CMakeLists.txt @@ -90,17 +90,13 @@ endmacro(btl_add_target_property) ENABLE_TESTING() add_subdirectory(libs/eigen3) -# add_subdirectory(libs/hand_vec) +add_subdirectory(libs/C_BLAS) +add_subdirectory(libs/ublas) add_subdirectory(libs/gmm) add_subdirectory(libs/mtl4) -add_subdirectory(libs/ublas) add_subdirectory(libs/blitz) add_subdirectory(libs/tvmet) -add_subdirectory(libs/C_BLAS) -add_subdirectory(libs/f77) -add_subdirectory(libs/C) add_subdirectory(libs/STL) -add_subdirectory(libs/STL_algo) add_subdirectory(data) diff --git a/bench/btl/actions/action_hessenberg.hh b/bench/btl/actions/action_hessenberg.hh index a46964657..5dd12a9bc 100644 --- a/bench/btl/actions/action_hessenberg.hh +++ b/bench/btl/actions/action_hessenberg.hh @@ -136,13 +136,13 @@ public : Action_tridiagonalization( int size ):_size(size) { - MESSAGE("Action_hessenberg Ctor"); + MESSAGE("Action_tridiagonalization Ctor"); // STL vector initialization typename Interface::stl_matrix tmp; init_matrix(tmp,_size); init_matrix(X_stl,_size); - STL_interface::ata_product(tmp,X_stl,_size); + STL_interface::aat_product(tmp,X_stl,_size); init_matrix(C_stl,_size); init_matrix(resu_stl,_size); @@ -155,9 +155,9 @@ public : _cost = 0; for (int j=0; j<_size-2; ++j) { - int r = std::max(0,_size-j-1); - int b = std::max(0,_size-j-2); - _cost += 6 + 3*b + r*r*8; + double r = std::max(0,_size-j-1); + double b = std::max(0,_size-j-2); + _cost += 6. + 3.*b + r*r*8.; } } diff --git a/bench/btl/libs/C/CMakeLists.txt b/bench/btl/libs/C/CMakeLists.txt deleted file mode 100644 index 3d4d24cee..000000000 --- a/bench/btl/libs/C/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -include_directories(${PROJECT_SOURCE_DIR}/libs/f77) -btl_add_bench(btl_C main.cpp OFF) -# set_target_properties(btl_C PROPERTIES COMPILE_FLAGS "-fpeel-loops") \ No newline at end of file diff --git a/bench/btl/libs/C/C_interface.hh b/bench/btl/libs/C/C_interface.hh deleted file mode 100755 index d6092517d..000000000 --- a/bench/btl/libs/C/C_interface.hh +++ /dev/null @@ -1,117 +0,0 @@ -//===================================================== -// File : C_interface.hh -// Author : L. Plagne -// Copyright (C) EDF R&D, lun sep 30 14:23:23 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 C_INTERFACE_HH -#define C_INTERFACE_HH - -#include "f77_interface.hh" - -template -class C_interface : public f77_interface_base { - -public : - - typedef typename f77_interface_base::gene_matrix gene_matrix; - typedef typename f77_interface_base::gene_vector gene_vector; - - static inline std::string name() { return "C"; } - - static inline void matrix_vector_product(const gene_matrix & A, const gene_vector & B, gene_vector & X, int N) - { -// for (int i=0;i -// Copyright (C) EDF R&D, lun sep 30 14:23:23 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 "bench.hh" -#include "C_interface.hh" -#include "action_matrix_vector_product.hh" -#include "action_atv_product.hh" -#include "action_matrix_matrix_product.hh" -#include "action_axpy.hh" -#include "action_ata_product.hh" -#include "action_aat_product.hh" -//#include "action_lu_solve.hh" -#include "timers/mixed_perf_analyzer.hh" - -BTL_MAIN; - -int main() -{ - - bench > >(MIN_MV,MAX_MV,NB_POINT); - bench > >(MIN_MV,MAX_MV,NB_POINT); - bench > >(MIN_MM,MAX_MM,NB_POINT); - bench > >(MIN_MM,MAX_MM,NB_POINT); - bench > >(MIN_MM,MAX_MM,NB_POINT); - bench > >(MIN_AXPY,MAX_AXPY,NB_POINT); - - - return 0; -} - - diff --git a/bench/btl/libs/STL_algo/CMakeLists.txt b/bench/btl/libs/STL_algo/CMakeLists.txt deleted file mode 100644 index 8309c8bdd..000000000 --- a/bench/btl/libs/STL_algo/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ - -btl_add_bench(btl_STL_algo main.cpp OFF) diff --git a/bench/btl/libs/STL_algo/STL_algo_interface.hh b/bench/btl/libs/STL_algo/STL_algo_interface.hh deleted file mode 100644 index 8854479a6..000000000 --- a/bench/btl/libs/STL_algo/STL_algo_interface.hh +++ /dev/null @@ -1,138 +0,0 @@ -//===================================================== -// File : STL_algo_interface.hh -// Author : L. Plagne -// Copyright (C) EDF R&D, lun sep 30 14:23:24 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 STL_ALGO_INTERFACE_HH -#define STL_ALGO_INTERFACE_HH -#include -#include -#include -#include -#include "utilities.h" - - -template -class STL_algo_interface{ - -public : - - typedef real real_type ; - - typedef std::vector stl_vector; - typedef std::vector stl_matrix; - - typedef stl_matrix gene_matrix; - - typedef stl_vector gene_vector; - - static inline std::string name( void ) - { - return "STL_algo"; - } - - static void free_matrix(gene_matrix & A, int N){} - - static void free_vector(gene_vector & B){} - - static inline void matrix_from_stl(gene_matrix & A, stl_matrix & A_stl){ - A=A_stl ; - } - - static inline void vector_from_stl(gene_vector & B, stl_vector & B_stl){ - B=B_stl ; - } - - static inline void vector_to_stl(gene_vector & B, stl_vector & B_stl){ - B_stl=B ; - } - - static inline void matrix_to_stl(gene_matrix & A, stl_matrix & A_stl){ - A_stl=A ; - } - - static inline void copy_vector(const gene_vector & source, gene_vector & cible, int N){ - for (int i=0;i -// Copyright (C) EDF R&D, lun sep 30 14:23:23 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 "STL_algo_interface.hh" -#include "bench.hh" -#include "action_atv_product.hh" -#include "action_axpy.hh" - -BTL_MAIN; - -int main() -{ - - - bench > >(MIN_MV,MAX_MV,NB_POINT); - - bench > >(MIN_AXPY,MAX_AXPY,NB_POINT); - - return 0; -} - - diff --git a/bench/btl/libs/f77/CMakeLists.txt b/bench/btl/libs/f77/CMakeLists.txt deleted file mode 100644 index cecb9160c..000000000 --- a/bench/btl/libs/f77/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -if(CMAKE_MINOR_VERSION GREATER 4) - if(NOT MSVC) - enable_language(Fortran) - endif(NOT MSVC) - btl_add_bench(btl_f77 main.cpp dmxv.f smxv.f dmxm.f smxm.f daxpy.f saxpy.f data.f sata.f daat.f saat.f OFF) -endif(CMAKE_MINOR_VERSION GREATER 4) \ No newline at end of file diff --git a/bench/btl/libs/f77/daat.f b/bench/btl/libs/f77/daat.f deleted file mode 100644 index a50329a66..000000000 --- a/bench/btl/libs/f77/daat.f +++ /dev/null @@ -1,14 +0,0 @@ - SUBROUTINE DAAT(A,X,N) -** -** X = AT * A - REAL*8 A(N,N),X(N,N),R - DO 20 I=1,N - DO 20 J=1,N - R=0. - DO 10 K=1,N - R=R+A(I,K)*A(J,K) - 10 CONTINUE - X(I,J)=R - 20 CONTINUE - RETURN - END diff --git a/bench/btl/libs/f77/data.f b/bench/btl/libs/f77/data.f deleted file mode 100644 index 709211ca5..000000000 --- a/bench/btl/libs/f77/data.f +++ /dev/null @@ -1,14 +0,0 @@ - SUBROUTINE DATA(A,X,N) -** -** X = AT * A - REAL*8 A(N,N),X(N,N),R - DO 20 I=1,N - DO 20 J=1,N - R=0. - DO 10 K=1,N - R=R+A(K,I)*A(K,J) - 10 CONTINUE - X(I,J)=R - 20 CONTINUE - RETURN - END diff --git a/bench/btl/libs/f77/daxpy.f b/bench/btl/libs/f77/daxpy.f deleted file mode 100644 index 29514a222..000000000 --- a/bench/btl/libs/f77/daxpy.f +++ /dev/null @@ -1,18 +0,0 @@ - SUBROUTINE DAXPYF(N,A,X,Y) -** *************************************** -** CALCULE Y = Y + A*X -** *************************************** -*>N NOMBRE D'OPERATIONS A FAIRE -*>A CONSTANTE MULTIPLICATIVE -*>X TABLEAU -*=Y TABLEAU DES RESULTATS -*A R. SANCHEZ ( EARLY WINTER 1987 ) -*V M.F. ROBEAU - REAL*8 X(1),Y(1) - REAL*8 A - DO 10 I=1,N - Y(I)=Y(I)+A*X(I) - 10 CONTINUE - RETURN - END - diff --git a/bench/btl/libs/f77/dmxm.f b/bench/btl/libs/f77/dmxm.f deleted file mode 100644 index eb7ef9006..000000000 --- a/bench/btl/libs/f77/dmxm.f +++ /dev/null @@ -1,32 +0,0 @@ - SUBROUTINE DMXM(A,N,B,M,C,L) -** -** C = A * B -** A ET B MATRICES A(N,M) B(M,L) ==> C(N,L) -** -*>A PREMIERE MATRICE -*>N PREMIERE DIMENSION DE A ET DE C -*>B DEUXIEME MATRICE -*>M DEUXIEME DIMENSION DE A ET PERMIERE DE B -*L DEUXIEME DIMENSION DE B ET DE C -*A R. SANCHEZ ( EARLY WINTER 1987 ) -*V M.F. ROBEAU -*M AM BAUDRON - AVRIL 94 -*: ERREUR DANS L'APPEL A L'UTILITAIRE SGEMM -*: APPEL A L'UTILITAIRE SGEMM DE LA LIBRAIRIE BLAS SUR HP -*M AM BAUDRON - NOVEMBRE 1991 -*: ERREUR ( SOMME SUR LES TERMES PAS FAITE ) -*: APPEL A L'UTILITAIRE SGEMM DE LA LIBRAIRIE BLAS SUR RISC -*M AM BAUDRON - MAI 1993 -*: CHANGEMENT DES %IF LOCAL SUN MIPS SUITE A INTRODUCTION VERSION IBM - REAL*8 A(N,M),B(M,L),C(N,L),R - DO 20 I=1,N - DO 20 J=1,L - R=0. - DO 10 K=1,M - R=R+A(I,K)*B(K,J) - 10 CONTINUE - C(I,J)=R - 20 CONTINUE - RETURN - END diff --git a/bench/btl/libs/f77/dmxm.f.mfr b/bench/btl/libs/f77/dmxm.f.mfr deleted file mode 100644 index 82ccac9a5..000000000 --- a/bench/btl/libs/f77/dmxm.f.mfr +++ /dev/null @@ -1,36 +0,0 @@ - - SUBROUTINE DMXM(A,N,B,M,C,L) -** -** C = A * B -** A ET B MATRICES A(N,M) B(M,L) ==> C(N,L) -** -*>A PREMIERE MATRICE -*>N PREMIERE DIMENSION DE A ET DE C -*>B DEUXIEME MATRICE -*>M DEUXIEME DIMENSION DE A ET PERMIERE DE B -*L DEUXIEME DIMENSION DE B ET DE C -*A R. SANCHEZ ( EARLY WINTER 1987 ) -*V M.F. ROBEAU -*M AM BAUDRON - AVRIL 94 -*: ERREUR DANS L'APPEL A L'UTILITAIRE SGEMM -*: APPEL A L'UTILITAIRE SGEMM DE LA LIBRAIRIE BLAS SUR HP -*M AM BAUDRON - NOVEMBRE 1991 -*: ERREUR ( SOMME SUR LES TERMES PAS FAITE ) -*: APPEL A L'UTILITAIRE SGEMM DE LA LIBRAIRIE BLAS SUR RISC -*M AM BAUDRON - MAI 1993 -*: CHANGEMENT DES %IF LOCAL SUN MIPS SUITE A INTRODUCTION VERSION IBM - REAL*8 A(N,M),B(M,L),C(N,L),R - DO 5 J=1,L - DO 5 I=1,N - C(I,J)=0. - 5 CONTINUE - DO 10 K=1,M - DO 20 J=1,L - R=B(K,J) - DO 20 I=1,N - C(I,J)=C(I,J)+A(I,K)*R - 20 CONTINUE - 10 CONTINUE - RETURN - END diff --git a/bench/btl/libs/f77/dmxv.f b/bench/btl/libs/f77/dmxv.f deleted file mode 100644 index bd7e4d550..000000000 --- a/bench/btl/libs/f77/dmxv.f +++ /dev/null @@ -1,39 +0,0 @@ - SUBROUTINE DMXV(A,N,X,M,R) -C -** -** VERSION DOUBLE PRECISION DE MXV -** R = A * X -** A MATRICE A(N,M) -** R ET X VECTEURS -** -*>A PREMIERE MATRICE -*>N PREMIERE DIMENSION DE A -*>X VECTEUR -*>M DEUXIEME DIMENSION DE A -* -// Copyright (C) EDF R&D, lun sep 30 14:23:24 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 F77_INTERFACE_HH -#define F77_INTERFACE_HH -#include "f77_interface_base.hh" -#include - -extern "C" -{ - void dmxv_(double * A, int * N, double * X, int * M, double *R); - void smxv_(float * A, int * N, float * X, int * M, float *R); - - void dmxm_(double * A, int * N, double * B, int * M, double *C, int * K); - void smxm_(float * A, int * N, float * B, int * M, float *C, int * K); - - void data_(double * A, double *X, int * N); - void sata_(float * A, float *X, int * N); - - void daat_(double * A, double *X, int * N); - void saat_(float * A, float *X, int * N); - - void saxpyf_(int * N, float * coef, float * X, float *Y); - void daxpyf_(int * N, double * coef, double * X, double *Y); -} - -template -class f77_interface : public f77_interface_base -{ -public : - - typedef typename f77_interface_base::gene_matrix gene_matrix; - typedef typename f77_interface_base::gene_vector gene_vector; - - static inline std::string name( void ) - { - return "f77"; - } - - static inline void matrix_vector_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N) - { - dmxv_(A,&N,B,&N,X); - } - - static inline void matrix_matrix_product(gene_matrix & A, gene_matrix & B, gene_matrix & X, int N) - { - dmxm_(A,&N,B,&N,X,&N); - } - - static inline void ata_product(gene_matrix & A, gene_matrix & X, int N) - { - data_(A,X,&N); - } - - static inline void aat_product(gene_matrix & A, gene_matrix & X, int N) - { - daat_(A,X,&N); - } - - static inline void axpy(real coef, const gene_vector & X, gene_vector & Y, int N) - { - int one=1; - daxpyf_(&N,&coef,X,Y); - } - - -}; - - -template<> -class f77_interface : public f77_interface_base -{ -public : - - static inline std::string name( void ) - { - return "F77"; - } - - - static inline void matrix_vector_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N) - { - smxv_(A,&N,B,&N,X); - } - - static inline void matrix_matrix_product(gene_matrix & A, gene_matrix & B, gene_matrix & X, int N) - { - smxm_(A,&N,B,&N,X,&N); - } - - static inline void ata_product(gene_matrix & A, gene_matrix & X, int N) - { - sata_(A,X,&N); - } - - static inline void aat_product(gene_matrix & A, gene_matrix & X, int N) - { - saat_(A,X,&N); - } - - - static inline void axpy(float coef, const gene_vector & X, gene_vector & Y, int N) - { - saxpyf_(&N,&coef,X,Y); - } - -}; - - -#endif - - - diff --git a/bench/btl/libs/f77/f77_interface_base.hh b/bench/btl/libs/f77/f77_interface_base.hh deleted file mode 100644 index ab8a18295..000000000 --- a/bench/btl/libs/f77/f77_interface_base.hh +++ /dev/null @@ -1,91 +0,0 @@ -//===================================================== -// File : f77_interface_base.hh -// Author : L. Plagne -// Copyright (C) EDF R&D, lun sep 30 14:23:25 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 F77_INTERFACE_BASE_HH -#define F77_INTERFACE_BASE_HH - -#include "utilities.h" -#include -template -class f77_interface_base{ - -public: - - typedef real real_type ; - typedef std::vector stl_vector; - typedef std::vector stl_matrix; - - typedef real * gene_matrix; - typedef real * gene_vector; - - static void free_matrix(gene_matrix & A, int N){ - delete A; - } - - static void free_vector(gene_vector & B){ - delete B; - } - - static inline void matrix_from_stl(gene_matrix & A, stl_matrix & A_stl){ - int N = A_stl.size(); - A = new real[N*N]; - for (int j=0;j -// Copyright (C) EDF R&D, lun sep 30 14:23:25 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 "f77_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" - -BTL_MAIN; - -int main() -{ - bench > >(MIN_AXPY,MAX_AXPY,NB_POINT); - - bench > >(MIN_MV,MAX_MV,NB_POINT); - - bench > >(MIN_MM,MAX_MM,NB_POINT); - - bench > >(MIN_MM,MAX_MM,NB_POINT); - - bench > >(MIN_MM,MAX_MM,NB_POINT); - - return 0; -} - - diff --git a/bench/btl/libs/f77/saat.f b/bench/btl/libs/f77/saat.f deleted file mode 100644 index 5d1855d2c..000000000 --- a/bench/btl/libs/f77/saat.f +++ /dev/null @@ -1,14 +0,0 @@ - SUBROUTINE SAAT(A,X,N) -** -** X = AT * A - REAL*4 A(N,N),X(N,N) - DO 20 I=1,N - DO 20 J=1,N - R=0. - DO 10 K=1,N - R=R+A(I,K)*A(J,K) - 10 CONTINUE - X(I,J)=R - 20 CONTINUE - RETURN - END diff --git a/bench/btl/libs/f77/sata.f b/bench/btl/libs/f77/sata.f deleted file mode 100644 index 3ab83d958..000000000 --- a/bench/btl/libs/f77/sata.f +++ /dev/null @@ -1,14 +0,0 @@ - SUBROUTINE SATA(A,X,N) -** -** X = AT * A - REAL*4 A(N,N),X(N,N) - DO 20 I=1,N - DO 20 J=1,N - R=0. - DO 10 K=1,N - R=R+A(K,I)*A(K,J) - 10 CONTINUE - X(I,J)=R - 20 CONTINUE - RETURN - END diff --git a/bench/btl/libs/f77/saxpy.f b/bench/btl/libs/f77/saxpy.f deleted file mode 100644 index d0f74fd70..000000000 --- a/bench/btl/libs/f77/saxpy.f +++ /dev/null @@ -1,16 +0,0 @@ - SUBROUTINE SAXPYF(N,A,X,Y) -** *************************************** -** CALCULE Y = Y + A*X -** *************************************** -*>N NOMBRE D'OPERATIONS A FAIRE -*>A CONSTANTE MULTIPLICATIVE -*>X TABLEAU -*=Y TABLEAU DES RESULTATS -*A R. SANCHEZ ( EARLY WINTER 1987 ) -*V M.F. ROBEAU - DIMENSION X(1),Y(1) - DO 10 I=1,N - Y(I)=Y(I)+A*X(I) - 10 CONTINUE - RETURN - END diff --git a/bench/btl/libs/f77/smxm.f b/bench/btl/libs/f77/smxm.f deleted file mode 100644 index a1e63adca..000000000 --- a/bench/btl/libs/f77/smxm.f +++ /dev/null @@ -1,32 +0,0 @@ - SUBROUTINE SMXM(A,N,B,M,C,L) -** -** C = A * B -** A ET B MATRICES A(N,M) B(M,L) ==> C(N,L) -** -*>A PREMIERE MATRICE -*>N PREMIERE DIMENSION DE A ET DE C -*>B DEUXIEME MATRICE -*>M DEUXIEME DIMENSION DE A ET PERMIERE DE B -*L DEUXIEME DIMENSION DE B ET DE C -*A R. SANCHEZ ( EARLY WINTER 1987 ) -*V M.F. ROBEAU -*M AM BAUDRON - AVRIL 94 -*: ERREUR DANS L'APPEL A L'UTILITAIRE SGEMM -*: APPEL A L'UTILITAIRE SGEMM DE LA LIBRAIRIE BLAS SUR HP -*M AM BAUDRON - NOVEMBRE 1991 -*: ERREUR ( SOMME SUR LES TERMES PAS FAITE ) -*: APPEL A L'UTILITAIRE SGEMM DE LA LIBRAIRIE BLAS SUR RISC -*M AM BAUDRON - MAI 1993 -*: CHANGEMENT DES %IF LOCAL SUN MIPS SUITE A INTRODUCTION VERSION IBM - DIMENSION A(N,M),B(M,L),C(N,L) - DO 20 I=1,N - DO 20 J=1,L - R=0. - DO 10 K=1,M - R=R+A(I,K)*B(K,J) - 10 CONTINUE - C(I,J)=R - 20 CONTINUE - RETURN - END diff --git a/bench/btl/libs/f77/smxv.f b/bench/btl/libs/f77/smxv.f deleted file mode 100644 index d2f7ed24e..000000000 --- a/bench/btl/libs/f77/smxv.f +++ /dev/null @@ -1,38 +0,0 @@ - SUBROUTINE SMXV(A,N,X,M,R) -C -** -** VERSION DOUBLE PRECISION DE MXV -** R = A * X -** A MATRICE A(N,M) -** R ET X VECTEURS -** -*>A PREMIERE MATRICE -*>N PREMIERE DIMENSION DE A -*>X VECTEUR -*>M DEUXIEME DIMENSION DE A -* -// Copyright (C) EDF R&D, lun sep 30 14:23:25 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 TEST_INTERFACE_HH -#define TEST_INTERFACE_HH - -template< class Interface > -void test_interface( void ){ - - Interface::interface_name(); - - typename Interface::gene_matrix A; - - - - - -} - -#endif diff --git a/bench/btl/libs/hand_vec/CMakeLists.txt b/bench/btl/libs/hand_vec/CMakeLists.txt deleted file mode 100644 index 3fffbfe8a..000000000 --- a/bench/btl/libs/hand_vec/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -find_package(Eigen2) -if (EIGEN2_FOUND) - - include_directories(${EIGEN2_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/libs/f77) - btl_add_bench(btl_hand_vec main.cpp OFF) - - btl_add_bench(btl_hand_peeling main.cpp OFF) - if (BUILD_btl_hand_peeling) - set_target_properties(btl_hand_peeling PROPERTIES COMPILE_FLAGS "-DPEELING") - endif (BUILD_btl_hand_peeling) - -endif (EIGEN2_FOUND) \ No newline at end of file diff --git a/bench/btl/libs/hand_vec/hand_vec_interface.hh b/bench/btl/libs/hand_vec/hand_vec_interface.hh deleted file mode 100755 index 0bb4b64ca..000000000 --- a/bench/btl/libs/hand_vec/hand_vec_interface.hh +++ /dev/null @@ -1,886 +0,0 @@ -//===================================================== -// File : hand_vec_interface.hh -// Copyright (C) 2008 Gael Guennebaud -//===================================================== -// -// 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 HAND_VEC_INTERFACE_HH -#define HAND_VEC_INTERFACE_HH - -#include -#include "f77_interface.hh" - -using namespace Eigen; - -template -class hand_vec_interface : public f77_interface_base { - -public : - - typedef typename internal::packet_traits::type Packet; - static const int PacketSize = internal::packet_traits::size; - - typedef typename f77_interface_base::stl_matrix stl_matrix; - typedef typename f77_interface_base::stl_vector stl_vector; - typedef typename f77_interface_base::gene_matrix gene_matrix; - typedef typename f77_interface_base::gene_vector gene_vector; - - static void free_matrix(gene_matrix & A, int N){ - internal::aligned_free(A); - } - - static void free_vector(gene_vector & B){ - internal::aligned_free(B); - } - - static inline void matrix_from_stl(gene_matrix & A, stl_matrix & A_stl){ - int N = A_stl.size(); - A = (real*)internal::aligned_malloc(N*N*sizeof(real)); - for (int j=0;j0) - { -// for (size_t j = 0;j0) - { - bool aligned0 = (iN0 % PacketSize) == 0; - if (aligned0) - for (int j = 0;j0) -// { -// // int aligned0 = (iN0 % PacketSize); -// int aligned1 = (iN1 % PacketSize); -// -// if (aligned1==0) -// { -// for (int j = 0;j0) -// { -// bool aligned0 = (iN0 % PacketSize) == 0; -// if (aligned0) -// for (int j = 0;j0) -// { -// bool aligned0 = (iN0 % PacketSize) == 0; -// bool aligned1 = (iN1 % PacketSize) == 0; -// -// if (aligned0 && aligned1) -// { -// for (int j = 0;j0) -// { -// bool aligned0 = (iN0 % PacketSize) == 0; -// if (aligned0) -// for (int j = 0;j0) -// { -// bool aligned = (iN % PacketSize) == 0; -// if (aligned) -// { -// #ifdef PEELING -// Packet A0, A1, A2, X0, X1, X2; -// int ANP = (AN/(8*PacketSize))*8*PacketSize; -// for (int j = 0;j0) - { - int align1 = (iN1 % PacketSize); - if (align1==0) - { - for (int j = 0;j0) - { - if (iN0 % PacketSize==0) - for (int j = 0;j0) -// { -// bool aligned = (iN % PacketSize) == 0; -// if (aligned) -// { -// #ifdef PEELING -// int ANP = (AN/(8*PacketSize))*8*PacketSize; -// for (int j = 0;j0) - { - Packet pcoef = internal::pset1(coef); - #ifdef PEELING - const int peelSize = 3; - int ANP = (AN/(peelSize*PacketSize))*peelSize*PacketSize; - float* X1 = X + PacketSize; - float* Y1 = Y + PacketSize; - float* X2 = X + 2*PacketSize; - float* Y2 = Y + 2*PacketSize; - Packet x0,x1,x2,y0,y1,y2; - for (int j = 0;j -// Copyright (C) EDF R&D, lun sep 30 14:23:23 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 "bench.hh" -#include "hand_vec_interface.hh" -#include "action_matrix_vector_product.hh" -#include "action_atv_product.hh" -#include "action_matrix_matrix_product.hh" -#include "action_axpy.hh" -#include "action_ata_product.hh" -#include "action_aat_product.hh" -#include "basic_actions.hh" -//#include "action_lu_solve.hh" -// #include "timers/mixed_perf_analyzer.hh" - -BTL_MAIN; - -int main() -{ - - bench > >(MIN_MV,MAX_MV,NB_POINT); - bench > >(MIN_MV,MAX_MV,NB_POINT); -// bench > >(MIN_MM,MAX_MM,NB_POINT); -// bench > >(MIN_MM,MAX_MM,NB_POINT); -// bench > >(MIN_MM,MAX_MM,NB_POINT); - bench > >(MIN_MM,MAX_MM,NB_POINT); - bench > >(MIN_AXPY,MAX_AXPY,NB_POINT); - - - return 0; -} - - -- cgit v1.2.3