2121#define min (a, b ) (a) < (b) ? (a) : (b)
2222#define max (a, b ) (a) > (b) ? (a) : (b)
2323
24- #define LOOP_NUM 50
24+ #define LOOP_NUM 5
2525
2626void atomicKernel (int *atom_arr, sycl::nd_item<3 > item_ct1) {
2727 unsigned int tid = item_ct1.get_local_range ().get (2 ) * item_ct1.get_group (2 ) +
@@ -271,11 +271,6 @@ int main(int argc, char **argv) {
271271 .get_info <sycl::info::device::name>()
272272 << " \n " ;
273273
274- std::chrono::time_point<std::chrono::steady_clock> start_ct1;
275- std::chrono::time_point<std::chrono::steady_clock> stop_ct1;
276-
277- start_ct1 = std::chrono::steady_clock::now ();
278-
279274 {
280275 std::pair<syclcompat::buffer_t , size_t > atom_arr_buf_ct0 =
281276 syclcompat::get_buffer_and_offset (atom_arr);
@@ -296,17 +291,6 @@ int main(int argc, char **argv) {
296291 });
297292 }
298293
299- stop_ct1 = std::chrono::steady_clock::now ();
300-
301- float elapsed_time = 0 ;
302- // calculate elapsed time
303- elapsed_time =
304- std::chrono::duration<float , std::milli>(stop_ct1 - start_ct1).count ();
305-
306- printf (" Measured time for parallel execution with "
307- " std::chrono::steady_clock = %.3f ms\n " ,
308- elapsed_time);
309-
310294 atomicKernel_CPU (syclcompat::get_host_ptr<int >(atom_arr), numBlocks * numThreads);
311295
312296 syclcompat::get_current_device ().queues_wait_and_throw ();
0 commit comments