I have a variable whithin a kernel like:
int16 element;
I would like to know if there is a way to adress the third int in element like
Using pointers is a very easy solution
float4 f4 = (float4)(1.0f, 2.0f, 3.0f, 4.0f); int gid = get_global_id(0); float *p = &f4; result[gid]=p[3];