OpenCL type conversion to NEON intrinsics

hi,

I got a problem load openCL cl_uchar4 type to ARM noen intrinsics.
i know that intrinsics can use uint8_t because i already done this.

i am extracting cl_uchar4 buffer from GPU to CPU cl_uchar4 buffer using enqueueMapBuffer.

so, i need to convert cl_uchar4 to 4 unit8_t. Does someone got a solution for this.

thanks in advance.

I have found the solution. woke up time ;))

i declared :

static void * restrict point_ptr_512 = (void * restrict ) malloc(65536*sizeof(cl_uchar4));

struct conv_uchar4{
uint8_t A;
uint8_t B;
uint8_t C;
uint8_t D;
};
static conv_uchar4 conv_neuro512[512*512];
static conv_uchar4 * restrict buf_512 = &conv_neuro512[0];

then

void* point_ptr_512 = gQueue.enqueueMapBuffer(buffer512, CL_TRUE, CL_MAP_READ,0,(512*512)*sizeof(cl_uchar4), 0,NULL);
buf_512 = (conv_uchar4 *)point_ptr_512;

and

uint8x16x4_t xv = vld4q_u8(&buf_512->A); or uint8x16_t xv = vld1q_u8(&buf_512->A);

PS: i hav looked to internet to find some solution yesteday but there is nothing very efficient. Here it work.