Passing functions to CUDA blocks with numba [closed]

我们两清 提交于 2019-12-11 16:38:56

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!