diff options
Diffstat (limited to 'eigen/bench/benchmark.cpp')
-rw-r--r-- | eigen/bench/benchmark.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/eigen/bench/benchmark.cpp b/eigen/bench/benchmark.cpp deleted file mode 100644 index c721b90..0000000 --- a/eigen/bench/benchmark.cpp +++ /dev/null @@ -1,39 +0,0 @@ -// g++ -O3 -DNDEBUG -DMATSIZE=<x> benchmark.cpp -o benchmark && time ./benchmark - -#include <iostream> - -#include <Eigen/Core> - -#ifndef MATSIZE -#define MATSIZE 3 -#endif - -using namespace std; -using namespace Eigen; - -#ifndef REPEAT -#define REPEAT 40000000 -#endif - -#ifndef SCALAR -#define SCALAR double -#endif - -int main(int argc, char *argv[]) -{ - Matrix<SCALAR,MATSIZE,MATSIZE> I = Matrix<SCALAR,MATSIZE,MATSIZE>::Ones(); - Matrix<SCALAR,MATSIZE,MATSIZE> m; - for(int i = 0; i < MATSIZE; i++) - for(int j = 0; j < MATSIZE; j++) - { - m(i,j) = (i+MATSIZE*j); - } - asm("#begin"); - for(int a = 0; a < REPEAT; a++) - { - m = Matrix<SCALAR,MATSIZE,MATSIZE>::Ones() + 0.00005 * (m + (m*m)); - } - asm("#end"); - cout << m << endl; - return 0; -} |