diff --git a/loopy/codegen/__init__.py b/loopy/codegen/__init__.py index fcd170316350328e91a37bcdf082515928f9cc9b..8307184652616a43748b2488a797c6133e80aed0 100644 --- a/loopy/codegen/__init__.py +++ b/loopy/codegen/__init__.py @@ -478,12 +478,10 @@ def generate_code_v2(kernel): else: raise ValueError("argument type not understood: '%s'" % type(arg)) - from loopy.types import OpaqueType - allow_complex = False for var in kernel.args + list(six.itervalues(kernel.temporary_variables)): dtype = var.dtype - if not isinstance(dtype, OpaqueType) and dtype.involves_complex(): + if dtype.involves_complex(): allow_complex = True # }}} diff --git a/loopy/kernel/function_interface.py b/loopy/kernel/function_interface.py index e85a83d377d4322e7b287e9824101049c2ea913f..3f9a84675062d851680e96b5e1687ffac03db2da 100644 --- a/loopy/kernel/function_interface.py +++ b/loopy/kernel/function_interface.py @@ -905,7 +905,6 @@ class CallableKernel(InKernelCallable): new_insns.append(insn) kernel = kernel.copy(instructions=new_insns) - # TODO: resolve name clash here kernel.scoped_functions.update(callee_knl.scoped_functions) # }}} diff --git a/loopy/types.py b/loopy/types.py index de7890aa893dd4714a9d86999d15ca57e738a7aa..d52e029a5636868efa04ece12c185486fe3a10eb 100644 --- a/loopy/types.py +++ b/loopy/types.py @@ -180,9 +180,15 @@ class AtomicNumpyType(NumpyType, AtomicType): # {{{ class OpaqueType(LoopyType): + """An opaque data type is truly opaque - it has no allocations, no + temporaries of that type, etc. The only thing allowed is to be pass in + through one ValueArg and go out to another. It is introduced to accomodate + functional calls to external libraries. + """ def __init__(self, name): assert isinstance(name, str) self.name = name + self.target = None def is_integral(self): return False