@@ -35,7 +35,7 @@ std::uint64_t averageout_plain_for(std::size_t vector_size)
35
35
std::iota (
36
36
std::begin (data_representation), std::end (data_representation), gen ());
37
37
38
- std::uint64_t start = hpx::chrono::high_resolution_clock::now ();
38
+ std::uint64_t const start = hpx::chrono::high_resolution_clock::now ();
39
39
40
40
// average out 100 executions to avoid varying results
41
41
for (auto i = 0 ; i < test_count; i++)
@@ -52,7 +52,7 @@ std::uint64_t averageout_plain_for_iter(std::size_t vector_size)
52
52
std::iota (
53
53
std::begin (data_representation), std::end (data_representation), gen ());
54
54
55
- std::uint64_t start = hpx::chrono::high_resolution_clock::now ();
55
+ std::uint64_t const start = hpx::chrono::high_resolution_clock::now ();
56
56
57
57
// average out 100 executions to avoid varying results
58
58
for (auto i = 0 ; i < test_count; i++)
@@ -72,7 +72,7 @@ std::uint64_t averageout_parallel_foreach(
72
72
std::iota (
73
73
std::begin (data_representation), std::end (data_representation), gen ());
74
74
75
- std::uint64_t start = hpx::chrono::high_resolution_clock::now ();
75
+ std::uint64_t const start = hpx::chrono::high_resolution_clock::now ();
76
76
77
77
// average out 100 executions to avoid varying results
78
78
for (auto i = 0 ; i < test_count; i++)
@@ -92,7 +92,7 @@ std::uint64_t averageout_task_foreach(std::size_t vector_size, Executor&& exec)
92
92
93
93
if (num_overlapping_loops <= 0 )
94
94
{
95
- std::uint64_t start = hpx::chrono::high_resolution_clock::now ();
95
+ std::uint64_t const start = hpx::chrono::high_resolution_clock::now ();
96
96
97
97
for (auto i = 0 ; i < test_count; i++)
98
98
measure_task_foreach (data_representation, exec).wait ();
@@ -103,7 +103,7 @@ std::uint64_t averageout_task_foreach(std::size_t vector_size, Executor&& exec)
103
103
std::vector<hpx::shared_future<void >> tests;
104
104
tests.resize (num_overlapping_loops);
105
105
106
- std::uint64_t start = hpx::chrono::high_resolution_clock::now ();
106
+ std::uint64_t const start = hpx::chrono::high_resolution_clock::now ();
107
107
108
108
for (auto i = 0 ; i < test_count; i++)
109
109
{
@@ -124,7 +124,7 @@ std::uint64_t averageout_sequential_foreach(std::size_t vector_size)
124
124
std::iota (
125
125
std::begin (data_representation), std::end (data_representation), gen ());
126
126
127
- std::uint64_t start = hpx::chrono::high_resolution_clock::now ();
127
+ std::uint64_t const start = hpx::chrono::high_resolution_clock::now ();
128
128
129
129
// average out 100 executions to avoid varying results
130
130
for (auto i = 0 ; i < test_count; i++)
@@ -142,7 +142,7 @@ std::uint64_t averageout_parallel_forloop(
142
142
std::iota (
143
143
std::begin (data_representation), std::end (data_representation), gen ());
144
144
145
- std::uint64_t start = hpx::chrono::high_resolution_clock::now ();
145
+ std::uint64_t const start = hpx::chrono::high_resolution_clock::now ();
146
146
147
147
// average out 100 executions to avoid varying results
148
148
for (auto i = 0 ; i < test_count; i++)
@@ -167,7 +167,7 @@ std::uint64_t averageout_task_forloop(std::size_t vector_size, Executor&& exec)
167
167
168
168
if (num_overlapping_loops <= 0 )
169
169
{
170
- std::uint64_t start = hpx::chrono::high_resolution_clock::now ();
170
+ std::uint64_t const start = hpx::chrono::high_resolution_clock::now ();
171
171
172
172
for (auto i = 0 ; i < test_count; i++)
173
173
measure_task_forloop (data_representation, exec).wait ();
@@ -178,7 +178,7 @@ std::uint64_t averageout_task_forloop(std::size_t vector_size, Executor&& exec)
178
178
std::vector<hpx::shared_future<void >> tests;
179
179
tests.resize (num_overlapping_loops);
180
180
181
- std::uint64_t start = hpx::chrono::high_resolution_clock::now ();
181
+ std::uint64_t const start = hpx::chrono::high_resolution_clock::now ();
182
182
183
183
for (auto i = 0 ; i < test_count; i++)
184
184
{
@@ -199,7 +199,7 @@ std::uint64_t averageout_sequential_forloop(std::size_t vector_size)
199
199
std::iota (
200
200
std::begin (data_representation), std::end (data_representation), gen ());
201
201
202
- std::uint64_t start = hpx::chrono::high_resolution_clock::now ();
202
+ std::uint64_t const start = hpx::chrono::high_resolution_clock::now ();
203
203
204
204
// average out 100 executions to avoid varying results
205
205
for (auto i = 0 ; i < test_count; i++)
@@ -212,8 +212,8 @@ std::uint64_t averageout_sequential_forloop(std::size_t vector_size)
212
212
int hpx_main (hpx::program_options::variables_map& vm)
213
213
{
214
214
// pull values from cmd
215
- std::size_t vector_size = vm[" vector_size" ].as <std::size_t >();
216
- bool csvoutput = vm.count (" csv_output" ) != 0 ;
215
+ std::size_t const vector_size = vm[" vector_size" ].as <std::size_t >();
216
+ bool const csvoutput = vm.count (" csv_output" ) != 0 ;
217
217
delay = vm[" work_delay" ].as <int >();
218
218
test_count = vm[" test_count" ].as <int >();
219
219
chunk_size = vm[" chunk_size" ].as <int >();
@@ -264,8 +264,8 @@ int hpx_main(hpx::program_options::variables_map& vm)
264
264
std::uint64_t task_time_forloop = 0 ;
265
265
std::uint64_t seq_time_forloop = 0 ;
266
266
267
- std::uint64_t plain_time_for = averageout_plain_for (vector_size);
268
- std::uint64_t plain_time_for_iter =
267
+ std::uint64_t const plain_time_for = averageout_plain_for (vector_size);
268
+ std::uint64_t const plain_time_for_iter =
269
269
averageout_plain_for_iter (vector_size);
270
270
271
271
if (vm[" executor" ].as <std::string>() == " forkjoin" )
@@ -467,11 +467,15 @@ int hpx_main(hpx::program_options::variables_map& vm)
467
467
<< std::left
468
468
<< " Parallel Scale : " << std::right
469
469
<< std::setw (8 )
470
- << (double (seq_time_foreach) / par_time_foreach) << " \n "
470
+ << (static_cast <double >(seq_time_foreach) /
471
+ par_time_foreach)
472
+ << " \n "
471
473
<< std::left
472
474
<< " Task Scale : " << std::right
473
475
<< std::setw (8 )
474
- << (double (seq_time_foreach) / task_time_foreach) << " \n "
476
+ << (static_cast <double >(seq_time_foreach) /
477
+ task_time_foreach)
478
+ << " \n "
475
479
<< std::flush;
476
480
477
481
std::cout << " -------------Average-(for_loop)----------------\n "
@@ -490,11 +494,15 @@ int hpx_main(hpx::program_options::variables_map& vm)
490
494
<< std::left
491
495
<< " Parallel Scale : " << std::right
492
496
<< std::setw (8 )
493
- << (double (seq_time_forloop) / par_time_forloop) << " \n "
497
+ << (static_cast <double >(seq_time_forloop) /
498
+ par_time_forloop)
499
+ << " \n "
494
500
<< std::left
495
501
<< " Task Scale : " << std::right
496
502
<< std::setw (8 )
497
- << (double (seq_time_forloop) / task_time_forloop) << " \n " ;
503
+ << (static_cast <double >(seq_time_forloop) /
504
+ task_time_forloop)
505
+ << " \n " ;
498
506
}
499
507
}
500
508
0 commit comments