Exemplo n.º 1
0
class GUVectorize(_BaseVectorize):
    target_registry = TargetRegistry({'cpu': GUFuncBuilder})

    def __new__(cls, func, signature, **kws):
        identity = cls.get_identity(kws)
        imp = cls.get_target_implementation(kws)
        return imp(func, signature, identity, kws)
Exemplo n.º 2
0
class Vectorize(_BaseVectorize):
    target_registry = TargetRegistry({'cpu': dufunc.DUFunc,
                                      'parallel': ParallelUFuncBuilder,})

    def __new__(cls, func, **kws):
        identity = cls.get_identity(kws)
        cache = cls.get_cache(kws)
        imp = cls.get_target_implementation(kws)
        return imp(func, identity=identity, cache=cache, targetoptions=kws)
Exemplo n.º 3
0
class Vectorize(_BaseVectorize):
    target_registry = TargetRegistry({
        'cpu': UFuncBuilder,
        'parallel': ParallelUFuncBuilder
    })

    def __new__(cls, func, **kws):
        identity = cls.get_identity(kws)
        imp = cls.get_target_implementation(kws)
        return imp(func, identity, kws)