Skip to content

Commit b5af95f

Browse files
Fznamznonbader
authored andcommitted
[SYCL] Use proper vector length in Boolean type
Old selection of length caused problems in select relational built-ins for vectors of length = 3: there was created use of Select SPIRV instruction with vectors of different length in arguments which is incorrect. Signed-off-by: Mariya Podchishchaeva <[email protected]>
1 parent 2c306be commit b5af95f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sycl/include/CL/sycl/detail/boolean.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ template <int N> struct alignas(N == 3 ? 4 : N) Boolean {
5151

5252
#ifdef __SYCL_DEVICE_ONLY__
5353
using DataType =
54-
element_type __attribute__((ext_vector_type(N == 3 ? 4 : N)));
54+
element_type __attribute__((ext_vector_type(N)));
5555
using vector_t = DataType;
5656
#else
57-
using DataType = element_type[N == 3 ? 4 : N];
57+
using DataType = element_type[N];
5858
#endif
5959

6060
Boolean() : value{false} {}
@@ -141,4 +141,4 @@ template <> struct alignas(1) Boolean<1> {
141141

142142
} // namespace detail
143143
} // namespace sycl
144-
} // namespace cl
144+
} // namespace cl

0 commit comments

Comments
 (0)