I am trying to reduce the run-time of this code as much as possible. I have never done parallelization in C++. I would appreciate your help in figuring this out. I can run the code on VSCode or CodeLite on a 64-bit Windows machine.
#include #include #include int main() { const unsigned long long int MAXVAL = 100000; unsigned long long int a; for (a = 1; a
Источник: [url]https://stackoverflow.com/questions/78097040/how-to-parallelize-this-c-code-to-reduce-run-time-as-much-as-possible[/url]
I am trying to reduce the run-time of this code as much as possible. I have never done parallelization in C++. I would appreciate your help in figuring this out. I can run the code on VSCode or CodeLite on a 64-bit Windows machine.
[code]#include #include #include int main() { const unsigned long long int MAXVAL = 100000; unsigned long long int a; for (a = 1; a