File tree Expand file tree Collapse file tree 4 files changed +8
-4
lines changed
Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 22
33#include < mpi.h>
44
5+ #include < atomic>
56#include < cmath>
67#include < cstddef>
78#include < functional>
@@ -44,7 +45,7 @@ bool NesterovATestTaskALL::RunImpl() {
4445 MPI_Comm_rank (MPI_COMM_WORLD, &rank);
4546 if (rank == 0 ) {
4647 std::atomic<int > counter (0 );
47- #pragma omp parallel default(none)
48+ #pragma omp parallel default(none) shared(counter)
4849 {
4950 counter++;
5051 }
@@ -62,7 +63,7 @@ bool NesterovATestTaskALL::RunImpl() {
6263 }
6364 GetOutput () /= counter;
6465
65- tbb::parallel_for (0 , ppc::util::GetNumThreads (), [&](int i ) { counter--; });
66+ tbb::parallel_for (0 , ppc::util::GetNumThreads (), [&](int /* i */ ) { counter--; });
6667 GetOutput () += counter;
6768
6869 MPI_Barrier (MPI_COMM_WORLD);
Original file line number Diff line number Diff line change 11#include " example/omp/include/ops_omp.hpp"
22
3+ #include < atomic>
34#include < cmath>
45#include < cstddef>
56#include < vector>
@@ -34,7 +35,7 @@ bool NesterovATestTaskOMP::RunImpl() {
3435 GetOutput () *= num_threads;
3536
3637 std::atomic<int > counter (0 );
37- #pragma omp parallel default(none)
38+ #pragma omp parallel default(none) shared(counter)
3839 {
3940 counter++;
4041 }
Original file line number Diff line number Diff line change 11#include " example/stl/include/ops_stl.hpp"
22
3+ #include < atomic>
34#include < cmath>
45#include < cstddef>
56#include < functional>
Original file line number Diff line number Diff line change 22
33#include < tbb/tbb.h>
44
5+ #include < atomic>
56#include < cmath>
67#include < core/util/include/util.hpp>
78#include < cstddef>
@@ -39,7 +40,7 @@ bool NesterovATestTaskTBB::RunImpl() {
3940 GetOutput () *= num_threads;
4041
4142 std::atomic<int > counter (0 );
42- tbb::parallel_for (0 , ppc::util::GetNumThreads (), [&](int i ) { counter++; });
43+ tbb::parallel_for (0 , ppc::util::GetNumThreads (), [&](int /* i */ ) { counter++; });
4344
4445 GetOutput () /= counter;
4546 return GetOutput () > 0 ;
You can’t perform that action at this time.
0 commit comments