こんにちは私は次のコードを持っています...
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);
それはうまく機能します...今私が次のものを持っていると仮定します
char **t = malloc(2000* sizeof *t);
for(...)
{
...
t[i] = (char *)malloc(sizeof(char)*changing_length);
...
}
1次元配列であるかのようにtに対してcudaMallocを実行する方法(各要素のサイズが異なることを考慮に入れて)?