17 #include <unsupported/Eigen/SVD>
20 using namespace Eigen;
30 #define NUMBER_SAMPLE 2
33 template<
typename MatrixType>
42 cout <<
" Only compute Singular Values" <<endl;
60 cout <<
"Sample " << k <<
" : " <<
REPEAT <<
" computations : Jacobi : " << fixed << timerJacobi.
value() <<
"s ";
61 cout <<
" || " <<
" BDC : " << timerBDC.
value() <<
"s " <<endl <<endl;
64 cout <<
"KO : BDC is " << timerJacobi.
value() / timerBDC.
value() <<
" times faster than Jacobi" <<endl;
66 cout <<
"OK : BDC is " << timerJacobi.
value() / timerBDC.
value() <<
" times faster than Jacobi" <<endl;
69 cout <<
" =================" <<endl;
70 std::cout<< std::endl;
73 cout <<
" Computes rotation matrix" <<endl;
91 cout <<
"Sample " << k <<
" : " <<
REPEAT <<
" computations : Jacobi : " << fixed << timerJacobi.
value() <<
"s ";
92 cout <<
" || " <<
" BDC : " << timerBDC.
value() <<
"s " <<endl <<endl;
95 cout <<
"KO : BDC is " << timerJacobi.
value() / timerBDC.
value() <<
" times faster than Jacobi" <<endl;
97 cout <<
"OK : BDC is " << timerJacobi.
value() / timerBDC.
value() <<
" times faster than Jacobi" <<endl;
100 std::cout<< std::endl;
105 int main(
int argc,
char* argv[])
107 std::cout<< std::endl;
109 std::cout<<
"On a (Dynamic, Dynamic) (6, 6) Matrix" <<std::endl;
112 std::cout<<
"On a (Dynamic, Dynamic) (32, 32) Matrix" <<std::endl;
118 std::cout<<
"On a (Dynamic, Dynamic) (160, 160) Matrix" <<std::endl;
121 std::cout<<
"--------------------------------------------------------------------"<< std::endl;