-
|
I would like to process the FLAMEGPU_AGENT_FUNCTION(agent_update, flamegpu::MessageNone, flamegpu::MessageBruteForce) {
//...
const unsigned int timestep = FLAMEGPU->CUDASimulation.getStepCounter();
//...
}So how can I get the simulation timestep other than storing and incrementing it explicitly in the agent as one of its variables (that would be a serious overhead as the single value would unnecessarily replicate throughout the whole population)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I think the method you are looking for is You should be able to access it the same in both Host and Device APIs. |
Beta Was this translation helpful? Give feedback.
I think the method you are looking for is
FLAMEGPU->getStepCounter();FLAMEGPU2/include/flamegpu/runtime/DeviceAPI.cuh
Line 99 in cf64fd9
You should be able to access it the same in both Host and Device APIs.