Example #1
0
 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,
         ),
     )
Example #2
0
 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)
Example #3
0
 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)
Example #4
0
 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))
Example #5
0
 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))
Example #6
0
 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))
Example #7
0
 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))
Example #8
0
 def reduce_func(fn):
     gs = serialize._get_function_globals_for_reduction(fn)
     return serialize._reduce_function(fn, gs)
Example #9
0
 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)
Example #10
0
 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)
Example #11
0
 def reduce_func(fn):
     gs = serialize._get_function_globals_for_reduction(fn)
     return serialize._reduce_function(fn, gs)