Skip to content
Snippets Groups Projects
Commit 293974ea authored by Marcel Koch's avatar Marcel Koch
Browse files

adjusts evaluate_coefficient* to changes in get_pymbolic_indices and nested basis loops

parent 7308527b
No related branches found
No related tags found
No related merge requests found
......@@ -170,14 +170,13 @@ def evaluate_coefficient(visitor, element, name, container, restriction, index):
lfs = name_lfs(element, restriction, index)
basis = visitor.interface.pymbolic_basis(sub_element, restriction, 0, context='trial')
basisindex, _ = get_pymbolic_indices(basis)
basisindex = get_pymbolic_indices(basis)[:-1]
if get_option("blockstructured"):
from dune.perftool.blockstructured.argument import pymbolic_coefficient
coeff = pymbolic_coefficient(container, lfs, sub_element, basisindex)
else:
from dune.perftool.pdelab.argument import pymbolic_coefficient
coeff = pymbolic_coefficient(container, lfs, basisindex)
coeff = pymbolic_coefficient(container, lfs, basisindex[0])
assignee = Variable(name)
......@@ -207,7 +206,7 @@ def evaluate_coefficient_gradient(visitor, element, name, container, restriction
lfs = name_lfs(element, restriction, index)
basis = visitor.interface.pymbolic_reference_gradient(sub_element, restriction, 0, context='trialgrad')
basisindex, _ = get_pymbolic_indices(basis)
basisindex = get_pymbolic_indices(basis)[:-1]
from dune.perftool.tools import maybe_wrap_subscript
basis = maybe_wrap_subscript(basis, Variable(dimindex))
......@@ -216,7 +215,7 @@ def evaluate_coefficient_gradient(visitor, element, name, container, restriction
coeff = pymbolic_coefficient(container, lfs, sub_element, basisindex)
else:
from dune.perftool.pdelab.argument import pymbolic_coefficient
coeff = pymbolic_coefficient(container, lfs, basisindex)
coeff = pymbolic_coefficient(container, lfs, basisindex[0])
assignee = Subscript(Variable(name), (Variable(dimindex),))
......
......@@ -247,7 +247,7 @@ def determine_accumulation_space(info, number):
if get_option("blockstructured"):
from dune.perftool.blockstructured.tools import micro_index_to_macro_index
from dune.perftool.blockstructured.spaces import lfs_inames
lfsi = micro_index_to_macro_index(subel, lfs_inames(subel, info.restriction, count=number)[0])
lfsi = micro_index_to_macro_index(subel, lfs_inames(subel, info.restriction, count=number))
else:
from dune.perftool.pdelab.spaces import lfs_inames
lfsi = Variable(lfs_iname(subel, info.restriction, count=number))
......@@ -551,6 +551,8 @@ def extract_kernel_from_cache(tag, wrap_in_cgen=True):
from dune.perftool.loopy import heuristic_duplication
kernel = heuristic_duplication(kernel)
from dune.perftool.blockstructured.vectorization import vectorize_micro_elements
kernel = vectorize_micro_elements(kernel)
# Maybe apply vectorization strategies
if get_option("vectorization_quadloop"):
if get_option("sumfact"):
......@@ -569,6 +571,7 @@ def extract_kernel_from_cache(tag, wrap_in_cgen=True):
# Do the loopy preprocessing!
kernel = preprocess_kernel(kernel)
# *REALLY* ignore boostability. This is - so far - necessary due to a mystery bug.
kernel = kernel.copy(instructions=[i.copy(boostable=False, boostable_into=frozenset()) for i in kernel.instructions])
......
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