5 #include "../../BenchTimer.h" 9 #error SCALAR must be defined 34 double up = 1e8*4/
sizeof(
Scalar);
35 double tm0 = 4, tm1 = 10;
43 double flops = 2. * m * n * k;
49 return 1
e-9 * rep * flops / t.
best();
52 int main(
int argc,
char **argv)
56 std::ifstream settings(
"gemm_settings.txt");
58 while(settings >> m >> n >> k)
61 results.push_back(
bench(m, n, k) );
64 std::cout << RowVectorXd::Map(results.data(), results.size());
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
Namespace containing all symbols from the Eigen library.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
Matrix< SCALARB, Dynamic, Dynamic > B
#define EIGEN_DONT_INLINE
int main(int argc, char **argv)
EIGEN_DONT_INLINE double bench(long m, long n, long k)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Matrix< Scalar, Dynamic, Dynamic > Mat
Matrix< Scalar, Dynamic, Dynamic > C
double best(int TIMER=CPU_TIMER) const
std::map< std::string, Array< float, 1, 8, DontAlign|RowMajor > > results
EIGEN_DONT_INLINE void gemm(const Mat &A, const Mat &B, Mat &C)
#define BENCH(TIMER, TRIES, REP, CODE)
Derived & setRandom(Index size)