I’m not very experienced at programming. But I’m capable of writing some simple code for simple tasks. Recently I came over a task to simulate interaction of many small particles with one common substance. I’ve read some about CUDA before, and I thought that maybe it might work. I’ll describe the task as short as I can.
We have:
~1000 small particles
1 common substance
Those small particles can be in 4 different states. They can change their state with some probability at every time step. All small particles start in state 1 and can interact with common substance when in state 4. After interacting they go to state 3.
Here’s a scheme of possible transitions:
External Media
The simulation starts at 1 and goes e.g. 1000 steps. At each step for each small particle the program has to decide if it makes a transition to another state or interacts with the common substance (generate random number and check if it hits a certain interval).
I read that one multiprocessor can do only one operation for all threads. So the question is - can I program several multiprocessors, each for a specific operation? For example, one for 1->2 transition, another for 2->1, third one for 2->3, etc. Is it possible to do something like this on GPU? Or maybe there’s some other way to do it. Willing to hear any advice. Thanks!