Scientific computing and parallel computing C++23/C++26

Era Scarecrow rtcvb32 at
Mon Jan 17 06:13:03 UTC 2022

On Thursday, 13 January 2022 at 00:41:25 UTC, forkit wrote:
> For the general programmers/developer, parallelism needs to be 
> deeply integrated into the language and it's std library, so 
> that it can be 'inferred' (by the compiler/optimizer).
> Perhaps a language like D, could adopt @parallelNO to instruct 
> the compiler/optimizer to never infer parallelism in the code 
> that follows.
> The O/S should also has a very important role in inferring 
> parallelism.
> I've had 8 cores available on my pc for well over 10 years now. 
> I don't think anything running on my pc has the slightest clue 
> that they even exist ;-)  (except the o/s).

  Number of cores is fine, but if you could take advantage of the 
GPU/CUDA cpu's on say a graphics card as well; **THAT** would be 
really cool. Imagine the huge speedup of say 7zip or other where 
simple processes, pattern matching or encoding/processing could 
speed up if you could make use of those **AS WELL AS** the number 
of cores you have.

  For a while I've been making scripts where i *find* files and 
split it via xargs; this converts any single-thread program to be 
run on lots of cores/processes (*by running lots of copies with 
different input files*), though in windows it may result in 5 
processes for ever 1 you want to run.

**Example:** find -iname "*.jpg" -print0 | xargs -0 -P 
$NUMBER_OF_PROCESSORS -n 1 jpegoptim --all-progressive

More information about the Digitalmars-d mailing list