Skip to content
Snippets Groups Projects
Commit 43e5bcd4 authored by René Heß's avatar René Heß
Browse files

[Fix] Turn off opcountar again

parent 2fe70f8a
No related branches found
No related tags found
No related merge requests found
......@@ -176,6 +176,10 @@ def write_setup_code(sf, filename, define_thetas=True):
def generate_standalone_code_google_benchmark(sf, filename):
delete_cache_items("kernel_default")
# Turn off opcounting
opcounting = get_option("opcounter")
set_option("opcounter", False)
# Extract sum factorization kernel
from dune.codegen.pdelab.localoperator import extract_kernel_from_cache
knl = realize_sumfact_kernel_function(sf)
......@@ -185,10 +189,6 @@ def generate_standalone_code_google_benchmark(sf, filename):
first_line = knl.member.lines[0]
arguments = first_line[first_line.find("(") + 1:first_line.find(")")]
# Turn off opcounting
opcounting = get_option("opcounter")
set_option("opcounter", False)
with open(filename, "w") as f:
f.writelines(["// {}".format(first_line),
"\n",
......@@ -241,15 +241,15 @@ def generate_standalone_code_google_benchmark(sf, filename):
def generate_standalone_code(sf, filename):
delete_cache_items("kernel_default")
# Turn off opcounting
opcounting = get_option("opcounter")
set_option("opcounter", False)
# Extract sum factorization kernel
from dune.codegen.pdelab.localoperator import extract_kernel_from_cache
knl = realize_sumfact_kernel_function(sf)
first_line = knl.member.lines[0]
# Turn off opcounting
opcounting = get_option("opcounter")
set_option("opcounter", False)
with open(filename, "w") as f:
f.writelines(["// {}".format(first_line),
"\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