Hello!
I have a bit of a complex code, where I use TimerOutputs to track progress. I have the following code bit:
In Line 343 I am updating the position variable. Position, Velocity, Acceleration are SVectors inside of Vectors and the other variables are floating point values. TimerOutputs gives the following:
If I comment line 343 out:
Next I try to check if allocations occur using @allocated
as such:
No print statements appear in terminal, i.e. @allocated
returns zero, but the SimulationLoop still returns average of 985 bytes.
I am a bit perplexed how this can happen, and I wonder if anyone has experienced something similar?
I have done a small check and noted that:
Where it is seen that adding SVector(0,0)
to Position does not allocate, but adding 1,1 does.
I don’t really have a MWE sorry, since this is quite nested code in a branch of a repo I am working on, but sharing here since some can probably provide me some guidance on whether what I am seeing is actual or if it is a bug in TimerOutputs.
Kind regards