I have two structs as
struct collapsed {
char **seq;
int num;
};
struct data {
collapsed *x;
int num;
int numblocks;
int *blocksize
You're dereferencing a host pointer on the device.
X
is a valid device pointer.
But when you copied the X
struct to the device, you copied x
along with it, which contains a host pointer. When you dereference that pointer:
collapsed x = X->x[0];
^ this is dereferencing the x pointer
the device code throws an error.
More detail is given here as well as instructions on how to fix it.