I have a double loop want to parallel. The first loop is in main function. The inner loop have a function which belongs to another class. And I copyin the data to GPU in the main function before the first loop. But it is can not work, the function belonged to another class can not found the data I transfred to GPU. How to solve this problem? Any strategy can make the sharing data is valid among classes?
Thanks a lot.