I have a dictionary and i would like to know if is it possible to use it as a parameter of a kernel.
i have the cuda kernel signature
__global__ void calTab(Tableaux)
Tableaux is a C structure corresponding to
in python Tableaux correspond to the dictionary below:
is it possible to use the dictionary as the C structure without using a C API?
Thank you in advance
Best How To :
None of what you are proposing is possible. In PyCUDA, you cannot
- Pass a dictionary to a kernel
- Pass a list to a kernel
- Directly translate a dictionary to C++ structure in device code
- Directly translate a list to a C++ linear array in device
PyCUDA can use Python classes as C++ structures and it has a numpy like array for use on the GPU. So points 3 and 4 are possible, but not as you would like to do them. Both techniques are discussed in the documentation,here for gpuarray and here for structures.