Could someone please give an advice on how to pass arrays of structures that contain members that contain other arrays of structs? To be more more clear, here's what I am trying to do:

typedef struct
int p;
coef* t1;
coef* t2;
mydata* data;
} CL_ThreadData;

__kernel void calc(__global CL_ThreadData* tData)
//Do some calc
//Mask off tData by thread_ID
printf("ID of data[0] is %d",tData[get_global_id(0)].data[0].id);

On the host side I create an array of CL_ThreadData for 16 threads, initialize it, move it to device mem via clCreateBuffer and pass entire thing via SetArg() to the kernel.