Skip to content

Commit 8434b55

Browse files
committed
make check only for device side
Signed-off-by: Sarnie, Nick <[email protected]>
1 parent 7330e6d commit 8434b55

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,20 +409,24 @@ template <class Callable> constexpr void verify_callable() {
409409
static_assert(
410410
!callable_has_ref_arg,
411411
"invoke_simd does not support callables with reference arguments");
412+
#ifdef __SYCL_DEVICE_ONLY__
412413
constexpr bool callable_has_uniform_non_trivially_copyable_ret =
413414
has_non_trivially_copyable_uniform_ret(obj);
414415
static_assert(!callable_has_uniform_non_trivially_copyable_ret,
415416
"invoke_simd does not support callables returning uniforms "
416417
"that are not trivially copyable");
418+
#endif
417419
}
418420
}
419421

420422
template <class... Ts>
421423
constexpr void verify_no_uniform_non_trivially_copyable_args() {
424+
#ifdef __SYCL_DEVICE_ONLY__
422425
constexpr bool has_non_trivially_copyable_uniform_arg =
423426
(... || is_non_trivially_copyable_uniform_v<Ts>);
424427
static_assert(!has_non_trivially_copyable_uniform_arg,
425428
"Uniform arguments must be trivially copyable");
429+
#endif
426430
}
427431

428432
template <class Callable, class... Ts>

0 commit comments

Comments
 (0)