Skip to content

Commit e0d9acd

Browse files
committed
Revert "[SYCL] use alias for readability"
This reverts commit 3f34653.
1 parent 76e20b6 commit e0d9acd

File tree

1 file changed

+36
-14
lines changed

1 file changed

+36
-14
lines changed

sycl/include/sycl/group_algorithm.hpp

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -946,15 +946,26 @@ std::enable_if_t<
946946
joint_exclusive_scan(Group g, InPtr first, InPtr last, OutPtr result,
947947
BinaryOperation binary_op) {
948948
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
949-
using binary_op_t =
950-
std::remove_cv_t<std::remove_reference_t<decltype(*first)>>;
951949
static_assert(
952-
(std::is_same_v<BinaryOperation, sycl::logical_or<binary_op_t>> ||
953-
std::is_same_v<BinaryOperation, sycl::logical_and<binary_op_t>>)
954-
? std::is_same_v<decltype(binary_op(binary_op_t(), binary_op_t())),
950+
(std::is_same_v<BinaryOperation,
951+
sycl::logical_or<std::remove_cv_t<
952+
std::remove_reference_t<decltype(*first)>>>> ||
953+
std::is_same_v<BinaryOperation,
954+
sycl::logical_and<std::remove_cv_t<
955+
std::remove_reference_t<decltype(*first)>>>>)
956+
? std::is_same_v<decltype(binary_op(
957+
std::remove_cv_t<
958+
std::remove_reference_t<decltype(*first)>>(),
959+
std::remove_cv_t<std::remove_reference_t<
960+
decltype(*first)>>())),
955961
bool>
956-
: std::is_same_v<decltype(binary_op(binary_op_t(), binary_op_t())),
957-
binary_op_t>,
962+
: std::is_same_v<
963+
decltype(binary_op(
964+
std::remove_cv_t<
965+
std::remove_reference_t<decltype(*first)>>(),
966+
std::remove_cv_t<
967+
std::remove_reference_t<decltype(*first)>>())),
968+
std::remove_cv_t<std::remove_reference_t<decltype(*first)>>>,
958969
"Result type of binary_op must match scan accumulation type.");
959970
#else
960971
static_assert(std::is_same_v<decltype(binary_op(*first, *first)),
@@ -1177,15 +1188,26 @@ std::enable_if_t<
11771188
joint_inclusive_scan(Group g, InPtr first, InPtr last, OutPtr result,
11781189
BinaryOperation binary_op) {
11791190
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
1180-
using binary_op_t =
1181-
std::remove_cv_t<std::remove_reference_t<decltype(*first)>>;
11821191
static_assert(
1183-
(std::is_same_v<BinaryOperation, sycl::logical_or<binary_op_t>> ||
1184-
std::is_same_v<BinaryOperation, sycl::logical_and<binary_op_t>>)
1185-
? std::is_same_v<decltype(binary_op(binary_op_t(), binary_op_t())),
1192+
(std::is_same_v<BinaryOperation,
1193+
sycl::logical_or<std::remove_cv_t<
1194+
std::remove_reference_t<decltype(*first)>>>> ||
1195+
std::is_same_v<BinaryOperation,
1196+
sycl::logical_and<std::remove_cv_t<
1197+
std::remove_reference_t<decltype(*first)>>>>)
1198+
? std::is_same_v<decltype(binary_op(
1199+
std::remove_cv_t<
1200+
std::remove_reference_t<decltype(*first)>>(),
1201+
std::remove_cv_t<std::remove_reference_t<
1202+
decltype(*first)>>())),
11861203
bool>
1187-
: std::is_same_v<decltype(binary_op(binary_op_t(), binary_op_t())),
1188-
binary_op_t>,
1204+
: std::is_same_v<
1205+
decltype(binary_op(
1206+
std::remove_cv_t<
1207+
std::remove_reference_t<decltype(*first)>>(),
1208+
std::remove_cv_t<
1209+
std::remove_reference_t<decltype(*first)>>())),
1210+
std::remove_cv_t<std::remove_reference_t<decltype(*first)>>>,
11891211
"Result type of binary_op must match scan accumulation type.");
11901212
#else
11911213
static_assert(std::is_same_v<decltype(binary_op(*first, *first)),

0 commit comments

Comments
 (0)