Skip to content

Commit d44aa3f

Browse files
[ESIMD][NFC] Remove unnecessary macro checks (#2900)
1 parent d4251e3 commit d44aa3f

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

sycl/include/CL/sycl/INTEL/esimd/esimd_memory.hpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,12 @@ ESIMD_INLINE ESIMD_NODEBUG simd<T, n> block_load(AccessorTy acc,
200200
static_assert(Sz <= 8 * __esimd::OWORD,
201201
"block size must be at most 8 owords");
202202

203-
#if defined(__SYCL_DEVICE_ONLY__) && defined(__SYCL_EXPLICIT_SIMD__)
203+
#if defined(__SYCL_DEVICE_ONLY__)
204204
auto surf_ind = AccessorPrivateProxy::getNativeImageObj(acc);
205205
return __esimd_block_read<T, n>(surf_ind, offset);
206206
#else
207207
return __esimd_block_read<T, n>(acc, offset);
208-
#endif // __SYCL_DEVICE_ONLY__ && __SYCL_EXPLICIT_SIMD__
208+
#endif // __SYCL_DEVICE_ONLY__
209209
}
210210

211211
/// Flat-address block-store.
@@ -240,12 +240,12 @@ ESIMD_INLINE ESIMD_NODEBUG void block_store(AccessorTy acc, uint32_t offset,
240240
static_assert(Sz <= 8 * __esimd::OWORD,
241241
"block size must be at most 8 owords");
242242

243-
#if defined(__SYCL_DEVICE_ONLY__) && defined(__SYCL_EXPLICIT_SIMD__)
243+
#if defined(__SYCL_DEVICE_ONLY__)
244244
auto surf_ind = AccessorPrivateProxy::getNativeImageObj(acc);
245245
__esimd_block_write<T, n>(surf_ind, offset >> 4, vals.data());
246246
#else
247247
__esimd_block_write<T, n>(acc, offset >> 4, vals.data());
248-
#endif // __SYCL_DEVICE_ONLY__ && __SYCL_EXPLICIT_SIMD__
248+
#endif // __SYCL_DEVICE_ONLY__
249249
}
250250

251251
/// Accessor-based gather.
@@ -290,7 +290,7 @@ ESIMD_INLINE ESIMD_NODEBUG
290290
using PromoT =
291291
typename sycl::detail::conditional_t<std::is_signed<T>::value, int32_t,
292292
uint32_t>;
293-
#if defined(__SYCL_DEVICE_ONLY__) && defined(__SYCL_EXPLICIT_SIMD__)
293+
#if defined(__SYCL_DEVICE_ONLY__)
294294
const auto surf_ind = AccessorPrivateProxy::getNativeImageObj(acc);
295295
const simd<PromoT, N> promo_vals =
296296
__esimd_surf_read<PromoT, N, decltype(surf_ind), TypeSizeLog2, L1H,
@@ -302,7 +302,7 @@ ESIMD_INLINE ESIMD_NODEBUG
302302
#endif
303303
return sycl::INTEL::gpu::convert<T>(promo_vals);
304304
} else {
305-
#if defined(__SYCL_DEVICE_ONLY__) && defined(__SYCL_EXPLICIT_SIMD__)
305+
#if defined(__SYCL_DEVICE_ONLY__)
306306
const auto surf_ind = AccessorPrivateProxy::getNativeImageObj(acc);
307307
return __esimd_surf_read<T, N, decltype(surf_ind), TypeSizeLog2, L1H, L3H>(
308308
scale, surf_ind, glob_offset, offsets);
@@ -359,7 +359,7 @@ ESIMD_INLINE ESIMD_NODEBUG
359359
typename sycl::detail::conditional_t<std::is_signed<T>::value, int32_t,
360360
uint32_t>;
361361
const simd<PromoT, N> promo_vals = sycl::INTEL::gpu::convert<PromoT>(vals);
362-
#if defined(__SYCL_DEVICE_ONLY__) && defined(__SYCL_EXPLICIT_SIMD__)
362+
#if defined(__SYCL_DEVICE_ONLY__)
363363
const auto surf_ind = AccessorPrivateProxy::getNativeImageObj(acc);
364364
__esimd_surf_write<PromoT, N, decltype(surf_ind), TypeSizeLog2, L1H, L3H>(
365365
pred, scale, surf_ind, glob_offset, offsets, promo_vals);
@@ -368,7 +368,7 @@ ESIMD_INLINE ESIMD_NODEBUG
368368
pred, scale, acc, glob_offset, offsets, promo_vals);
369369
#endif
370370
} else {
371-
#if defined(__SYCL_DEVICE_ONLY__) && defined(__SYCL_EXPLICIT_SIMD__)
371+
#if defined(__SYCL_DEVICE_ONLY__)
372372
const auto surf_ind = AccessorPrivateProxy::getNativeImageObj(acc);
373373
__esimd_surf_write<T, N, decltype(surf_ind), TypeSizeLog2, L1H, L3H>(
374374
pred, scale, surf_ind, glob_offset, offsets, vals);
@@ -734,7 +734,7 @@ media_block_load(AccessorTy acc, unsigned x, unsigned y) {
734734
static_assert(Width <= 64u, "valid block width is in range [1, 64]");
735735
static_assert(m <= 64u, "valid block height is in range [1, 64]");
736736
static_assert(plane <= 3u, "valid plane index is in range [0, 3]");
737-
#if defined(__SYCL_DEVICE_ONLY__) && defined(__SYCL_EXPLICIT_SIMD__)
737+
#if defined(__SYCL_DEVICE_ONLY__)
738738
constexpr unsigned int RoundedWidth =
739739
Width < 4 ? 4 : __esimd::getNextPowerOf2<Width>();
740740

@@ -751,7 +751,7 @@ media_block_load(AccessorTy acc, unsigned x, unsigned y) {
751751
}
752752
#else
753753
return __esimd_media_block_load<T, m, n>(0, acc, plane, sizeof(T) * n, x, y);
754-
#endif // __SYCL_DEVICE_ONLY__ && __SYCL_EXPLICIT_SIMD__
754+
#endif // __SYCL_DEVICE_ONLY__
755755
}
756756

757757
/// Media block store.
@@ -776,7 +776,7 @@ media_block_store(AccessorTy acc, unsigned x, unsigned y, simd<T, m * n> vals) {
776776
static_assert(Width <= 64u, "valid block width is in range [1, 64]");
777777
static_assert(m <= 64u, "valid block height is in range [1, 64]");
778778
static_assert(plane <= 3u, "valid plane index is in range [0, 3]");
779-
#if defined(__SYCL_DEVICE_ONLY__) && defined(__SYCL_EXPLICIT_SIMD__)
779+
#if defined(__SYCL_DEVICE_ONLY__)
780780
constexpr unsigned int RoundedWidth =
781781
Width < 4 ? 4 : __esimd::getNextPowerOf2<Width>();
782782
constexpr unsigned int n1 = RoundedWidth / sizeof(T);
@@ -796,7 +796,7 @@ media_block_store(AccessorTy acc, unsigned x, unsigned y, simd<T, m * n> vals) {
796796
}
797797
#else
798798
__esimd_media_block_store<T, m, n>(0, acc, plane, sizeof(T) * n, x, y, vals);
799-
#endif // __SYCL_DEVICE_ONLY__ && __SYCL_EXPLICIT_SIMD__
799+
#endif // __SYCL_DEVICE_ONLY__
800800
}
801801

802802
#ifndef __SYCL_DEVICE_ONLY__
@@ -813,11 +813,11 @@ SYCL_EXTERNAL void slm_init(uint32_t size) {}
813813
/// \ingroup sycl_esimd
814814
template <typename AccessorTy>
815815
ESIMD_INLINE ESIMD_NODEBUG uint32_t esimd_get_value(AccessorTy acc) {
816-
#if defined(__SYCL_DEVICE_ONLY__) && defined(__SYCL_EXPLICIT_SIMD__)
816+
#if defined(__SYCL_DEVICE_ONLY__)
817817
return __esimd_get_value(AccessorPrivateProxy::getNativeImageObj(acc));
818818
#else
819819
return __esimd_get_value(acc);
820-
#endif // __SYCL_DEVICE_ONLY__ && __SYCL_EXPLICIT_SIMD__
820+
#endif // __SYCL_DEVICE_ONLY__
821821
}
822822

823823
/// \defgroup sycl_esimd_raw_send_api Raw send APIs

0 commit comments

Comments
 (0)