How to pass double****** to GPU

Hello
the question is in the title, I need to send a array of double in cuda. In my C++ code it’s a double****** variable. I can’t change the nature of this array. Is it possible? Or I need to transform this array to a 1D array?

Assuming it’s the final array that needs to be passed, dereference the pointer enough times until it points to the last array, then copy it’s contents to cuda.

If instead wanting to pass pointers to cuda this is probably not correct unless it’s unified memory.

thanks for your answer.
finaly i try this: first i malloc the array on the device with the size of each dimension of the host array.

cudaStatus = cudaMalloc((void**)&dev_array, ponDim1 * ponDim2 * ponDim3 * ponDim4 * ponDim5 * ponDim6 * sizeof(double));
    if (cudaStatus != cudaSuccess) {
        fprintf(stderr, "cudaMalloc failed !\n");
        goto Error;
    }

Next, I copy the value from the host to the device. When I go in debug with Nsight, the value are in the device array.

int compteur=0;
	for(int i=0;i<2;i++){
		for(int j=0;j<31;j++){
			for(int k=0;k<42;k++){
				for(int l=0;l<2;l++){
					cudaStatus = cudaMemcpy(&dev_array[compteur], &HostArray[i][j][k][0][0][l], sizeof(double),								cudaMemcpyHostToDevice);
					if (cudaStatus != cudaSuccess) {
						fprintf(stderr, "cudaMemcpy1 failed!");
						goto Error;
					}
					compteur++;
				}
			}
		}
	}

And finaly I copy back the value from the device to the host. Maybe I do something wrong, but I never have any value in the host array… Maybe you have an idea?

compteur=0;
	for(int i=0;i<2;i++){
		for(int j=0;j<31;j++){
			for(int k=0;k<42;k++){
				for(int l=0;l<2;l++){
					cudaStatus = cudaMemcpy(&Host_Array[i][j][k][0][0][l],&dev_array[compteur] , sizeof(double),cudaMemcpyDeviceToHost);
					if (cudaStatus != cudaSuccess) {
						fprintf(stderr, "cudaMemcpy1 failed!");
						goto Error;
					}
					compteur++;
				}
			}
		}
	}

Show prototype/header of kernel routine… check parameters… one of those parameters must either be a pointer or perhaps a var parameter.