c++ - It is possible to pass a struct containing an array of structs, which conatin arrays, none of which are pointers, as an argument to and OpenCL kernel -
so, question says all, code better.
the definitions of types
#define na 70 #define nthr 16 typedef struct { float fsum[na], zij[na], mass[na], sub[na], fmass[na*na], frac[na*na], ment[na*na], qent[na*na], elij[na*na], sij[na*na]; } convect; typedef struct { convect cpa[nthr]; } convectarray;
i want pass (and retrieve) convertarray
opencl kernel.
i have defined exact same types in kernel. can pass , retrieve, code crashes/freezes machine. when comment out setkernelarg, , enqueureadbuffer argument, code runs again.
question :
can send such type , kernel have made mistake?
or
do need create cl_mem
buffer array of convect
?
or
something else?
thanks in advance chaps!
Comments
Post a Comment