Go to the documentation of this file.
5 #include "../../BenchTimer.h"
9 #error SCALAR must be defined
14 template<
typename MatA,
typename MatB,
typename MatC>
20 C.noalias() +=
A.lazyProduct(
B);
24 template<
int m,
int n,
int k,
int TA>
41 double up = 1e7*4/
sizeof(
Scalar);
42 double tm0 = 10, tm1 = 20;
44 double flops = 2. *
m *
n * k;
50 return 1
e-9 * rep * flops /
t.best();
53 template<
int m,
int n,
int k>
57 return bench<m,n,k,RowMajor>();
59 return bench<m,n,k,0>();
65 int id =
m*10000 +
n*100 + k;
67 case 10101 :
return bench_t< 1, 1, 1>(
t);
break;
68 case 20202 :
return bench_t< 2, 2, 2>(
t);
break;
69 case 30303 :
return bench_t< 3, 3, 3>(
t);
break;
70 case 40404 :
return bench_t< 4, 4, 4>(
t);
break;
71 case 50505 :
return bench_t< 5, 5, 5>(
t);
break;
72 case 60606 :
return bench_t< 6, 6, 6>(
t);
break;
73 case 70707 :
return bench_t< 7, 7, 7>(
t);
break;
74 case 80808 :
return bench_t< 8, 8, 8>(
t);
break;
75 case 90909 :
return bench_t< 9, 9, 9>(
t);
break;
76 case 101010 :
return bench_t<10,10,10>(
t);
break;
77 case 111111 :
return bench_t<11,11,11>(
t);
break;
78 case 121212 :
return bench_t<12,12,12>(
t);
break;
83 int main(
int argc,
char **argv)
87 std::string
filename = std::string(
"lazy_gemm_settings.txt");
92 while(settings >>
m >>
n >> k >>
t)
Namespace containing all symbols from the Eigen library.
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
Array< double, 1, 3 > e(1./3., 0.5, 2.)
EIGEN_DONT_INLINE void lazy_gemm(const MatA &A, const MatB &B, MatC &C)
EIGEN_DONT_INLINE double bench()
EIGEN_DONT_INLINE double bench_mnk(int m, int n, int k, int t)
int main(int argc, char **argv)
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
#define BENCH(TIMER, TRIES, REP, CODE)
Matrix< Scalar, Dynamic, Dynamic > C
std::map< std::string, Array< float, 1, 8, DontAlign|RowMajor > > results
The matrix class, also used for vectors and row-vectors.
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
#define EIGEN_DONT_INLINE
gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:33:04