MCPcopy Create free account
hub / github.com/Derious/cuMPC / benchBasic_loop

Function benchBasic_loop

dependence/eigen-3.4.0/bench/basicbenchmark.h:11–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
10template<int Mode, typename MatrixType>
11void benchBasic_loop(const MatrixType& I, MatrixType& m, int iterations)
12{
13 for(int a = 0; a < iterations; a++)
14 {
15 if (Mode==LazyEval)
16 {
17 asm("#begin_bench_loop LazyEval");
18 if (MatrixType::SizeAtCompileTime!=Eigen::Dynamic) asm("#fixedsize");
19 m = (I + 0.00005 * (m + m.lazyProduct(m))).eval();
20 }
21 else if (Mode==OmpEval)
22 {
23 asm("#begin_bench_loop OmpEval");
24 if (MatrixType::SizeAtCompileTime!=Eigen::Dynamic) asm("#fixedsize");
25 m = (I + 0.00005 * (m + m.lazyProduct(m))).eval();
26 }
27 else
28 {
29 asm("#begin_bench_loop EarlyEval");
30 if (MatrixType::SizeAtCompileTime!=Eigen::Dynamic) asm("#fixedsize");
31 m = I + 0.00005 * (m + m * m);
32 }
33 asm("#end_bench_loop");
34 }
35}
36
37template<int Mode, typename MatrixType>
38double benchBasic(const MatrixType& mat, int size, int tries) __attribute__((noinline));

Callers

nothing calls this directly

Calls 2

lazyProductMethod · 0.80
evalMethod · 0.45

Tested by

no test coverage detected