From 647a817b2e352ae8f3599ba393d344f83d3b416e Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Thu, 20 Dec 2007 21:11:05 +0000 Subject: more documentation and examples, add Doxyfile and Mainpage.dox and also the benchmark program --- doc/benchmark.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/benchmark.cpp (limited to 'doc/benchmark.cpp') diff --git a/doc/benchmark.cpp b/doc/benchmark.cpp new file mode 100644 index 000000000..ae2a52e9c --- /dev/null +++ b/doc/benchmark.cpp @@ -0,0 +1,23 @@ +// g++ -O3 -DNDEBUG benchmark.cpp -o benchmark && time ./benchmark + +#include "src/Core.h" + +using namespace std; +USING_EIGEN_DATA_TYPES + +int main(int argc, char *argv[]) +{ + Matrix3d I; + Matrix3d m; + for(int i = 0; i < 3; i++) for(int j = 0; j < 3; j++) + { + I(i,j) = (i==j); + m(i,j) = (i+3*j); + } + for(int a = 0; a < 100000000; a++) + { + m = I + 0.00005 * (m + m*m); + } + cout << m << endl; + return 0; +} -- cgit v1.2.3