I would like to creat a singly linked list in cuda, defining a structure that contains pointers to array.
here is the equivalent C code:
data *mdata = (data *)malloc(sizeof(mdata) );
mdata->size = 1024;
mdata -> u = (float *)malloc(sizeof(float)*mdata->N);
mdata -> uf = (float *)malloc(sizeof(float)*mdata->N);
and below is the struct definition in cuda code:
but I dont know how i can allocate memory to the two pointers.
can anyone please help me with this???