hi i have the following code...
int *a, *b;
int *d;
int N = 2000;
size_t size = N*sizeof(int);
a = (int *) malloc(size);
b = (int *) malloc(size);
...
cudaMalloc((void **) &d, size);
it works just fine... now assume i have the following
char **t = malloc(2000* sizeof *t);
for(...)
{
...
t[i] = (char *)malloc(sizeof(char)*changing_length);
...
}
how to do cudaMalloc for t as if it is one dimensional array (taking into account that each element has different size) ?