Skip to content

Commit 69e5edb

Browse files
committed
Align proposed extension with implementation
1 parent 6d13aef commit 69e5edb

File tree

2 files changed

+42
-33
lines changed

2 files changed

+42
-33
lines changed

sycl/doc/extensions/proposed/sycl_ext_oneapi_group_sort.asciidoc

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
== Notice
1515

1616
[%hardbreaks]
17-
Copyright (c) 2021-2022 Intel Corporation. All rights reserved.
17+
Copyright (c) 2021-2024 Intel Corporation. All rights reserved.
1818

1919
Khronos(R) is a registered trademark and SYCL(TM) and SPIR(TM) are trademarks
2020
of The Khronos Group Inc. OpenCL(TM) is a trademark of Apple Inc. used by
@@ -34,19 +34,16 @@ SYCL specification refer to that revision.
3434

3535
This extension also depends on the following other SYCL extensions:
3636

37-
* link:../experimental/sycl_ext_oneapi_properties.asciidoc[
38-
sycl_ext_oneapi_properties].
37+
* link:../experimental/sycl_ext_oneapi_properties.asciidoc[sycl_ext_oneapi_properties]
3938

4039
== Status
4140

42-
This is a proposed update to an existing experimental extension.
43-
Interfaces defined in this
44-
specification may not be implemented yet or may be in a preliminary state. The
45-
specification itself may also change in incompatible ways before it is
46-
finalized. *Shipping software products should not rely on APIs defined in this
47-
specification.* See
48-
link:../experimental/sycl_ext_oneapi_group_sort.asciidoc[here] for the existing
49-
extension, which is implemented.
41+
This is an experimental extension specification, intended to provide early
42+
access to features and gather community feedback. Interfaces defined in this
43+
specification are implemented in {dpcpp}, but they are not finalized and may
44+
change incompatibly in future versions of {dpcpp} without prior notice.
45+
*Shipping software products should not rely on APIs defined in this
46+
specification.*
5047

5148
== Introduction
5249

@@ -963,20 +960,37 @@ Consider 2 layouts:
963960
|{2, 5, 8, 11}
964961
|===
965962

966-
There are 2 properties that satisfy
967-
link:sycl_ext_oneapi_properties.asciidoc[SYCL Properties Extension]
963+
There are 2 compile-time properties that satisfy
964+
link:../experimental/sycl_ext_oneapi_properties.asciidoc[SYCL Properties Extension]
968965
requirements:
969966

970967
[source,c++]
971968
----
972-
namespace sycl::ext::oneapi::experimental::property
973-
{
974-
template<group_algorithm_data_placement type>
975-
struct input_data_placement; // (1)
969+
namespace sycl::ext::oneapi::experimental {
976970
977-
template<group_algorithm_data_placement type>
978-
struct output_data_placement; // (2)
979-
}
971+
struct input_data_placement_key : /* unspecified */ {
972+
template <group_algorithm_data_placement Placement>
973+
using value_t =
974+
property_value<input_data_placement_key,
975+
std::integral_constant<group_algorithm_data_placement, Placement>>;
976+
};
977+
978+
struct output_data_placement_key : /* unspecified */ {
979+
template <group_algorithm_data_placement Placement>
980+
using value_t =
981+
property_value<output_data_placement_key,
982+
std::integral_constant<group_algorithm_data_placement, Placement>>;
983+
};
984+
985+
template <group_algorithm_data_placement Placement>
986+
inline constexpr input_data_placement_key::value_t<Placement>
987+
input_data_placement; // (1)
988+
989+
template <group_algorithm_data_placement Placement>
990+
inline constexpr output_data_placement_key::value_t<Placement>
991+
output_data_placement; // (2)
992+
993+
} // namespace sycl::ext::oneapi::experimental
980994
----
981995

982996
1. `input_data_placement` specifies the data placement for input. This is
@@ -1192,12 +1206,6 @@ because it's easy to pass different comparator types.
11921206
overloads with `Compare` objects seems extra and overloads with sorters,
11931207
without sorters are enough.
11941208

1195-
== Non-implemented features
1196-
Please, note that following is not inplemented yet for the open-source repo:
1197-
1198-
. `radix_sorter`, `radix_order`.
1199-
. fixed-size arrays and properties.
1200-
12011209
== Revision History
12021210

12031211
[cols="5,15,15,70"]
@@ -1211,4 +1219,5 @@ Please, note that following is not inplemented yet for the open-source repo:
12111219
making the entire extension experimental
12121220
|4|2022-11-14|Andrey Fedorov|Fixed size arrays, key-value sorting and properties
12131221
|5|2023-11-09|Andrey Fedorov|Changed `memory_required` functions for default sorters
1222+
|6|2024-07-17|Artur Gainullin|Align the description of data placement properties with the implementation
12141223
|========================================

sycl/include/sycl/ext/oneapi/experimental/group_helpers_sorters.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,22 @@ namespace sycl {
3737
inline namespace _V1 {
3838
namespace ext::oneapi::experimental {
3939

40-
enum class group_algorithm_data_placement { blocked, striped };
40+
enum class group_algorithm_data_placement : std::uint8_t { blocked, striped };
4141

4242
struct input_data_placement_key
4343
: detail::compile_time_property_key<detail::PropKind::InputDataPlacement> {
4444
template <group_algorithm_data_placement Placement>
45-
using value_t =
46-
property_value<input_data_placement_key,
47-
std::integral_constant<int, static_cast<int>(Placement)>>;
45+
using value_t = property_value<
46+
input_data_placement_key,
47+
std::integral_constant<group_algorithm_data_placement, Placement>>;
4848
};
4949

5050
struct output_data_placement_key
5151
: detail::compile_time_property_key<detail::PropKind::OutputDataPlacement> {
5252
template <group_algorithm_data_placement Placement>
53-
using value_t =
54-
property_value<output_data_placement_key,
55-
std::integral_constant<int, static_cast<int>(Placement)>>;
53+
using value_t = property_value<
54+
output_data_placement_key,
55+
std::integral_constant<group_algorithm_data_placement, Placement>>;
5656
};
5757

5858
template <group_algorithm_data_placement Placement>

0 commit comments

Comments
 (0)