2 #ifndef EIGEN_BENCH_BASICBENCH_H 3 #define EIGEN_BENCH_BASICBENCH_H 7 template<
int Mode,
typename MatrixType>
10 template<
int Mode,
typename MatrixType>
13 for(
int a = 0;
a < iterations;
a++)
17 asm(
"#begin_bench_loop LazyEval");
18 if (MatrixType::SizeAtCompileTime!=
Eigen::Dynamic)
asm(
"#fixedsize");
19 m = (I + 0.00005 * (m + m.lazyProduct(m))).eval();
23 asm(
"#begin_bench_loop OmpEval");
24 if (MatrixType::SizeAtCompileTime!=
Eigen::Dynamic)
asm(
"#fixedsize");
25 m = (I + 0.00005 * (m + m.lazyProduct(m))).eval();
29 asm(
"#begin_bench_loop EarlyEval");
30 if (MatrixType::SizeAtCompileTime!=
Eigen::Dynamic)
asm(
"#fixedsize");
31 m = I + 0.00005 * (m + m *
m);
33 asm(
"#end_bench_loop");
37 template<
int Mode,
typename MatrixType>
40 template<
int Mode,
typename MatrixType>
43 const int rows = mat.rows();
44 const int cols = mat.cols();
52 for(uint
t=0;
t<tries; ++
t)
56 benchBasic_loop<Mode>(
I,
m, iterations);
63 #endif // EIGEN_BENCH_BASICBENCH_H
void benchBasic_loop(const MatrixType &I, MatrixType &m, int iterations) __attribute__((noinline))
double value(int TIMER=CPU_TIMER) const
svint32_t PacketXi __attribute__((arm_sve_vector_bits(EIGEN_ARM64_SVE_VL)))
void initMatrix_random(MatrixType &mat) __attribute__((noinline))
void initMatrix_identity(MatrixType &mat) __attribute__((noinline))
double benchBasic(const MatrixType &mat, int size, int tries) __attribute__((noinline))