Skip to content

Commit b672a97

Browse files
Renamed slm_[load|store] to slm_[gather|scatter]
1 parent 8a54b66 commit b672a97

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

sycl/include/sycl/ext/intel/experimental/esimd/memory.hpp

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -655,19 +655,38 @@ SYCL_EXTERNAL SYCL_ESIMD_FUNCTION void slm_init(uint32_t size);
655655
template <typename T, int n>
656656
ESIMD_INLINE ESIMD_NODEBUG
657657
typename sycl::detail::enable_if_t<(n == 16 || n == 32), simd<T, n>>
658-
slm_load(simd<uint32_t, n> offsets, simd<uint16_t, n> pred = 1) {
658+
slm_gather(simd<uint32_t, n> offsets, simd<uint16_t, n> pred = 1) {
659659
return __esimd_slm_read<T, n>(offsets.data(), pred.data());
660660
}
661661

662+
/// SLM gather (deprecated version).
663+
template <typename T, int n>
664+
__SYCL_DEPRECATED("use slm_gather.")
665+
ESIMD_INLINE ESIMD_NODEBUG typename sycl::detail::enable_if_t<
666+
(n == 16 || n == 32), simd<T, n>> slm_load(simd<uint32_t, n> offsets,
667+
simd<uint16_t, n> pred = 1) {
668+
return slm_gather<T, n>(offsets, pred);
669+
}
670+
662671
/// SLM scatter.
663672
template <typename T, int n>
664673
ESIMD_INLINE ESIMD_NODEBUG
665674
typename sycl::detail::enable_if_t<(n == 16 || n == 32), void>
666-
slm_store(simd<T, n> vals, simd<uint32_t, n> offsets,
667-
simd<uint16_t, n> pred = 1) {
675+
slm_scatter(simd<T, n> vals, simd<uint32_t, n> offsets,
676+
simd<uint16_t, n> pred = 1) {
668677
__esimd_slm_write<T, n>(offsets.data(), vals.data(), pred.data());
669678
}
670679

680+
/// SLM scatter (deprecated version).
681+
template <typename T, int n>
682+
__SYCL_DEPRECATED("use slm_scatter.")
683+
ESIMD_INLINE ESIMD_NODEBUG
684+
typename sycl::detail::enable_if_t<(n == 16 || n == 32), void> slm_store(
685+
simd<T, n> vals, simd<uint32_t, n> offsets,
686+
simd<uint16_t, n> pred = 1) {
687+
slm_scatter<T, n>(offsets, vals, pred);
688+
}
689+
671690
/// Gathering read from the SLM given specified \p offsets.
672691
/// Up to 4 data elements may be accessed at each address depending on the
673692
/// enabled channel \p Mask.

sycl/test/esimd/slm_load.cpp renamed to sycl/test/esimd/slm_gather_scatter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ void kernel() __attribute__((sycl_device)) {
1313
simd<uint32_t, 32> offsets(0, 1);
1414
simd<int, 32> v1(0, 1);
1515

16-
auto v0 = slm_load<int, 32>(offsets);
16+
auto v0 = slm_gather<int, 32>(offsets);
1717

1818
esimd_fence(3);
1919
esimd_barrier();
2020

2121
v0 = v0 + v1;
2222

23-
slm_store<int, 32>(v0, offsets);
23+
slm_scatter<int, 32>(v0, offsets);
2424
}

0 commit comments

Comments
 (0)