Transfer information from GPU to CPU
Hi,
I was trying to count agglomerate information at each timestep based on particles contact with each other and have finished the code with CPU API. Now I want my code to work on GPU cuda. What I did was collecting contact particle id pairs in contact model and process these info in body force. However, I found it difficult to transfer those contact id pairs in calculateForce() from GPU to CPU. And the mark and process particle only work for each individual particle rather than a pair. So is there a method to transfer the contact pair from GPU to CPU?
Regards,
Yang Qi
Answers
-
Hi Yang Qi,
What was the issue with writing the code directly on GPU? That would be the fastest approach. What can be useful is to use custom properties to tag particles as in contact. Particle Custom properties are passed automatically between Contact Model and Body Force on CUDA.
Regards
Stephen
0