def __reduce__(self): globs = serialize._get_function_globals_for_reduction(self.py_func) return ( serialize._rebuild_reduction, ( self.__class__, serialize._reduce_function(self.py_func, globs), self.locals, self.targetoptions, ), )
def __reduce__(self): """ Reduce the instance for serialization. Compiled definitions are serialized in PTX form. """ glbls = serialize._get_function_globals_for_reduction(self.py_func) func_reduced = serialize._reduce_function(self.py_func, glbls) config = self._serialize_config() args = (self.__class__, func_reduced, self.bind, self.targetoptions, config) return (serialize._rebuild_reduction, args)
def __reduce__(self): """ Reduce the instance for pickling. This will serialize the original function as well the compilation options and compiled signatures, but not the compiled code itself. """ if self._can_compile: sigs = [] else: sigs = [cr.signature for cr in self._compileinfos.values()] return (serialize._rebuild_reduction, (self.__class__, serialize._reduce_function(self.py_func), self.locals, self.targetoptions, self._can_compile, sigs))
def __reduce__(self): """ Reduce the instance for pickling. This will serialize the original function as well the compilation options and compiled signatures, but not the compiled code itself. """ if self._can_compile: sigs = [] else: sigs = [cr.signature for cr in self.overloads.values()] globs = self._compiler.get_globals_for_reduction() return (serialize._rebuild_reduction, (self.__class__, str(self._uuid), serialize._reduce_function(self.py_func, globs), self.locals, self.targetoptions, self._impl_kind, self._can_compile, sigs))
def reduce_func(fn): gs = serialize._get_function_globals_for_reduction(fn) return serialize._reduce_function(fn, gs)
def __reduce__(self): globs = serialize._get_function_globals_for_reduction(self.py_func) func_reduced = serialize._reduce_function(self.py_func, globs) args = (self.__class__, func_reduced, self.return_type, self.args, self.inline, self.debug) return (serialize._rebuild_reduction, args)
def __reduce__(self): glbls = serialize._get_function_globals_for_reduction(self.py_func) func_reduced = serialize._reduce_function(self.py_func, glbls) args = (self.__class__, func_reduced, self.debug, self.inline) return (serialize._rebuild_reduction, args)