Skip to content

Commit

Permalink
Small change to numba interface
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebBell committed Jul 18, 2021
1 parent 677aef4 commit acfd9a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fluids/numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
try:
import scipy.special as sc
name_to_numba_signatures = {
'expi': [(float64,)],
'ellipe': [(float64,)],
'iv': [(float64, float64,)],
'gamma': [(float64,)],
Expand All @@ -70,6 +71,7 @@
}

name_and_types_to_pointer = {
('expi', float64): ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_double)(get_cython_function_address('scipy.special.cython_special', '__pyx_fuse_1expi')),
('ellipe', float64): ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_double)(get_cython_function_address('scipy.special.cython_special', 'ellipe')),
('iv', float64, float64): ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_double, ctypes.c_double)(get_cython_function_address('scipy.special.cython_special', '__pyx_fuse_1iv')),
('gamma', float64): ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_double)(get_cython_function_address('scipy.special.cython_special', '__pyx_fuse_1gamma')),
Expand All @@ -84,6 +86,7 @@
('ellipeinc', float64, float64): ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_double, ctypes.c_double)(get_cython_function_address('scipy.special.cython_special', 'ellipeinc')),
('erf', float64): ctypes.CFUNCTYPE(ctypes.c_double, ctypes.c_double)(get_cython_function_address('scipy.special.cython_special', '__pyx_fuse_1erf')),
}


def select_kernel(name, signature):
f2 = name_and_types_to_pointer[(name, *signature)]
Expand Down

0 comments on commit acfd9a0

Please sign in to comment.