21 #define MINDENSITY 0.0004 30 for (int _j=0; _j<NBTRIES; ++_j) { \ 32 for (int _k=0; _k<REPEAT; ++_k) { \ 36 int main(
int argc,
char *argv[])
55 std::cout <<
" Eigen dense:\t" << timer.
value() << endl;
59 std::cout <<
"Non zeros: " << sm1.nonZeros()/
float(sm1.rows()*sm1.cols())*100 <<
"%\n";
64 std::cout <<
" Eigen:\t" << timer.
value() << endl;
73 BENCH(
for (
int k=0; k<
REPEAT; ++k) { m3 = cs_transpose(m1,1); cs_spfree(m3);})
74 std::cout <<
" CSparse:\t" << timer.
value() << endl;
85 std::cout <<
" GMM:\t\t" << timer.
value() << endl;
95 std::cout <<
" MTL4:\t\t" << timer.
value() << endl;
Matrix< Scalar, Dynamic, Dynamic > DenseMatrix
void eiToMtl(const EigenSparseMatrix &src, MtlSparse &dst)
void eiToDense(const EigenSparseMatrix &src, DenseMatrix &dst)
TransposeReturnType transpose()
mtl::compressed2D< Scalar, mtl::matrix::parameters< mtl::tag::col_major > > MtlSparse
gmm::csc_matrix< Scalar > GmmSparse
void fillMatrix(float density, int rows, int cols, EigenSparseMatrix &dst)
double value(int TIMER=CPU_TIMER) const
int main(int argc, char *argv[])
gmm::col_matrix< gmm::wsvector< Scalar > > GmmDynSparse
int EIGEN_BLAS_FUNC() copy(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy)
void eiToGmm(const EigenSparseMatrix &src, GmmSparse &dst)