6 #include "eigen_src/Eigen/Core" 7 #include "../BenchTimer.h" 11 #error SCALAR must be defined 19 template<
typename Func>
32 double up = 1e8/
sizeof(
Scalar);
33 double tm0 = 4, tm1 = 10;
41 double flops = 2. * m *
n;
45 BENCH(t, tries, rep,
f(A,B,C));
47 return 1
e-9 * rep * flops / t.
best();
50 template<
typename Func>
55 std::string
filename = std::string(
"gemv_settings.txt");
57 filename = std::string(argv[1]);
58 std::ifstream settings(filename);
60 while(settings >> m >> n)
63 results.push_back(
bench(m, n, f) );
66 std::cout << RowVectorXd::Map(results.data(), results.size());
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
Namespace containing all symbols from the Eigen library.
Matrix< Scalar, Dynamic, Dynamic > Mat
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
#define EIGEN_DONT_INLINE
double best(int TIMER=CPU_TIMER) const
int main_gemv(int argc, char **argv, Func &f)
EIGEN_DONT_INLINE double bench(long m, long n, Func &f)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Matrix< Scalar, Dynamic, Dynamic > C
Matrix< Scalar, Dynamic, 1 > Vec
std::map< std::string, Array< float, 1, 8, DontAlign|RowMajor > > results
#define BENCH(TIMER, TRIES, REP, CODE)
Derived & setRandom(Index size)