示例#1
0
 def wrappped(func):
     module = inspect.getmodule(func).__name__
     signature = sigutils.parse_signature(sig)
     entry = ExportEntry(symbol=sym,
                         signature=signature,
                         function=func,
                         module=module)
     registry.append(entry)
示例#2
0
文件: cc.py 项目: ssarangi/numba
    def export(self, exported_name, sig):
        sig = sigutils.parse_signature(sig)
        if exported_name in self._exported_functions:
            raise KeyError("duplicated export symbol %s" % (exported_name))

        def decorator(func):
            entry = ExportEntry(exported_name, sig, func)
            self._exported_functions[exported_name] = entry
            return func

        return decorator
示例#3
0
文件: cc.py 项目: christwell/numba
    def export(self, exported_name, sig):
        """
        Mark a function for exporting in the extension module.
        """
        sig = sigutils.parse_signature(sig)
        if exported_name in self._exported_functions:
            raise KeyError("duplicated export symbol %s" % (exported_name))

        def decorator(func):
            entry = ExportEntry(exported_name, sig, func)
            self._exported_functions[exported_name] = entry
            return func

        return decorator
示例#4
0
文件: decorators.py 项目: ASPP/numba
 def wrappped(func):
     module = inspect.getmodule(func).__name__
     signature = sigutils.parse_signature(sig)
     entry = ExportEntry(symbol=sym, signature=signature, function=func,
                         module=module)
     registry.append(entry)