I read the sample Kernels in the current ATI Stream SDK, but I can´t seem to figure out how to access vector elements (like .x and so on) if I pass a pointer to a vector to a function defined in a kernel.
Let´s say the function receives a pointer as uint4 *pVec and got it passed via &Vec. How can I access the elements in the sub-function? *pVec->x throws an error.
Thanks for your help,
Dia
try pVec[0].x or maybe this *pVec.x
pVec->x is valid only if pVec is structure.
Originally posted by: nou try pVec[0].x or maybe this *pVec.x
pVec->x is valid only if pVec is structure.
Thanks nou,
pVec[0].x works, but I'm unsure if that's a supported way of working with pointers to vectors. Any official statement?
Dia
well OpenCL use C for kernels with some restrictions.