Skip to content
Snippets Groups Projects
Commit 15774221 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

[!310] Change scaling of autotune results

Merge branch 'experiments/autotune' into 'master'

ref:extensions/dune-codegen The scaling of the autotune results was bugged.

See merge request [extensions/dune-codegen!310]

  [extensions/dune-codegen!310]: gitlab.dune-project.org/extensions/dune-codegen/merge_requests/310
parents 03d54df6 5bd4dd46
No related branches found
No related tags found
No related merge requests found
......@@ -167,7 +167,8 @@ def generate_standalone_code(sf, filename):
])
# Add the implementation of the kernel.
f.write(" for(int i=0; i<{}; ++i)\n".format(int(1e9 / sf.operations)))
repeats = int(1e9 / sf.operations)
f.write(" for(int i=0; i<{}; ++i)\n".format(repeats))
f.write(" {\n")
for line in knl.member.lines[1:]:
f.write(" {}\n".format(line))
......@@ -177,7 +178,7 @@ def generate_standalone_code(sf, filename):
f.writelines([" auto stop = Dune::PDELab::TSC::stop();\n",
" std::ofstream file;\n",
" file.open(argv[1]);\n",
" file << Dune::PDELab::TSC::elapsed(start, stop) << std::endl;\n",
" file << Dune::PDELab::TSC::elapsed(start, stop) / {} << std::endl;\n".format(str(float(repeats))),
" file.close();\n",
" accum += output[dis(rng)];\n",
" std::cout << accum;\n",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment