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

Adjust perftool to new vectorclass.hh and add test

parent 6f014e5b
No related branches found
No related tags found
No related merge requests found
#ifndef DUNE_PERFTOOL_SUMFACT_TRANSPOSEREG_HH #ifndef DUNE_PERFTOOL_SUMFACT_TRANSPOSEREG_HH
#define DUNE_PERFTOOL_SUMFACT_TRANSPOSEREG_HH #define DUNE_PERFTOOL_SUMFACT_TRANSPOSEREG_HH
#include<dune/perftool/vectorclass/vectorclass.h> #include<dune/perftool/common/vectorclass.hh>
/** /**
* Transpose a 4x4 matrix given by 4 vector registers (efficiently) * Transpose a 4x4 matrix given by 4 vector registers (efficiently)
......
...@@ -10,7 +10,7 @@ from loopy import CallMangleInfo ...@@ -10,7 +10,7 @@ from loopy import CallMangleInfo
@function_mangler @function_mangler
def dune_math_manglers(kernel, name, arg_dtypes): def dune_math_manglers(kernel, name, arg_dtypes):
if name == "exp": if name == "exp":
include_file("dune/perftool/vectorclass/vectormath_exp.h", filetag="operatorfile") include_file("dune/perftool/common/vectorclass.hh", filetag="operatorfile")
return CallMangleInfo("exp", return CallMangleInfo("exp",
arg_dtypes, arg_dtypes,
arg_dtypes, arg_dtypes,
......
...@@ -75,7 +75,7 @@ class DuneExpressionToCExpressionMapper(ExpressionToCExpressionMapper): ...@@ -75,7 +75,7 @@ class DuneExpressionToCExpressionMapper(ExpressionToCExpressionMapper):
ret = ExpressionToCExpressionMapper.map_constant(self, expr, type_context) ret = ExpressionToCExpressionMapper.map_constant(self, expr, type_context)
if get_option('opcounter'): if get_option('opcounter'):
if type_context == "f": if type_context == "f":
_type = _type_to_op_counter_type('float') _type = _type_to_op_counter_type('double')
ret = Literal("{}({})".format(_type, ret.s)) ret = Literal("{}({})".format(_type, ret.s))
if type_context == "d": if type_context == "d":
_type = _type_to_op_counter_type('double') _type = _type_to_op_counter_type('double')
...@@ -182,7 +182,7 @@ class DuneTarget(TargetBase): ...@@ -182,7 +182,7 @@ class DuneTarget(TargetBase):
def dtype_to_typename(self, dtype): def dtype_to_typename(self, dtype):
if dtype.dtype.kind == "V": if dtype.dtype.kind == "V":
include_file("dune/perftool/vectorclass/vectorclass.h", filetag="operatorfile") include_file("dune/perftool/common/vectorclass.hh", filetag="operatorfile")
return VCLTypeRegistry.names[dtype.dtype] return VCLTypeRegistry.names[dtype.dtype]
else: else:
return numpy_to_cpp_dtype(dtype.dtype.name) return numpy_to_cpp_dtype(dtype.dtype.name)
......
...@@ -16,6 +16,11 @@ dune_add_formcompiler_system_test(UFLFILE opcount_poisson_2d_order2.ufl ...@@ -16,6 +16,11 @@ dune_add_formcompiler_system_test(UFLFILE opcount_poisson_2d_order2.ufl
INIFILE opcount_poisson_2d_order2.mini INIFILE opcount_poisson_2d_order2.mini
) )
dune_add_formcompiler_system_test(UFLFILE poisson_dg_2d.ufl
BASENAME opcount_sumfact_poisson_dg_2d_vec
INIFILE opcount_sumfact_poisson_dg_2d_vec.mini
)
# 3. Poisson Test Case: DG in 2D # 3. Poisson Test Case: DG in 2D
dune_add_formcompiler_system_test(UFLFILE poisson_dg_2d.ufl dune_add_formcompiler_system_test(UFLFILE poisson_dg_2d.ufl
BASENAME sumfact_poisson_dg_2d BASENAME sumfact_poisson_dg_2d
......
__name = opcount_sumfact_poisson_dg_2d_vec
cells = 8 8
extension = 1. 1.
[wrapper.vtkcompare]
name = {__name}
reference = poisson_ref
extension = vtu
[formcompiler]
numerical_jacobian = 0
exact_solution_expression = g
compare_l2errorsquared = 1e-8
sumfact = 1
opcounter = 1
[formcompiler.ufl_variants]
degree = 1
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