问题
I am working in python with the numba library and wondered if there is a solution to write a parallel version of a previous work. I have a function f(X, S, F) where X and S are scalar arrays, and F is a list of functions.
I am almost sure that passing an array of functions is not possible with numba (and cuda in general?). What would be an alternative solution to this? If there is one.
Thanks in advance for your help
回答1:
The Numba CUDA Python implementation presently doesn't support any sort of function pointer or objects within kernels. So what you would have ambitions to do is not possible.
来源:https://stackoverflow.com/questions/47810891/passing-functions-to-cuda-blocks-with-numba