@@ -244,14 +244,19 @@ void add_test(queue q, size_t N) {
244
244
constexpr bool do_ext_tests = space != access::address_space::generic_space;
245
245
if constexpr (do_local_tests) {
246
246
<<<<<<< HEAD
247
+ <<<<<<< HEAD
247
248
#ifdef RUN_DEPRECATED
248
249
=======
249
250
>>>>>>> 88ee9d1a0 ([SYCL] Add tests for atomics with various memory orders and scopes (#534 ))
251
+ =======
252
+ #ifdef RUN_DEPRECATED
253
+ >>>>>>> a5f90c0cd ([SYCL] Speed up atomic_ref tests (#879 ))
250
254
if constexpr (do_ext_tests) {
251
255
add_fetch_local_test<::sycl::ext::oneapi::atomic_ref, space, T,
252
256
Difference, order, scope>(q, N);
253
257
}
254
258
<<<<<<< HEAD
259
+ <<<<<<< HEAD
255
260
#else
256
261
add_fetch_local_test<::sycl::atomic_ref, space, T, Difference, order,
257
262
scope>(q, N);
@@ -260,11 +265,19 @@ void add_test(queue q, size_t N) {
260
265
if constexpr (do_global_tests) {
261
266
#ifdef RUN_DEPRECATED
262
267
=======
268
+ =======
269
+ #else
270
+ >>>>>>> a5f90c0cd ([SYCL] Speed up atomic_ref tests (#879 ))
263
271
add_fetch_local_test<::sycl::atomic_ref, space, T, Difference, order,
264
272
scope>(q, N);
273
+ #endif
265
274
}
266
275
if constexpr (do_global_tests) {
276
+ <<<<<<< HEAD
267
277
>>>>>>> 88ee9d1a0 ([SYCL] Add tests for atomics with various memory orders and scopes (#534 ))
278
+ =======
279
+ #ifdef RUN_DEPRECATED
280
+ >>>>>>> a5f90c0cd ([SYCL] Speed up atomic_ref tests (#879 ))
268
281
if constexpr (do_ext_tests) {
269
282
add_fetch_test<::sycl::ext::oneapi::atomic_ref, space, T, Difference,
270
283
order, scope>(q, N);
@@ -278,9 +291,13 @@ void add_test(queue q, size_t N) {
278
291
}
279
292
}
280
293
<<<<<<< HEAD
294
+ <<<<<<< HEAD
281
295
#else
282
296
=======
283
297
>>>>>>> 88ee9d1a0 ([SYCL] Add tests for atomics with various memory orders and scopes (#534 ))
298
+ =======
299
+ #else
300
+ >>>>>>> a5f90c0cd ([SYCL] Speed up atomic_ref tests (#879 ))
284
301
add_fetch_test<::sycl::atomic_ref, space, T, Difference, order, scope>(q,
285
302
N);
286
303
add_plus_equal_test<::sycl::atomic_ref, space, T, Difference, order, scope>(
@@ -292,9 +309,13 @@ void add_test(queue q, size_t N) {
292
309
q, N);
293
310
}
294
311
<<<<<<< HEAD
312
+ <<<<<<< HEAD
295
313
#endif
296
314
=======
297
315
>>>>>>> 88ee9d1a0 ([SYCL] Add tests for atomics with various memory orders and scopes (#534 ))
316
+ =======
317
+ #endif
318
+ >>>>>>> a5f90c0cd ([SYCL] Speed up atomic_ref tests (#879 ))
298
319
}
299
320
}
300
321
@@ -303,6 +324,7 @@ template <access::address_space space, typename T, typename Difference = T,
303
324
void add_test_scopes (queue q, size_t N) {
304
325
std::vector<memory_scope> scopes =
305
326
q.get_device ().get_info <info::device::atomic_memory_scope_capabilities>();
327
+ <<<<<<< HEAD
306
328
<<<<<<< HEAD
307
329
if (std::find (scopes.begin (), scopes.end (), memory_scope::system) !=
308
330
scopes.end ()) {
@@ -320,35 +342,33 @@ void add_test_scopes(queue q, size_t N) {
320
342
=======
321
343
#if defined(SYSTEM)
322
344
if (std::find (scopes.begin (), scopes.end (), memory_scope::system) ==
345
+ =======
346
+ if (std::find (scopes.begin (), scopes.end (), memory_scope::system) !=
347
+ >>>>>>> a5f90c0cd ([SYCL] Speed up atomic_ref tests (#879 ))
323
348
scopes.end ()) {
324
- std::cout << " Skipping test\n " ;
325
- return ;
349
+ add_test<space, T, Difference, order, memory_scope::system>(q, N);
326
350
}
327
- add_test<space, T, Difference, order, memory_scope::system>(q, N);
328
- #elif defined(WORK_GROUP)
329
- if (std::find (scopes.begin (), scopes.end (), memory_scope::system) ==
351
+ if (std::find (scopes.begin (), scopes.end (), memory_scope::work_group) !=
330
352
scopes.end ()) {
331
- std::cout << " Skipping test\n " ;
332
- return ;
353
+ add_test<space, T, Difference, order, memory_scope::work_group>(q, N);
333
354
}
334
- add_test<space, T, Difference, order, memory_scope::work_group>(q, N);
335
- #elif defined(SUB_GROUP)
336
- if (std::find (scopes.begin (), scopes.end (), memory_scope::system) ==
355
+ if (std::find (scopes.begin (), scopes.end (), memory_scope::sub_group) !=
337
356
scopes.end ()) {
338
- std::cout << " Skipping test\n " ;
339
- return ;
357
+ add_test<space, T, Difference, order, memory_scope::sub_group>(q, N);
340
358
}
341
- add_test<space, T, Difference, order, memory_scope::sub_group>(q, N);
342
- #else
343
359
add_test<space, T, Difference, order, memory_scope::device>(q, N);
360
+ <<<<<<< HEAD
344
361
#endif
345
362
>>>>>>> 88ee9d1a0 ([SYCL] Add tests for atomics with various memory orders and scopes (#534 ))
363
+ =======
364
+ >>>>>>> a5f90c0cd ([SYCL] Speed up atomic_ref tests (#879 ))
346
365
}
347
366
348
367
template <access::address_space space, typename T, typename Difference = T>
349
368
void add_test_orders_scopes (queue q, size_t N) {
350
369
std::vector<memory_order> orders =
351
370
q.get_device ().get_info <info::device::atomic_memory_order_capabilities>();
371
+ <<<<<<< HEAD
352
372
<<<<<<< HEAD
353
373
if (std::find (orders.begin (), orders.end (), memory_order::acq_rel) !=
354
374
orders.end ()) {
@@ -366,36 +386,34 @@ void add_test_orders_scopes(queue q, size_t N) {
366
386
=======
367
387
#if defined(ACQ_REL)
368
388
if (std::find (orders.begin (), orders.end (), memory_order::acq_rel) ==
389
+ =======
390
+ if (std::find (orders.begin (), orders.end (), memory_order::acq_rel) !=
391
+ >>>>>>> a5f90c0cd ([SYCL] Speed up atomic_ref tests (#879 ))
369
392
orders.end ()) {
370
- std::cout << " Skipping test\n " ;
371
- return ;
393
+ add_test_scopes<space, T, Difference, memory_order::acq_rel>(q, N);
372
394
}
373
- add_test_scopes<space, T, Difference, memory_order::acq_rel>(q, N);
374
- #elif defined(ACQUIRE)
375
- if (std::find (orders.begin (), orders.end (), memory_order::acquire) ==
395
+ if (std::find (orders.begin (), orders.end (), memory_order::acquire) !=
376
396
orders.end ()) {
377
- std::cout << " Skipping test\n " ;
378
- return ;
397
+ add_test_scopes<space, T, Difference, memory_order::acquire>(q, N);
379
398
}
380
- add_test_scopes<space, T, Difference, memory_order::acquire>(q, N);
381
- #elif defined(RELEASE)
382
- if (std::find (orders.begin (), orders.end (), memory_order::release) ==
399
+ if (std::find (orders.begin (), orders.end (), memory_order::release) !=
383
400
orders.end ()) {
384
- std::cout << " Skipping test\n " ;
385
- return ;
401
+ add_test_scopes<space, T, Difference, memory_order::release>(q, N);
386
402
}
387
- add_test_scopes<space, T, Difference, memory_order::release>(q, N);
388
- #else
389
403
add_test_scopes<space, T, Difference, memory_order::relaxed>(q, N);
404
+ <<<<<<< HEAD
390
405
#endif
391
406
>>>>>>> 88ee9d1a0 ([SYCL] Add tests for atomics with various memory orders and scopes (#534 ))
407
+ =======
408
+ >>>>>>> a5f90c0cd ([SYCL] Speed up atomic_ref tests (#879 ))
392
409
}
393
410
394
411
template <access::address_space space> void add_test_all () {
395
412
queue q;
396
413
397
414
constexpr int N = 32 ;
398
415
<<<<<<< HEAD
416
+ <<<<<<< HEAD
399
417
#ifdef FULL_ATOMIC64_COVERAGE
400
418
add_test_orders_scopes<space, double >(q, N);
401
419
=======
@@ -408,6 +426,10 @@ template <access::address_space space> void add_test_all() {
408
426
add_test_orders_scopes<space, double >(q, N);
409
427
#ifndef FP_TESTS_ONLY
410
428
>>>>>>> 88ee9d1a0 ([SYCL] Add tests for atomics with various memory orders and scopes (#534 ))
429
+ =======
430
+ #ifdef FULL_ATOMIC64_COVERAGE
431
+ add_test_orders_scopes<space, double >(q, N);
432
+ >>>>>>> a5f90c0cd ([SYCL] Speed up atomic_ref tests (#879 ))
411
433
if constexpr (sizeof (long ) == 8 ) {
412
434
add_test_orders_scopes<space, long >(q, N);
413
435
add_test_orders_scopes<space, unsigned long >(q, N);
@@ -420,6 +442,7 @@ template <access::address_space space> void add_test_all() {
420
442
add_test_orders_scopes<space, char *, ptrdiff_t >(q, N);
421
443
}
422
444
#endif
445
+ <<<<<<< HEAD
423
446
<<<<<<< HEAD
424
447
add_test_orders_scopes<space, float >(q, N);
425
448
#ifdef FULL_ATOMIC32_COVERAGE
@@ -428,6 +451,10 @@ template <access::address_space space> void add_test_all() {
428
451
add_test_orders_scopes<space, float >(q, N);
429
452
#ifndef FP_TESTS_ONLY
430
453
>>>>>>> 88ee9d1a0 ([SYCL] Add tests for atomics with various memory orders and scopes (#534 ))
454
+ =======
455
+ add_test_orders_scopes<space, float >(q, N);
456
+ #ifdef FULL_ATOMIC32_COVERAGE
457
+ >>>>>>> a5f90c0cd ([SYCL] Speed up atomic_ref tests (#879 ))
431
458
add_test_orders_scopes<space, int >(q, N);
432
459
add_test_orders_scopes<space, unsigned int >(q, N);
433
460
if constexpr (sizeof (long ) == 4 ) {
@@ -439,9 +466,12 @@ template <access::address_space space> void add_test_all() {
439
466
}
440
467
#endif
441
468
<<<<<<< HEAD
469
+ <<<<<<< HEAD
442
470
=======
443
471
#endif
444
472
445
473
>>>>>>> 88ee9d1a0 ([SYCL] Add tests for atomics with various memory orders and scopes (#534 ))
474
+ =======
475
+ >>>>>>> a5f90c0cd ([SYCL] Speed up atomic_ref tests (#879 ))
446
476
std::cout << " Test passed." << std::endl;
447
477
}
0 commit comments