bench_sum.cpp
Go to the documentation of this file.
00001 #include <iostream>
00002 #include <Eigen/Core>
00003 using namespace Eigen;
00004 using namespace std;
00005 
00006 int main() 
00007 {
00008   typedef Matrix<SCALAR,Eigen::Dynamic,1> Vec;
00009   Vec v(SIZE);
00010   v.setZero();
00011   v[0] = 1;
00012   v[1] = 2;
00013   for(int i = 0; i < 1000000; i++)
00014   {
00015     v.coeffRef(0) += v.sum() * SCALAR(1e-20);
00016   }
00017   cout << v.sum() << endl;
00018 }


libicr
Author(s): Robert Krug
autogenerated on Mon Jan 6 2014 11:32:30