@@ -668,24 +668,63 @@ ESIMD_INLINE ESIMD_NODEBUG
668668 __esimd_slm_write<T, n>(offsets.data (), vals.data (), pred.data ());
669669}
670670
671+ // / Gathering read from the SLM given specified \p offsets.
672+ // / Up to 4 data elements may be accessed at each address depending on the
673+ // / enabled channel \p Mask.
674+ // / \tparam T element type of the returned vector. Must be 4-byte.
675+ // / \tparam N size of the \p offsets vector. Must be 8, 16 or 32.
676+ // / \tparam Mask represents a pixel's channel mask.
677+ // / @param offsets byte-offsets within the SLM.
678+ // / @param pred predication control used for masking lanes.
679+ // / \ingroup sycl_esimd
680+ template <typename T, int N, rgba_channel_mask Mask>
681+ ESIMD_INLINE ESIMD_NODEBUG typename sycl::detail::enable_if_t <
682+ (N == 8 || N == 16 || N == 32 ) && (sizeof (T) == 4 ),
683+ simd<T, N * get_num_channels_enabled (Mask)>>
684+ slm_load_rgba(simd<uint32_t , N> offsets, simd<uint16_t , N> pred = 1 ) {
685+ return __esimd_slm_read4<T, N, Mask>(offsets.data (), pred.data ());
686+ }
687+
671688// / SLM gather4.
672689// /
673690// / Only allow simd-8, simd-16 and simd-32.
674691template <typename T, int n, rgba_channel_mask Mask>
692+ __SYCL_DEPRECATED (" use slm_load_rgba." )
675693ESIMD_INLINE ESIMD_NODEBUG typename sycl::detail::enable_if_t <
676694 (n == 8 || n == 16 || n == 32 ) && (sizeof (T) == 4 ),
677- simd<T, n * get_num_channels_enabled (Mask)>>
678- slm_load4(simd<uint32_t , n> offsets, simd<uint16_t , n> pred = 1 ) {
679- return __esimd_slm_read4<T, n, Mask>(offsets.data (), pred.data ());
695+ simd<T, n * get_num_channels_enabled (Mask)>> slm_load4(simd<uint32_t , n>
696+ offsets,
697+ simd<uint16_t , n>
698+ pred = 1 ) {
699+ return slm_load_rgba<T, n, Mask>(offsets, pred);
700+ }
701+
702+ // / Scatter write to the SLM given specified \p offsets.
703+ // / Up to 4 data elements may be written at each address depending on the
704+ // / enabled channel \p Mask.
705+ // / \tparam T element type of the input vector. Must be 4-byte.
706+ // / \tparam N size of the \p offsets vector. Must be 8, 16 or 32.
707+ // / \tparam Mask represents a pixel's channel mask.
708+ // / @param vals values to be written.
709+ // / @param offsets byte-offsets within the SLM.
710+ // / @param pred predication control used for masking lanes.
711+ // / \ingroup sycl_esimd
712+ template <typename T, int N, rgba_channel_mask Mask>
713+ ESIMD_INLINE ESIMD_NODEBUG typename sycl::detail::enable_if_t <
714+ (N == 8 || N == 16 || N == 32 ) && (sizeof (T) == 4 ), void >
715+ slm_store_rgba (simd<T, N * get_num_channels_enabled (Mask)> vals,
716+ simd<uint32_t, N> offsets, simd<uint16_t, N> pred = 1) {
717+ __esimd_slm_write4<T, N, Mask>(offsets.data (), vals.data (), pred.data ());
680718}
681719
682720// / SLM scatter4.
683721template <typename T, int n, rgba_channel_mask Mask>
722+ __SYCL_DEPRECATED (" use slm_store_rgba." )
684723ESIMD_INLINE ESIMD_NODEBUG typename sycl::detail::enable_if_t<
685- (n == 8 || n == 16 || n == 32 ) && (sizeof (T) == 4 ), void >
686- slm_store4 (simd<T, n * get_num_channels_enabled (Mask)> vals,
687- simd<uint32_t, n> offsets, simd<uint16_t, n> pred = 1) {
688- __esimd_slm_write4 <T, n, Mask>(offsets. data (), vals. data () , pred. data () );
724+ (n == 8 || n == 16 || n == 32 ) && (sizeof (T) == 4),
725+ void> slm_store4(simd<T, n * get_num_channels_enabled (Mask)> vals,
726+ simd<uint32_t, n> offsets, simd<uint16_t, n> pred = 1) {
727+ slm_store_rgba <T, n, Mask>(vals, offsets , pred);
689728}
690729
691730// / SLM block-load.
0 commit comments