@@ -49,6 +49,33 @@ of parallel range algorithms.
49
49
template<typename I, typename Proj>
50
50
using /*projected-value-type*/ = std::remove_cvref_t<std::invoke_result_t<Proj&, std::iter_value_t<I>&>>;
51
51
52
+ // Extension of C++20 exposition-only special memory concepts as defined in [special.mem.concepts]
53
+ template<typename S, typename I>
54
+ concept no-throw-sized-sentinel-for = // exposition only
55
+ no-throw-sentinel-for<S, I> &&
56
+ std::sized_sentinel_for<S, I>;
57
+
58
+ template<typename I>
59
+ concept no-throw-bidirectional-iterator = // exposition only
60
+ no-throw-forward-iterator<I> &&
61
+ std::bidirectional_iterator<I>;
62
+
63
+ template<typename I>
64
+ concept no-throw-random-access-iterator = // exposition only
65
+ no-throw-bidirectional-iterator<I> &&
66
+ std::random_access_iterator<I> &&
67
+ no-throw-sized-sentinel-for<I, I>;
68
+
69
+ template<typename R>
70
+ concept no-throw-bidirectional-range = // exposition only
71
+ no-throw-forward-range<R> &&
72
+ no-throw-bidirectional-iterator<std::ranges::iterator_t<R>>;
73
+
74
+ template<typename R>
75
+ concept no-throw-random-access-range = // exposition only
76
+ no-throw-bidirectional-range<R> &&
77
+ no-throw-random-access-iterator<std::ranges::iterator_t<R>>;
78
+
52
79
Whole Sequence Operations
53
80
+++++++++++++++++++++++++
54
81
@@ -526,5 +553,67 @@ In-place Mutating Operations
526
553
527
554
}
528
555
556
+ Uninitialized Memory Algorithms
557
+ +++++++++++++++++++++++++++++++
558
+
559
+ .. code :: cpp
560
+
561
+ // Defined in <oneapi/dpl/memory>
562
+
563
+ namespace oneapi::dpl::ranges {
564
+
565
+ // uninitialized_default_construct
566
+ template <typename ExecutionPolicy, /*no-throw-random-access-range*/ R>
567
+ requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
568
+ std::ranges::sized_range<R> &&
569
+ std::default_initializable<std::ranges::range_value_t<R>>
570
+ std::ranges::borrowed_iterator_t<R>
571
+ uninitialized_default_construct (ExecutionPolicy&& pol, R&& r);
572
+
573
+ // uninitialized_value_construct
574
+ template <typename ExecutionPolicy, /*no-throw-random-access-range*/ R>
575
+ requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
576
+ std::ranges::sized_range<R> &&
577
+ std::default_initializable<std::ranges::range_value_t<R>>
578
+ std::ranges::borrowed_iterator_t<R>
579
+ uninitialized_value_construct (ExecutionPolicy&& pol, R&& r, const std::ranges::range_value_t<R>& value);
580
+
581
+ // uninitialized_copy
582
+ template <typename ExecutionPolicy, std::random_access_range IR, /*no-throw-random-access-range*/ OR>
583
+ requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
584
+ std::ranges::sized_range<IR> && std::ranges::sized_range<OR> &&
585
+ std::constructible_from<std::ranges::range_value_t<OR>, std::ranges::range_reference_t<IR>>
586
+ std::ranges::uninitialized_copy_result<std::ranges::borrowed_iterator_t<IR>,
587
+ std::ranges::borrowed_iterator_t<OR>>
588
+ uninitialized_copy (ExecutionPolicy&& pol, IR&& in_range, OR&& out_range);
589
+
590
+ // uninitialized_move
591
+ template <typename ExecutionPolicy, std::ranges::random_access_range IR,
592
+ /*no-throw-random-access-range*/ OR>
593
+ requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
594
+ std::ranges::sized_range<IR> && std::ranges::sized_range<OR> &&
595
+ std::constructible_from<std::ranges::range_value_t<OR>, std::ranges::range_reference_t<IR>>
596
+ std::ranges::uninitialized_move_result<std::ranges::borrowed_iterator_t<IR>,
597
+ std::ranges::borrowed_iterator_t<OR>>
598
+ uninitialized_move (ExecutionPolicy&& pol, IR&& in_range, OR&& out_range);
599
+
600
+ // uninitialized_fill
601
+ template <typename ExecutionPolicy, /*no-throw-random-access-range*/ R,
602
+ typename T>
603
+ requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
604
+ std::ranges::sized_range<R> &&
605
+ std::constructible_from<std::ranges::range_value_t<R>, const T&>
606
+ std::ranges::borrowed_iterator_t<R>
607
+ uninitialized_fill (ExecutionPolicy&& pol, R&& r, const T& value);
608
+
609
+ // destroy
610
+ template <typename ExecutionPolicy, /*no-throw-random-access-range*/ R>
611
+ requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
612
+ std::ranges::sized_range<R> &&
613
+ std::destructible<std::ranges::range_value_t<R>>
614
+ std::ranges::borrowed_iterator_t<R>
615
+ destroy (ExecutionPolicy&& pol, R&& r);
616
+ }
617
+
529
618
.. _`C++ Standard` : https://isocpp.org/std/the-standard
530
619
.. _`SYCL` : https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html
0 commit comments