Sending an double pointer array from the host to device

Hello, is there any way to send an double pointer array from the host to device? I can not find examples on the internet.

float **Tab2D;
int X, Y

for (int i = 0; i < X; i++){
	for (int j = 0; j < Y; j++){
      		Tab2D[i][j] = rand() % 10;
	}
}

I don’t want transform array from 2D to 1D, by the way, I want to ask if this is the right way?

float *Tab1D = new float[totalSize];
int id = 0;
	
for (i = 0; i < X; i++) {
	for (j = 1; j < Y; j++) {
		Tab1D[id++] = Tab2D[i][j];
	}
}

You may use cudaMallocPitch for allocating 2D arrays.