19 #include <type_traits>
22 inline namespace _V1 {
23 namespace ext::oneapi::experimental {
27 static constexpr
bool value =
true;
29 template <
size_t X,
size_t... Xs>
struct AllNonZero<X, Xs...> {
38 template <
size_t... Dims>
40 std::integral_constant<size_t, Dims>...>;
45 template <
size_t... Dims>
47 std::integral_constant<size_t, Dims>...>;
52 template <u
int32_t Size>
54 std::integral_constant<uint32_t, Size>>;
59 template <aspect... Aspects>
61 std::integral_constant<aspect, Aspects>...>;
74 template <
size_t Dim0,
size_t... Dims>
76 std::integral_constant<size_t, Dims>...> {
78 sizeof...(Dims) + 1 <= 3,
79 "work_group_size property currently only supports up to three values.");
81 "work_group_size property must only contain non-zero values.");
86 return std::array<size_t,
sizeof...(Dims) + 1>{Dim0, Dims...}[Dim];
90 template <
size_t Dim0,
size_t... Dims>
92 std::integral_constant<size_t, Dim0>,
93 std::integral_constant<size_t, Dims>...> {
94 static_assert(
sizeof...(Dims) + 1 <= 3,
95 "work_group_size_hint property currently "
96 "only supports up to three values.");
99 "work_group_size_hint property must only contain non-zero values.");
104 return std::array<size_t,
sizeof...(Dims) + 1>{Dim0, Dims...}[Dim];
108 template <u
int32_t Size>
110 std::integral_constant<uint32_t, Size>> {
111 static_assert(Size != 0,
112 "sub_group_size_key property must contain a non-zero value.");
115 using value_t = std::integral_constant<uint32_t, Size>;
116 static constexpr uint32_t value = Size;
119 template <aspect... Aspects>
121 std::integral_constant<aspect, Aspects>...> {
123 static constexpr std::array<aspect,
sizeof...(Aspects)> value{Aspects...};
129 Dims >= 1 && Dims <= 3,
130 "nd_range_kernel_key property must use dimension of 1, 2 or 3.");
134 static constexpr
int dimensions = Dims;
141 template <
size_t Dim0,
size_t... Dims>
144 template <
size_t Dim0,
size_t... Dims>
148 template <u
int32_t Size>
151 template <aspect... Aspects>
165 std::integral_constant<forward_progress_guarantee, Guarantee>,
166 std::integral_constant<execution_scope, CoordinationScope>>;
175 std::integral_constant<forward_progress_guarantee, Guarantee>,
176 std::integral_constant<execution_scope, CoordinationScope>>;
185 std::integral_constant<forward_progress_guarantee, Guarantee>,
186 std::integral_constant<execution_scope, CoordinationScope>>;
193 std::integral_constant<forward_progress_guarantee, Guarantee>,
194 std::integral_constant<execution_scope, CoordinationScope>> {
204 std::integral_constant<forward_progress_guarantee, Guarantee>,
205 std::integral_constant<execution_scope, CoordinationScope>> {
215 std::integral_constant<forward_progress_guarantee, Guarantee>,
216 std::integral_constant<execution_scope, CoordinationScope>> {
243 template <
size_t... Dims>
246 template <
size_t... Dims>
249 template <u
int32_t Size>
252 template <sycl::aspect... Aspects>
256 template <
size_t Dim0,
size_t... Dims>
258 static constexpr
const char *
name =
"sycl-work-group-size";
259 static constexpr
const char *
value = SizeListToStr<Dim0, Dims...>
::value;
261 template <
size_t Dim0,
size_t... Dims>
263 static constexpr
const char *
name =
"sycl-work-group-size-hint";
264 static constexpr
const char *
value = SizeListToStr<Dim0, Dims...>
::value;
266 template <u
int32_t Size>
268 static constexpr
const char *
name =
"sycl-sub-group-size";
269 static constexpr uint32_t
value = Size;
271 template <aspect... Aspects>
273 static constexpr
const char *
name =
"sycl-device-has";
274 static constexpr
const char *
value =
275 SizeListToStr<static_cast<size_t>(Aspects)...>
::value;
279 static constexpr
const char *
name =
"sycl-nd-range-kernel";
283 static constexpr
const char *
name =
"sycl-single-task-kernel";
287 template <
typename T,
typename =
void>
290 template <
typename T>
292 std::void_t<decltype(std::declval<T>().get(
293 std::declval<properties_tag>()))>>
296 decltype(std::declval<T>().
get(std::declval<properties_tag>()));
304 #ifdef __SYCL_DEVICE_ONLY__
305 #define SYCL_EXT_ONEAPI_FUNCTION_PROPERTY(PROP) \
306 [[__sycl_detail__::add_ir_attributes_function( \
307 sycl::ext::oneapi::experimental::detail::PropertyMetaInfo< \
308 std::remove_cv_t<std::remove_reference_t<decltype(PROP)>>>::name, \
309 sycl::ext::oneapi::experimental::detail::PropertyMetaInfo< \
310 std::remove_cv_t<std::remove_reference_t<decltype(PROP)>>>::value)]]
312 #define SYCL_EXT_ONEAPI_FUNCTION_PROPERTY(PROP)
constexpr single_task_kernel_key::value_t single_task_kernel
constexpr sub_group_size_key::value_t< Size > sub_group_size
constexpr nd_range_kernel_key::value_t< Dims > nd_range_kernel
constexpr work_group_size_key::value_t< Dim0, Dims... > work_group_size
constexpr device_has_key::value_t< Aspects... > device_has
forward_progress_guarantee
constexpr work_group_progress_key::value_t< Guarantee, CoordinationScope > work_group_progress
constexpr sub_group_progress_key::value_t< Guarantee, CoordinationScope > sub_group_progress
constexpr work_item_progress_key::value_t< Guarantee, CoordinationScope > work_item_progress
constexpr work_group_size_hint_key::value_t< Dim0, Dims... > work_group_size_hint
static constexpr bool value
decltype(std::declval< T >().get(std::declval< properties_tag >())) properties_t
std::integral_constant< uint32_t, Size > value_t
constexpr size_t operator[](int Dim) const
constexpr size_t operator[](int Dim) const