From f61606df3c0aa5a1041e6f86336d24caef49575e Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Fri, 28 Oct 2016 15:52:11 +0200 Subject: [PATCH] Allow subclassing of TemporaryVariable, by passing kwargs through Shovelling additional data in the underlying Record requires TemporaryVariable to pas through any unrecognized keyword arguments. ArrayBase will check whether these are allowed through allowed_extra_kwargs. --- loopy/kernel/data.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/loopy/kernel/data.py b/loopy/kernel/data.py index 768a11d78..bbc5b7955 100644 --- a/loopy/kernel/data.py +++ b/loopy/kernel/data.py @@ -358,7 +358,7 @@ class TemporaryVariable(ArrayBase): def __init__(self, name, dtype=None, shape=(), scope=auto, dim_tags=None, offset=0, dim_names=None, strides=None, order=None, base_indices=None, storage_shape=None, - base_storage=None, initializer=None, read_only=False): + base_storage=None, initializer=None, read_only=False, **kwargs): """ :arg dtype: :class:`loopy.auto` or a :class:`numpy.dtype` :arg shape: :class:`loopy.auto` or a shape tuple @@ -421,7 +421,8 @@ class TemporaryVariable(ArrayBase): storage_shape=storage_shape, base_storage=base_storage, initializer=initializer, - read_only=read_only) + read_only=read_only, + **kwargs) @property def is_local(self): -- GitLab