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

Clean up code and use old version for gradvec

Note: sumfact_poisson_fastdg_gradvec_nonquadvec does not work!
parent d21c936f
No related branches found
No related tags found
No related merge requests found
...@@ -93,7 +93,8 @@ def pymbolic_trialfunction_gradient(element, restriction, component, visitor): ...@@ -93,7 +93,8 @@ def pymbolic_trialfunction_gradient(element, restriction, component, visitor):
if insn_dep is None: if insn_dep is None:
insn_dep = frozenset({Writes(inp)}) insn_dep = frozenset({Writes(inp)})
if get_option('fastdg'): # TODO: fastdg and vectorization
if get_option('fastdg') and index is not None:
# Name of direct input, shape and globalarg is set in sum_factorization_kernel # Name of direct input, shape and globalarg is set in sum_factorization_kernel
direct_input = name_coefficientcontainer(restriction) direct_input = name_coefficientcontainer(restriction)
else: else:
...@@ -161,9 +162,11 @@ def pymbolic_trialfunction(element, restriction, component, visitor): ...@@ -161,9 +162,11 @@ def pymbolic_trialfunction(element, restriction, component, visitor):
name=inp, name=inp,
) )
if get_option('fastdg'): # TODO: fastdg and vectorization
if get_option('fastdg') and index is not None:
# Name of direct input, shape and globalarg is set in sum_factorization_kernel # Name of direct input, shape and globalarg is set in sum_factorization_kernel
direct_input = name_coefficientcontainer(restriction) direct_input = name_coefficientcontainer(restriction)
setup_theta(inp, element, restriction, component, index)
else: else:
direct_input = None direct_input = None
# Setup the input! # Setup the input!
......
...@@ -362,7 +362,8 @@ def sum_factorization_kernel(a_matrices, ...@@ -362,7 +362,8 @@ def sum_factorization_kernel(a_matrices,
# this reinterprets the output of the previous iteration. # this reinterprets the output of the previous iteration.
inp_shape = (a_matrix.cols, product(mat.rows for mat in a_matrices[:l]) * product(mat.cols for mat in a_matrices[l + 1:])) inp_shape = (a_matrix.cols, product(mat.rows for mat in a_matrices[:l]) * product(mat.cols for mat in a_matrices[l + 1:]))
if l==0 and direct_input is not None: # TODO: fastdg and vectorization
if l==0 and direct_input is not None and not a_matrix.vectorized:
globalarg(direct_input, dtype=np.float64, shape=inp_shape) globalarg(direct_input, dtype=np.float64, shape=inp_shape)
inp = direct_input inp = direct_input
else: else:
......
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