Skip to content

Commit 5b7d56a

Browse files
authored
[SYCL][ESIMD] Fix host compilation errors when sycl.hpp is not included. (#3838)
* [SYCL][ESIMD] Fix host compilation errors when sycl.hpp is not included. Signed-off-by: kbobrovs <[email protected]>
1 parent fae35db commit 5b7d56a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

sycl/include/sycl/ext/intel/experimental/esimd/detail/host_util.hpp

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
#ifndef __SYCL_DEVICE_ONLY__
1414

15+
#include <limits>
16+
1517
#define SIMDCF_ELEMENT_SKIP(i)
1618

1719
__SYCL_INLINE_NAMESPACE(cl) {
@@ -33,6 +35,7 @@ namespace esimd {
3335
namespace emu {
3436
namespace detail {
3537

38+
using half = sycl::detail::half_impl::half;
3639
constexpr int sat_is_on = 1;
3740

3841
static long long abs(long long a) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// RUN: %clangxx -fsycl -fsyntax-only %s
2+
// expected-no-diagnostics
3+
4+
#include <sycl/ext/intel/experimental/esimd.hpp>
5+
6+
// This test checks that host compiler can compile esimd.hpp when there is no
7+
// sycl.hpp included (can happen in pure-ESIMD library).

0 commit comments

Comments
 (0)