diff --git a/python/dune/perftool/generation.py b/python/dune/perftool/generation.py index ad902b907cfb990cc29cf8bfb7f04b4a6c9f2541..6a419da4ee4e41f393e31bcde52adafd251d4da4 100644 --- a/python/dune/perftool/generation.py +++ b/python/dune/perftool/generation.py @@ -63,6 +63,11 @@ class LoopDomainCacheItem(UFL2LoopyCacheItem): self.content = "{{ [{0}] : 0<={0}<{0}_n }}".format(content) self.returnValue = content +class IncludeCacheItem(NoReturnCacheItem): + def __init__(self, content): + NoReturnCacheItem.__init__(self, content) + self.content = "#include<{}>".format(content) + # have one cache the module level. It is easier than handing around an instance of it. _cache = {} @@ -190,3 +195,7 @@ dune_symbol = _dune_decorator_factory(cache_item_type=SymbolCacheItem) temporary_variable = _dune_decorator_factory(cache_item_type=TemporaryVariableCacheItem) loopy_c_instruction = _dune_decorator_factory(cache_item_type=CInstructionCacheItem) loopy_expr_instruction = _dune_decorator_factory(cache_item_type=ExpressionInstructionCacheItem) + +@_dune_decorator_factory(cache_item_type=IncludeCacheItem) +def dune_include(incfile): + return incfile \ No newline at end of file