@@ -946,26 +946,15 @@ std::enable_if_t<
946946joint_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)>>;
949951 static_assert (
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)>>())),
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 ())),
961955 bool >
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)>>>,
956+ : std::is_same_v<decltype (binary_op (binary_op_t (), binary_op_t ())),
957+ binary_op_t >,
969958 " Result type of binary_op must match scan accumulation type." );
970959#else
971960 static_assert (std::is_same_v<decltype (binary_op (*first, *first)),
@@ -1188,26 +1177,15 @@ std::enable_if_t<
11881177joint_inclusive_scan (Group g, InPtr first, InPtr last, OutPtr result,
11891178 BinaryOperation binary_op) {
11901179#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
1180+ using binary_op_t =
1181+ std::remove_cv_t <std::remove_reference_t <decltype (*first)>>;
11911182 static_assert (
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)>>())),
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 ())),
12031186 bool >
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)>>>,
1187+ : std::is_same_v<decltype (binary_op (binary_op_t (), binary_op_t ())),
1188+ binary_op_t >,
12111189 " Result type of binary_op must match scan accumulation type." );
12121190#else
12131191 static_assert (std::is_same_v<decltype (binary_op (*first, *first)),
0 commit comments