Not really an issue but, I'm trying to populate a struct in constant memory containing (device) pointers in order to run my kernel through kernel tuner. In C the struct looks something like:
struct MergedNeuronUpdateGroup0
{
unsigned int* spkCnt;
unsigned int* spk;
};
__device__ __constant__ MergedNeuronUpdateGroup0 d_mergedNeuronUpdateGroup0[8];
I can see how I would pack pointers into this with struct.pack("PP0l", spk_cnt, spk) and then convert to numpy as described in your example before passing via the cmem_args kwarg to tune_kernel. But, I've no idea how I would create (and initialise) these pointers from Python! Any pointers?
Thanks in advance for your help!
Not really an issue but, I'm trying to populate a struct in constant memory containing (device) pointers in order to run my kernel through kernel tuner. In C the struct looks something like:
I can see how I would pack pointers into this with
struct.pack("PP0l", spk_cnt, spk)and then convert to numpy as described in your example before passing via thecmem_argskwarg totune_kernel. But, I've no idea how I would create (and initialise) these pointers from Python! Any pointers?Thanks in advance for your help!