Как распараллелить этот код C++, чтобы максимально сократить время выполнения?C++

Программы на C++. Форум разработчиков
Гость
Как распараллелить этот код C++, чтобы максимально сократить время выполнения?

Сообщение Гость »


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]

Вернуться в «C++»