| 1453 | |
| 1454 | template <class RandomIt> |
| 1455 | HIPSYCL_STDPAR_ENTRYPOINT void sort(hipsycl::stdpar::par_unseq, RandomIt first, |
| 1456 | RandomIt last) { |
| 1457 | auto offloader = [&](auto& queue) { |
| 1458 | hipsycl::algorithms::sort(queue, first, last); |
| 1459 | }; |
| 1460 | |
| 1461 | auto fallback = [&](){ |
| 1462 | std::sort(hipsycl::stdpar::par_unseq_host_fallback, first, last); |
| 1463 | }; |
| 1464 | |
| 1465 | HIPSYCL_STDPAR_OFFLOAD_NORET( |
| 1466 | hipsycl::stdpar::algorithm( |
| 1467 | hipsycl::stdpar::algorithm_category::sort{}, |
| 1468 | hipsycl::stdpar::par_unseq{}), |
| 1469 | std::distance(first, last), offloader, fallback, first, |
| 1470 | HIPSYCL_STDPAR_NO_PTR_VALIDATION(last)); |
| 1471 | } |
| 1472 | |
| 1473 | |
| 1474 | template <class RandomIt, class Compare> |
no test coverage detected