I want to know how can we copy a struct from cpu to gpu. For example
then I have
g_type *g; //on CPU
g->b= (int*) malloc(5sizeof(int);
g->c= (int) malloc (7*sizeof(int);
now I want to copy this struct from cpu to GPU. Please guide me.