Skip to content
Snippets Groups Projects
Commit df9fe2a4 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Add an additional cache item type: Includes

parent d9866baf
No related branches found
No related tags found
No related merge requests found
......@@ -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
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