예제 #1
0
 def __init__(self, func, sig, identity=None, targetoptions={}):
     assert not targetoptions
     self.py_func = func
     self.identity = self.parse_identity(identity)
     self.signature = sig
     self.inputsig, self.outputsig = parse_signature(self.signature)
     assert len(self.outputsig) == 1, "only support 1 output"
     self.kernelmap = {}  # { arg_dtype: (return_dtype), cudakernel }
예제 #2
0
 def __init__(self, func, sig, identity=None, targetoptions={}):
     assert not targetoptions
     self.py_func = func
     self.identity = self.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()
예제 #3
0
    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()
예제 #4
0
파일: deviceufunc.py 프로젝트: hajs/numba
    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 = self.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()
예제 #5
0
 def from_signature(cls, signature):
     return cls(*parse_signature(signature))
예제 #6
0
 def from_signature(cls, signature):
     return cls(*parse_signature(signature))