From 0502d114e6d86ef08ae41cb2614c25338e708cf0 Mon Sep 17 00:00:00 2001 From: Vyacheslav Klochkov Date: Fri, 5 Jan 2024 17:57:38 -0600 Subject: [PATCH] [ESIMD][NFC] Use __ESIMD_INTRIN_END in esimd/memory.hpp (#12309) Signed-off-by: Klochkov, Vyacheslav N --- .../ext/intel/esimd/detail/memory_intrin.hpp | 555 ++++-------------- 1 file changed, 110 insertions(+), 445 deletions(-) diff --git a/sycl/include/sycl/ext/intel/esimd/detail/memory_intrin.hpp b/sycl/include/sycl/ext/intel/esimd/detail/memory_intrin.hpp index e86e2a9a9d969..5d6437440eb39 100644 --- a/sycl/include/sycl/ext/intel/esimd/detail/memory_intrin.hpp +++ b/sycl/include/sycl/ext/intel/esimd/detail/memory_intrin.hpp @@ -84,13 +84,7 @@ __ESIMD_INTRIN N * __ESIMD_DNS::ElemsPerAddrDecoding(NumBlk)> __esimd_svm_gather(__ESIMD_DNS::vector_type_t addrs, __ESIMD_DNS::simd_mask_storage_t pred = 1) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_INTRIN_END; // flat_write does flat-address scatter template @@ -99,63 +93,30 @@ __ESIMD_INTRIN void __esimd_svm_scatter( __ESIMD_DNS::vector_type_t vals, - __ESIMD_DNS::simd_mask_storage_t pred = 1) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_DNS::simd_mask_storage_t pred = 1) __ESIMD_INTRIN_END; // Reads a block of data from given surface at given offset. template __ESIMD_INTRIN __ESIMD_DNS::vector_type_t -__esimd_oword_ld_unaligned(SurfIndAliasTy surf_ind, uint32_t offset) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__esimd_oword_ld_unaligned(SurfIndAliasTy surf_ind, + uint32_t offset) __ESIMD_INTRIN_END; // Writes given block of data to a surface with given index at given offset. template -__ESIMD_INTRIN void __esimd_oword_st(SurfIndAliasTy surf_ind, - uint32_t owords_offset, - __ESIMD_DNS::vector_type_t vals) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN void +__esimd_oword_st(SurfIndAliasTy surf_ind, uint32_t owords_offset, + __ESIMD_DNS::vector_type_t vals) __ESIMD_INTRIN_END; // Read a block of data from the given address. template -__ESIMD_INTRIN __ESIMD_DNS::vector_type_t -__esimd_svm_block_ld(const __ESIMD_DNS::vector_type_t *addr) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN __ESIMD_DNS::vector_type_t __esimd_svm_block_ld( + const __ESIMD_DNS::vector_type_t *addr) __ESIMD_INTRIN_END; // flat_block_write writes a block of data using one flat address template -__ESIMD_INTRIN void __esimd_slm_block_st(uint32_t offset, - __ESIMD_DNS::vector_type_t vals) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN void +__esimd_slm_block_st(uint32_t offset, + __ESIMD_DNS::vector_type_t vals) __ESIMD_INTRIN_END; /// SLM block_store/scatter. /// Supported platforms: DG2, PVC @@ -182,38 +143,18 @@ __ESIMD_INTRIN void __esimd_lsc_store_slm( __ESIMD_DNS::simd_mask_storage_t pred, __ESIMD_DNS::vector_type_t offsets, __ESIMD_DNS::vector_type_t()> vals) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_INTRIN_END; // Read a block of data from SLM at the given offset. template __ESIMD_INTRIN __ESIMD_DNS::vector_type_t -__esimd_slm_block_ld(uint32_t offset) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__esimd_slm_block_ld(uint32_t offset) __ESIMD_INTRIN_END; // flat_block_write writes a block of data using one flat address template __ESIMD_INTRIN void __esimd_svm_block_st(__ESIMD_DNS::vector_type_t *addr, - __ESIMD_DNS::vector_type_t vals) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_DNS::vector_type_t vals) __ESIMD_INTRIN_END; /// SLM gather/block_load. /// Supported platforms: DG2, PVC @@ -244,13 +185,7 @@ __esimd_lsc_load_merge_slm( __ESIMD_DNS::simd_mask_storage_t pred, __ESIMD_DNS::vector_type_t offsets, __ESIMD_DNS::vector_type_t()> pass_thru) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_INTRIN_END; /// Similar to __esimd_lsc_load_merge_slm(), but the argument pass_thru is not /// explicitly specified, which results into random values in those elements of @@ -262,13 +197,7 @@ template ()> __esimd_lsc_load_slm(__ESIMD_DNS::simd_mask_storage_t pred, __ESIMD_DNS::vector_type_t offsets) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_INTRIN_END; /// Surface-based gather. /// Supported platforms: DG2, PVC @@ -301,13 +230,7 @@ __esimd_lsc_load_merge_bti( __ESIMD_DNS::simd_mask_storage_t pred, __ESIMD_DNS::vector_type_t offsets, SurfIndAliasT surf_ind, __ESIMD_DNS::vector_type_t()> PassThru) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_INTRIN_END; /// Similar to __esimd_lsc_load_merge_bti(), but the argument PassThru is not /// explicitly specified, which results into random values in those elements of @@ -319,42 +242,22 @@ template ()> __esimd_lsc_load_bti(__ESIMD_DNS::simd_mask_storage_t pred, __ESIMD_DNS::vector_type_t offsets, - SurfIndAliasT surf_ind) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + SurfIndAliasT surf_ind) __ESIMD_INTRIN_END; // flat_read4 does flat-address gather4 template -__ESIMD_DNS::vector_type_t - __ESIMD_INTRIN - __esimd_svm_gather4_scaled(__ESIMD_DNS::vector_type_t addrs, - __ESIMD_DNS::simd_mask_storage_t pred = 1) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_DNS::vector_type_t __ESIMD_INTRIN +__esimd_svm_gather4_scaled(__ESIMD_DNS::vector_type_t addrs, + __ESIMD_DNS::simd_mask_storage_t pred = 1) + __ESIMD_INTRIN_END; // flat_write does flat-address scatter template __ESIMD_INTRIN void __esimd_svm_scatter4_scaled( __ESIMD_DNS::vector_type_t addrs, __ESIMD_DNS::vector_type_t vals, - __ESIMD_DNS::simd_mask_storage_t pred = 1) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_DNS::simd_mask_storage_t pred = 1) __ESIMD_INTRIN_END; // Low-level surface-based scatter. Writes elements of a \ref simd object into a // surface at given offsets. Element can be a 1, 2 or 4-byte value, but it is @@ -380,61 +283,30 @@ __ESIMD_INTRIN void __esimd_svm_scatter4_scaled( // template -__ESIMD_INTRIN void -__esimd_scatter_scaled(__ESIMD_DNS::simd_mask_storage_t pred, - SurfIndAliasTy surf_ind, uint32_t global_offset, - __ESIMD_DNS::vector_type_t elem_offsets, - __ESIMD_DNS::vector_type_t vals) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - static_assert(N == 1 || N == 8 || N == 16 || N == 32); - static_assert(TySizeLog2 <= 2); - static_assert(std::is_integral_v || TySizeLog2 == 2); - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN void __esimd_scatter_scaled( + __ESIMD_DNS::simd_mask_storage_t pred, SurfIndAliasTy surf_ind, + uint32_t global_offset, + __ESIMD_DNS::vector_type_t elem_offsets, + __ESIMD_DNS::vector_type_t vals) __ESIMD_INTRIN_END; // flat_atomic: flat-address atomic template <__ESIMD_NS::atomic_op Op, typename Ty, int N> -__ESIMD_INTRIN __ESIMD_DNS::vector_type_t -__esimd_svm_atomic0(__ESIMD_DNS::vector_type_t addrs, - __ESIMD_DNS::simd_mask_storage_t pred) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN __ESIMD_DNS::vector_type_t __esimd_svm_atomic0( + __ESIMD_DNS::vector_type_t addrs, + __ESIMD_DNS::simd_mask_storage_t pred) __ESIMD_INTRIN_END; template <__ESIMD_NS::atomic_op Op, typename Ty, int N> -__ESIMD_INTRIN __ESIMD_DNS::vector_type_t -__esimd_svm_atomic1(__ESIMD_DNS::vector_type_t addrs, - __ESIMD_DNS::vector_type_t src0, - __ESIMD_DNS::simd_mask_storage_t pred) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN __ESIMD_DNS::vector_type_t __esimd_svm_atomic1( + __ESIMD_DNS::vector_type_t addrs, + __ESIMD_DNS::vector_type_t src0, + __ESIMD_DNS::simd_mask_storage_t pred) __ESIMD_INTRIN_END; template <__ESIMD_NS::atomic_op Op, typename Ty, int N> -__ESIMD_INTRIN __ESIMD_DNS::vector_type_t -__esimd_svm_atomic2(__ESIMD_DNS::vector_type_t addrs, - __ESIMD_DNS::vector_type_t src0, - __ESIMD_DNS::vector_type_t src1, - __ESIMD_DNS::simd_mask_storage_t pred) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN __ESIMD_DNS::vector_type_t __esimd_svm_atomic2( + __ESIMD_DNS::vector_type_t addrs, + __ESIMD_DNS::vector_type_t src0, + __ESIMD_DNS::vector_type_t src1, + __ESIMD_DNS::simd_mask_storage_t pred) __ESIMD_INTRIN_END; /// USM pointer atomic. /// Supported platforms: DG2, PVC @@ -458,13 +330,7 @@ template ()> __esimd_lsc_xatomic_stateless_0(__ESIMD_DNS::simd_mask_storage_t pred, __ESIMD_DNS::vector_type_t addrs) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_INTRIN_END; /// USM pointer atomic. /// Supported platforms: DG2, PVC @@ -492,13 +358,7 @@ __esimd_lsc_xatomic_stateless_1( __ESIMD_DNS::simd_mask_storage_t pred, __ESIMD_DNS::vector_type_t addrs, __ESIMD_DNS::vector_type_t()> src0) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_INTRIN_END; /// USM pointer atomic. /// Supported platforms: DG2, PVC @@ -527,13 +387,7 @@ __esimd_lsc_xatomic_stateless_2( __ESIMD_DNS::vector_type_t Addrs, __ESIMD_DNS::vector_type_t()> src0, __ESIMD_DNS::vector_type_t()> src1) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_INTRIN_END; /// Accessor-based atomic. /// Supported platforms: DG2, PVC @@ -560,14 +414,7 @@ template ()> __esimd_lsc_xatomic_bti_0(__ESIMD_DNS::simd_mask_storage_t pred, __ESIMD_DNS::vector_type_t offsets, - SurfIndAliasTy surf_ind) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + SurfIndAliasTy surf_ind) __ESIMD_INTRIN_END; /// Accessor-based atomic. /// Supported platforms: DG2, PVC @@ -597,14 +444,7 @@ __esimd_lsc_xatomic_bti_1( __ESIMD_DNS::simd_mask_storage_t pred, __ESIMD_DNS::vector_type_t offsets, __ESIMD_DNS::vector_type_t()> src0, - SurfIndAliasTy surf_ind) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + SurfIndAliasTy surf_ind) __ESIMD_INTRIN_END; /// Accessor-based atomic. /// Supported platforms: DG2, PVC @@ -636,14 +476,7 @@ __esimd_lsc_xatomic_bti_2( __ESIMD_DNS::vector_type_t offsets, __ESIMD_DNS::vector_type_t()> src0, __ESIMD_DNS::vector_type_t()> src1, - SurfIndAliasTy surf_ind) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + SurfIndAliasTy surf_ind) __ESIMD_INTRIN_END; /// SLM atomic. /// Supported platforms: DG2, PVC @@ -667,13 +500,7 @@ template ()> __esimd_lsc_xatomic_slm_0(__ESIMD_DNS::simd_mask_storage_t pred, __ESIMD_DNS::vector_type_t offsets) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_INTRIN_END; /// SLM atomic. /// Supported platforms: DG2, PVC @@ -700,13 +527,7 @@ __esimd_lsc_xatomic_slm_1( __ESIMD_DNS::simd_mask_storage_t pred, __ESIMD_DNS::vector_type_t offsets, __ESIMD_DNS::vector_type_t()> src0) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_INTRIN_END; /// SLM atomic. /// Supported platforms: DG2, PVC @@ -735,42 +556,15 @@ __esimd_lsc_xatomic_slm_2( __ESIMD_DNS::vector_type_t offsets, __ESIMD_DNS::vector_type_t()> src0, __ESIMD_DNS::vector_type_t()> src1) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_INTRIN_END; -__ESIMD_INTRIN void __esimd_slm_init(uint32_t size) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // ifndef __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN void __esimd_slm_init(uint32_t size) __ESIMD_INTRIN_END; // esimd_barrier, generic group barrier -__ESIMD_INTRIN void __esimd_barrier() -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN void __esimd_barrier() __ESIMD_INTRIN_END; // slm_fence sets the SLM read/write order -__ESIMD_INTRIN void __esimd_fence(uint8_t cntl) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN void __esimd_fence(uint8_t cntl) __ESIMD_INTRIN_END; /// Memory fence. /// Supported platforms: DG2, PVC @@ -781,14 +575,8 @@ __ESIMD_INTRIN void __esimd_fence(uint8_t cntl) /// @tparam N is the SIMD size of operation (the number of addresses to access) /// @param pred is predicates. template -__ESIMD_INTRIN void __esimd_lsc_fence(__ESIMD_DNS::simd_mask_storage_t pred) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN void +__esimd_lsc_fence(__ESIMD_DNS::simd_mask_storage_t pred) __ESIMD_INTRIN_END; // Predicated (masked) scaled gather from a surface. // @@ -812,31 +600,17 @@ __ESIMD_INTRIN void __esimd_lsc_fence(__ESIMD_DNS::simd_mask_storage_t pred) template -__ESIMD_INTRIN __ESIMD_DNS::vector_type_t -__esimd_gather_masked_scaled2(SurfIndAliasTy surf_ind, uint32_t global_offset, - __ESIMD_DNS::vector_type_t offsets, - __ESIMD_DNS::simd_mask_storage_t pred) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - static_assert(Scale == 0); - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN __ESIMD_DNS::vector_type_t __esimd_gather_masked_scaled2( + SurfIndAliasTy surf_ind, uint32_t global_offset, + __ESIMD_DNS::vector_type_t offsets, + __ESIMD_DNS::simd_mask_storage_t pred) __ESIMD_INTRIN_END; // Reads a block of data from given surface at given `offset` counted // in 16-byte chunks. template __ESIMD_INTRIN __ESIMD_DNS::vector_type_t -__esimd_oword_ld(SurfIndAliasTy surf_ind, uint32_t owords_offset) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__esimd_oword_ld(SurfIndAliasTy surf_ind, + uint32_t owords_offset) __ESIMD_INTRIN_END; // gather4 scaled masked from a surface/SLM template offsets, - __ESIMD_DNS::simd_mask_storage_t pred) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_DNS::simd_mask_storage_t pred) __ESIMD_INTRIN_END; // scatter4 scaled to a surface/SLM template pred, SurfIndAliasTy surf_ind, int global_offset, __ESIMD_DNS::vector_type_t offsets, __ESIMD_DNS::vector_type_t vals) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_INTRIN_END; // Surface-based atomic operations template <__ESIMD_NS::atomic_op Op, typename Ty, int N, typename SurfIndAliasTy> -__ESIMD_INTRIN __ESIMD_DNS::vector_type_t -__esimd_dword_atomic0(__ESIMD_DNS::simd_mask_storage_t pred, - SurfIndAliasTy surf_ind, - __ESIMD_DNS::vector_type_t addrs) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN __ESIMD_DNS::vector_type_t __esimd_dword_atomic0( + __ESIMD_DNS::simd_mask_storage_t pred, SurfIndAliasTy surf_ind, + __ESIMD_DNS::vector_type_t addrs) __ESIMD_INTRIN_END; template <__ESIMD_NS::atomic_op Op, typename Ty, int N, typename SurfIndAliasTy> -__ESIMD_INTRIN __ESIMD_DNS::vector_type_t -__esimd_dword_atomic1(__ESIMD_DNS::simd_mask_storage_t pred, - SurfIndAliasTy surf_ind, - __ESIMD_DNS::vector_type_t addrs, - __ESIMD_DNS::vector_type_t src0) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN __ESIMD_DNS::vector_type_t __esimd_dword_atomic1( + __ESIMD_DNS::simd_mask_storage_t pred, SurfIndAliasTy surf_ind, + __ESIMD_DNS::vector_type_t addrs, + __ESIMD_DNS::vector_type_t src0) __ESIMD_INTRIN_END; template <__ESIMD_NS::atomic_op Op, typename Ty, int N, typename SurfIndAliasTy> -__ESIMD_INTRIN __ESIMD_DNS::vector_type_t -__esimd_dword_atomic2(__ESIMD_DNS::simd_mask_storage_t pred, - SurfIndAliasTy surf_ind, - __ESIMD_DNS::vector_type_t addrs, - __ESIMD_DNS::vector_type_t src0, - __ESIMD_DNS::vector_type_t src1) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN __ESIMD_DNS::vector_type_t __esimd_dword_atomic2( + __ESIMD_DNS::simd_mask_storage_t pred, SurfIndAliasTy surf_ind, + __ESIMD_DNS::vector_type_t addrs, + __ESIMD_DNS::vector_type_t src0, + __ESIMD_DNS::vector_type_t src1) __ESIMD_INTRIN_END; // Media block load. // @@ -931,14 +668,7 @@ __esimd_dword_atomic2(__ESIMD_DNS::simd_mask_storage_t pred, template __ESIMD_INTRIN __ESIMD_DNS::vector_type_t -__esimd_media_ld(TACC handle, unsigned x, unsigned y) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__esimd_media_ld(TACC handle, unsigned x, unsigned y) __ESIMD_INTRIN_END; // Media block store // @@ -956,15 +686,9 @@ __esimd_media_ld(TACC handle, unsigned x, unsigned y) // template -__ESIMD_INTRIN void __esimd_media_st(TACC handle, unsigned x, unsigned y, - __ESIMD_DNS::vector_type_t vals) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN void +__esimd_media_st(TACC handle, unsigned x, unsigned y, + __ESIMD_DNS::vector_type_t vals) __ESIMD_INTRIN_END; // \brief Converts given value to a surface index. // The input must always be a result of @@ -987,16 +711,13 @@ __ESIMD_INTRIN void __esimd_media_st(TACC handle, unsigned x, unsigned y, // @param acc the SYCL accessor. // Returns the binding table index value. template -ESIMD_INLINE __ESIMD_NS::SurfaceIndex __esimd_get_surface_index(MemObjTy obj) +ESIMD_INLINE __ESIMD_NS::SurfaceIndex __esimd_get_surface_index(MemObjTy obj) { #ifdef __SYCL_DEVICE_ONLY__ -{ return __spirv_ConvertPtrToU(obj); -} #else // __SYCL_DEVICE_ONLY__ -{ __ESIMD_UNSUPPORTED_ON_HOST; -} #endif // __SYCL_DEVICE_ONLY__ +} /// USM pointer gather. /// Supported platforms: DG2, PVC @@ -1027,13 +748,7 @@ __esimd_lsc_load_merge_stateless( __ESIMD_DNS::simd_mask_storage_t pred, __ESIMD_DNS::vector_type_t addrs, __ESIMD_DNS::vector_type_t()> pass_thru = 0) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_INTRIN_END; /// USM pointer gather. /// Supported platforms: DG2, PVC @@ -1060,13 +775,7 @@ template ()> __esimd_lsc_load_stateless(__ESIMD_DNS::simd_mask_storage_t pred, __ESIMD_DNS::vector_type_t addrs) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_INTRIN_END; /// USM pointer scatter. /// Supported platforms: DG2, PVC @@ -1093,13 +802,7 @@ __ESIMD_INTRIN void __esimd_lsc_store_stateless( __ESIMD_DNS::simd_mask_storage_t pred, __ESIMD_DNS::vector_type_t addrs, __ESIMD_DNS::vector_type_t()> vals) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + __ESIMD_INTRIN_END; /// Surface-based scatter. /// Supported platforms: DG2, PVC @@ -1129,14 +832,7 @@ __ESIMD_INTRIN void __esimd_lsc_store_bti( __ESIMD_DNS::simd_mask_storage_t pred, __ESIMD_DNS::vector_type_t offsets, __ESIMD_DNS::vector_type_t()> vals, - SurfIndAliasTy surf_ind) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else // __SYCL_DEVICE_ONLY__ -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ + SurfIndAliasTy surf_ind) __ESIMD_INTRIN_END; // \brief Raw sends. // @@ -1171,21 +867,13 @@ __ESIMD_INTRIN void __esimd_lsc_store_bti( // template -__ESIMD_INTRIN __ESIMD_DNS::vector_type_t -__esimd_raw_sends2(uint8_t modifier, uint8_t execSize, - __ESIMD_DNS::simd_mask_storage_t pred, uint8_t numSrc0, - uint8_t numSrc1, uint8_t numDst, uint8_t sfid, - uint32_t exDesc, uint32_t msgDesc, - __ESIMD_DNS::vector_type_t msgSrc0, - __ESIMD_DNS::vector_type_t msgSrc1, - __ESIMD_DNS::vector_type_t msgDst) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN __ESIMD_DNS::vector_type_t __esimd_raw_sends2( + uint8_t modifier, uint8_t execSize, + __ESIMD_DNS::simd_mask_storage_t pred, uint8_t numSrc0, uint8_t numSrc1, + uint8_t numDst, uint8_t sfid, uint32_t exDesc, uint32_t msgDesc, + __ESIMD_DNS::vector_type_t msgSrc0, + __ESIMD_DNS::vector_type_t msgSrc1, + __ESIMD_DNS::vector_type_t msgDst) __ESIMD_INTRIN_END; // \brief Raw send. // @@ -1214,19 +902,12 @@ __esimd_raw_sends2(uint8_t modifier, uint8_t execSize, // Returns a simd vector of type Ty1 and size N1. // template -__ESIMD_INTRIN __ESIMD_DNS::vector_type_t -__esimd_raw_send2(uint8_t modifier, uint8_t execSize, - __ESIMD_DNS::simd_mask_storage_t pred, uint8_t numSrc0, - uint8_t numDst, uint8_t sfid, uint32_t exDesc, - uint32_t msgDesc, __ESIMD_DNS::vector_type_t msgSrc0, - __ESIMD_DNS::vector_type_t msgDst) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN __ESIMD_DNS::vector_type_t __esimd_raw_send2( + uint8_t modifier, uint8_t execSize, + __ESIMD_DNS::simd_mask_storage_t pred, uint8_t numSrc0, uint8_t numDst, + uint8_t sfid, uint32_t exDesc, uint32_t msgDesc, + __ESIMD_DNS::vector_type_t msgSrc0, + __ESIMD_DNS::vector_type_t msgDst) __ESIMD_INTRIN_END; // \brief Raw sends. // @@ -1253,20 +934,12 @@ __esimd_raw_send2(uint8_t modifier, uint8_t execSize, // @param msgSrc1 the second source operand of send message. // template -__ESIMD_INTRIN void -__esimd_raw_sends2_noresult(uint8_t modifier, uint8_t execSize, - __ESIMD_DNS::simd_mask_storage_t pred, - uint8_t numSrc0, uint8_t numSrc1, uint8_t sfid, - uint32_t exDesc, uint32_t msgDesc, - __ESIMD_DNS::vector_type_t msgSrc0, - __ESIMD_DNS::vector_type_t msgSrc1) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN void __esimd_raw_sends2_noresult( + uint8_t modifier, uint8_t execSize, + __ESIMD_DNS::simd_mask_storage_t pred, uint8_t numSrc0, uint8_t numSrc1, + uint8_t sfid, uint32_t exDesc, uint32_t msgDesc, + __ESIMD_DNS::vector_type_t msgSrc0, + __ESIMD_DNS::vector_type_t msgSrc1) __ESIMD_INTRIN_END; // \brief Raw send. // @@ -1288,18 +961,10 @@ __esimd_raw_sends2_noresult(uint8_t modifier, uint8_t execSize, // @param msgSrc0 the first source operand of send message. // template -__ESIMD_INTRIN void -__esimd_raw_send2_noresult(uint8_t modifier, uint8_t execSize, - __ESIMD_DNS::simd_mask_storage_t pred, - uint8_t numSrc0, uint8_t sfid, uint32_t exDesc, - uint32_t msgDesc, - __ESIMD_DNS::vector_type_t msgSrc0) -#ifdef __SYCL_DEVICE_ONLY__ - ; -#else -{ - __ESIMD_UNSUPPORTED_ON_HOST; -} -#endif // __SYCL_DEVICE_ONLY__ +__ESIMD_INTRIN void __esimd_raw_send2_noresult( + uint8_t modifier, uint8_t execSize, + __ESIMD_DNS::simd_mask_storage_t pred, uint8_t numSrc0, uint8_t sfid, + uint32_t exDesc, uint32_t msgDesc, + __ESIMD_DNS::vector_type_t msgSrc0) __ESIMD_INTRIN_END; /// @endcond ESIMD_DETAIL