python - using dictionary in pycuda -
i have dictionary , know if possible use parameter of kernel.
for instance
i have cuda kernel signature
__global__ void caltab(tableaux)
tableaux c structure corresponding
typedef struct { float *tab1; float *tab2; } tableaux;
in python tableaux correspond dictionary below:
tableaux={} tableaux["tab1"]=[] tableaux["tab2"]=[]
is possible use dictionary c structure without using c api?
thank in advance
none of proposing possible. in pycuda, cannot
- pass dictionary kernel
- pass list kernel
- directly translate dictionary c++ structure in device code
- directly translate list c++ linear array in device
pycuda can use python classes c++ structures , has numpy array use on gpu. points 3 , 4 possible, not them. both techniques discussed in documentation,here gpuarray , here structures.
Comments
Post a Comment