def __init__(self, func, identity=None, cache=False, targetoptions={}): if cache: raise TypeError("caching is not supported") assert not targetoptions self.py_func = func self.identity = parse_identity(identity) # { arg_dtype: (return_dtype), cudakernel } self.kernelmap = OrderedDict()
def __init__(self, func, identity=None, cache=False, targetoptions={}): if cache: raise TypeError("caching is not supported") for opt in targetoptions: if opt == 'nopython': warnings.warn("nopython kwarg for cuda target is redundant", RuntimeWarning) else: fmt = "cuda vectorize target does not support option: '%s'" raise KeyError(fmt % opt) self.py_func = func self.identity = parse_identity(identity) # { arg_dtype: (return_dtype), cudakernel } self.kernelmap = OrderedDict()
def __init__(self, func, sig, identity=None, targetoptions={}): # Allow nopython flag to be set. if not targetoptions.pop('nopython', True): raise TypeError("nopython flag must be True") # Are there any more target options? if targetoptions: opts = ', '.join([repr(k) for k in targetoptions.keys()]) fmt = "The following target options are not supported: {0}" raise TypeError(fmt.format(opts)) self.py_func = func self.identity = parse_identity(identity) self.signature = sig self.inputsig, self.outputsig = parse_signature(self.signature) assert len(self.outputsig) == 1, "only support 1 output" # { arg_dtype: (return_dtype), cudakernel } self.kernelmap = OrderedDict()
def __init__(self, func, identity=None, targetoptions={}): assert not targetoptions self.py_func = func self.identity = parse_identity(identity) # { arg_dtype: (return_dtype), cudakernel } self.kernelmap = OrderedDict()