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

  1. pass dictionary kernel
  2. pass list kernel
  3. directly translate dictionary c++ structure in device code
  4. 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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -