I’ve got a Tesla C1060, so 4GB of RAM.
And I of course checked all cudaMalloc and memcpy I’ve done, there’s no error.
I also tried with small size, to check the results.
So everything succeed, but when I try to check up : “v” is correct, but the values “val1” and “val2” in “tab” are not.
So I think it’s a pointer problem… Probably I don’t allocate/access/copy properly, meaning that pointers don’t point the good memory ?
When you copy mystruct to GPU, you should also copy the pointers inside it… ( U need to cudaMalloc() for those pointers and copy things from CPU to GPU and make sure u update the pointers with GPU pointers etc…)