def init(self): self._internal_codegen = codegen.JITSPIRVCodegen("numba_dppy.jit") self._target_data = ll.create_target_data( codegen.SPIR_DATA_LAYOUT[utils.MACHINE_BITS]) # Override data model manager to SPIR model import numba.cpython.unicode self.data_model_manager = _init_data_model_manager() self.extra_compile_options = dict() import copy from numba.np.ufunc_db import _lazy_init_db _lazy_init_db() from numba.np.ufunc_db import _ufunc_db as ufunc_db self.ufunc_db = copy.deepcopy(ufunc_db) self.cpu_context = cpu_target.target_context
dispatch_table, 'ldexp') def np_real_nextafter_impl(context, builder, sig, args): npyfuncs._check_arity_and_homogeneity(sig, args, 2) dispatch_table = { types.float32: 'nextafterf', types.float64: 'nextafter', } return npyfuncs._dispatch_func_by_name_type(context, builder, sig, args, dispatch_table, 'nextafter') ufunc_db._lazy_init_db() # logaddexp ufunc_db._ufunc_db[np.logaddexp] = { 'ff->f': np_logaddexp_impl, 'dd->d': np_logaddexp_impl, } # logaddexp2 ufunc_db._ufunc_db[np.logaddexp2] = { 'ff->f': np_logaddexp2_impl, 'dd->d': np_logaddexp2_impl, } # signbit ufunc_db._ufunc_db[np.signbit] = {