Example #1
0
    def __init__(self, dllname, dtype=default_dtype):
        self.dll_name = dllname
        self.dtype = dtype

        spec = importlib.util.find_spec(dllname)

        if (spec is None) or (pykeops.config.build_type == 'Debug'):
            self.build_folder = set_build_folder(pykeops.config.bin_folder,
                                                 self.dll_name)
            self._safe_compile()
Example #2
0
 def __init__(self, target, kernel_geom, kernel_sig, kernel_sphere, dtype):
     self.kernel_geom = kernel_geom
     self.kernel_sig = kernel_sig
     self.kernel_sphere = kernel_sphere
     self.dll_name = target + "_" + kernel_geom + kernel_sig + kernel_sphere + "_" + c_type[dtype]
     self.dtype = dtype
     
     spec = importlib.util.find_spec(self.dll_name)
     
     if (spec is None) or (pykeops.config.build_type == 'Debug'):
         self.build_folder = set_build_folder(pykeops.config.bin_folder, self.dll_name)
         self._safe_compile()
Example #3
0
    def __init__(self, formula, aliases, dtype, lang, optional_flags=[]):
        self.formula = formula
        self.aliases = aliases
        self.dtype = dtype
        self.lang = lang
        self.optional_flags = optional_flags

        # create the name from formula, aliases and dtype.
        self.dll_name = create_name(self.formula, self.aliases, self.dtype,
                                    self.lang, self.optional_flags)

        if (not module_exists(self.dll_name)) or (pykeops.config.build_type
                                                  == "Debug"):
            self.build_folder = set_build_folder(pykeops.config.bin_folder,
                                                 self.dll_name)
            self._safe_compile()