Hey guys,
I’m trying to use a few 2d arrays which I put into a struct, filled with data, and sent over to the kernel.
I have confirmed that the data is being passed into the kernel and is correct.
However once inside the kernel I am having issues passing the arrays from function to function.
Right now I’m trying to use the following code, but getting many odd errors here and there.
obviously my struct is dev_input and the arrays are all 10x100.
double *Isomer1_arr[10][100] = dev_input->Isomer1_arr[][];
double *Isomer2_arr[10][100] = dev_input->Isomer2_arr[][];
double *Shift_arr[10][100] = dev_input->Shift_arr[][];
double *SP_arr[10][100] = dev_input->sp_arr[][];
for the above section of code the error im getting is
“initialization with “{…}” expected for aggregate object”
Trying to pass them into a function I have the following…
dev_E1 = getInteraction(1, 1, dev_x1n, dev_y1n, dev_z1n, dev_thetax1n, dev_thetay1n, dev_thetaz1n, Isomer1_arr, Isomer2_arr, Shift_arr, sp_arr);
For this part I’m getting
“error : argument of type “double ()[100]” is incompatible with parameter of type “double (*)[100]””
I’m sure I’m making a stupid mistake but I want another opinion on this.
Thanks!