Re: New update fix

2024-03-03 Thread Steven Schveighoffer via Digitalmars-d-learn
On Saturday, 2 March 2024 at 09:18:58 UTC, user1234 wrote: On Saturday, 2 March 2024 at 08:41:40 UTC, Salih Dincer wrote: SLM, What exactly did this patch with the new update fix? Nothing, it looks like what happened is that the issue was wrongly referenced by a dlang.org PR (https://github

Re: Question on shared memory concurrency

2024-03-03 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
A way to do this without spawning threads manually: ```d import std.parallelism : TaskPool, parallel, taskPool, defaultPoolThreads; import std.stdio : writeln; import std.range : iota; enum NSWEPT = 1_000_000; enum NCPU = 4; void main() { import core.atomic : atomicLoad, atomicOp; shar

Question on shared memory concurrency

2024-03-03 Thread Andy Valencia via Digitalmars-d-learn
I tried a shared memory parallel increment. Yes, it's basically a cache line thrasher, but I wanted to see what's involved in shared memory programming. Even though I tried to follow all the rules to make true shared memory (not thread local) it appears I failed, as the wait loop at the end o

Re: Why does disabling a struct's postblit increase its size in memory?

2024-03-03 Thread Paul Backus via Digitalmars-d-learn
On Saturday, 2 March 2024 at 19:29:47 UTC, Per Nordlöw wrote: On Saturday, 2 March 2024 at 19:28:08 UTC, Per Nordlöw wrote: On Saturday, 2 March 2024 at 19:11:42 UTC, kinke wrote: Not according to run.dlang.io, for all available DMD versions. Perhaps your tested `S` was nested in some function