* basic support for multicore CPU via a .evalOMP() which

internaly uses OpenMP if enabled at compile time.
 * added a bench/ folder with a couple benchmarks and benchmark tools.
This commit is contained in:
Gael Guennebaud
2008-03-09 16:13:47 +00:00
parent f64311e07d
commit 9d9d81ad71
18 changed files with 514 additions and 2 deletions

22
bench/benchmarkX.cpp Normal file
View File

@@ -0,0 +1,22 @@
// g++ -O3 -DNDEBUG benchmarkX.cpp -o benchmarkX && time ./benchmarkX
#include <Eigen/Core>
using namespace std;
USING_PART_OF_NAMESPACE_EIGEN
int main(int argc, char *argv[])
{
MatrixXd I = MatrixXd::identity(20,20);
MatrixXd m(20,20);
for(int i = 0; i < 20; i++) for(int j = 0; j < 20; j++)
{
m(i,j) = 0.1 * (i+20*j);
}
for(int a = 0; a < 100000; a++)
{
m = I + 0.00005 * (m + m*m);
}
cout << m << endl;
return 0;
}