I have a dictionary and i would like to know if is it possible to use it as a parameter of a kernel.
for instance
i have the cuda kernel signature
__global__ void calTab(Tableaux)
Tableaux is a C structure corresponding to
typedef struct
{
float *Tab1;
float *Tab2;
} Tableaux;
in python Tableaux correspond to the dictionary below:
Tableaux={}
Tableaux["Tab1"]=[]
Tableaux["Tab2"]=[]
is it possible to use the dictionary as the C structure without using a C API?
Thank you in advance
None of what you are proposing is possible. In PyCUDA, you cannot
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.