I am new to cudaMallocPitch . I have a two-D datset in sizes LX and LY.
#define LX 3
#define LY 3
global_ void multi( double *M1, size_t p_M1)
int j, k;
for(j = 0; j <LX; j++)
float* row = (float*)((char*)M1 + j * p_M1);
M1[k] = row[k];
how can I write a matrix as below
1 2 3
4 5 6
7 8 9
I will appreciate any help with code snippets. I have posted my code above, but it assigns only initial value.