Skip to content
Snippets Groups Projects
Commit c2743b38 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

elwise_linear_cache -> operator_data_cache

parent c7495a07
No related branches found
No related tags found
No related merge requests found
...@@ -153,9 +153,9 @@ class ExecutionMapper(mappers.Evaluator, ...@@ -153,9 +153,9 @@ class ExecutionMapper(mappers.Evaluator,
dtype=field.dtype, allocator=self.bound_op.allocator) dtype=field.dtype, allocator=self.bound_op.allocator)
for grp in discr.groups: for grp in discr.groups:
cache_key = grp, op, field.dtype cache_key = "elwise_linear", grp, op, field.dtype
try: try:
matrix = self.bound_op.elwise_linear_cache[cache_key] matrix = self.bound_op.operator_data_cache[cache_key]
except KeyError: except KeyError:
matrix = ( matrix = (
cl.array.to_device( cl.array.to_device(
...@@ -163,7 +163,7 @@ class ExecutionMapper(mappers.Evaluator, ...@@ -163,7 +163,7 @@ class ExecutionMapper(mappers.Evaluator,
np.asarray(op.matrix(grp), dtype=field.dtype)) np.asarray(op.matrix(grp), dtype=field.dtype))
.with_queue(None)) .with_queue(None))
self.bound_op.elwise_linear_cache[cache_key] = matrix self.bound_op.operator_data_cache[cache_key] = matrix
knl()(self.queue, mat=matrix, result=grp.view(result), knl()(self.queue, mat=matrix, result=grp.view(result),
vec=grp.view(field)) vec=grp.view(field))
...@@ -293,7 +293,7 @@ class BoundOperator(object): ...@@ -293,7 +293,7 @@ class BoundOperator(object):
def __init__(self, discr, code, debug_flags, allocator=None): def __init__(self, discr, code, debug_flags, allocator=None):
self.discr = discr self.discr = discr
self.code = code self.code = code
self.elwise_linear_cache = {} self.operator_data_cache = {}
self.debug_flags = debug_flags self.debug_flags = debug_flags
self.allocator = allocator self.allocator = allocator
......
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