Skip to content

Commit dd5bc26

Browse files
committed
Removed if constexpr usage.
Signed-off-by: JackAKirk <[email protected]>
1 parent 4a7b44e commit dd5bc26

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

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

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,8 @@ sycl::marray<bfloat16, N> fabs(sycl::marray<bfloat16, N> x) {
143143
auto partial_res = __clc_fabs(detail::to_uint32_t(x, i * 2));
144144
std::memcpy(&res[i * 2], &partial_res, sizeof(uint32_t));
145145
}
146-
#if __cplusplus >= 201703L
147-
if constexpr (N % 2)
148-
#else
146+
149147
if (N % 2)
150-
#endif // __cplusplus >= 201703L
151148
{
152149
res[N - 1] = bfloat16::from_bits(__clc_fabs(x[N - 1].raw()));
153150
}
@@ -183,11 +180,8 @@ sycl::marray<bfloat16, N> fmin(sycl::marray<bfloat16, N> x,
183180
std::memcpy(&res[i * 2], &partial_res, sizeof(uint32_t));
184181
}
185182

186-
#if __cplusplus >= 201703L
187-
if constexpr (N % 2)
188-
#else
183+
189184
if (N % 2)
190-
#endif // __cplusplus >= 201703L
191185
{
192186
res[N - 1] =
193187
bfloat16::from_bits(__clc_fmin(x[N - 1].raw(), y[N - 1].raw()));
@@ -226,11 +220,7 @@ sycl::marray<bfloat16, N> fmax(sycl::marray<bfloat16, N> x,
226220
std::memcpy(&res[i * 2], &partial_res, sizeof(uint32_t));
227221
}
228222

229-
#if __cplusplus >= 201703L
230-
if constexpr (N % 2)
231-
#else
232223
if (N % 2)
233-
#endif // __cplusplus >= 201703L
234224
{
235225
res[N - 1] =
236226
bfloat16::from_bits(__clc_fmax(x[N - 1].raw(), y[N - 1].raw()));
@@ -271,11 +261,7 @@ sycl::marray<bfloat16, N> fma(sycl::marray<bfloat16, N> x,
271261
std::memcpy(&res[i * 2], &partial_res, sizeof(uint32_t));
272262
}
273263

274-
#if __cplusplus >= 201703L
275-
if constexpr (N % 2)
276-
#else
277264
if (N % 2)
278-
#endif // __cplusplus >= 201703L
279265
{
280266
res[N - 1] = bfloat16::from_bits(
281267
__clc_fma(x[N - 1].raw(), y[N - 1].raw(), z[N - 1].raw()));

0 commit comments

Comments
 (0)