This file contains the pi benchmark implementation using references
text/x-dsrc
2971
Comments
Comment #0 by js.wohlleben — 2023-08-06T13:04:47Z
Created attachment 1883
This file contains the pi benchmark implementation using references
I tried to execute a function, that takes a struct reference, as a task. This doesnt work. If I use a pointer instead, the code runs just fine. The "pi_ref.d" example uses the "ref"-keyword and doesnt work. The code calculates pi with different threads. Execute for example with ./pi 2000000000 4 to monitor behaviour.
Expected output: 3.14159
Actual output: nan, because it is passed as a value, not as a reference
Comment #1 by robert.schadek — 2024-12-01T16:41:36Z