@@ -1792,7 +1792,7 @@ lsc_block_store(T *p, __ESIMD_NS::simd<T, NElts> vals, FlagsT flags) {
1792
1792
// /
1793
1793
// / @tparam T is element type.
1794
1794
// / @tparam NElts is the number of elements to store per address.
1795
- // / @tparam DS is the data size.
1795
+ // / @tparam DS is the data size (unused/obsolete) .
1796
1796
// / @tparam L1H is L1 cache hint.
1797
1797
// / @tparam L3H is L3 cache hint.
1798
1798
// / @tparam AccessorTy is the \ref sycl::accessor type.
@@ -1815,69 +1815,8 @@ __ESIMD_API std::enable_if_t<
1815
1815
lsc_block_store (AccessorTy acc, __ESIMD_DNS::DeviceAccessorOffsetT offset,
1816
1816
__ESIMD_NS::simd<T, NElts> vals,
1817
1817
__ESIMD_NS::simd_mask<1 > pred = 1 , FlagsT flags = FlagsT{}) {
1818
- #ifdef __ESIMD_FORCE_STATELESS_MEM
1819
- lsc_block_store<T, NElts, DS, L1H, L3H>(
1820
- __ESIMD_DNS::accessorToPointer<T>(acc, offset), vals, pred, flags);
1821
- #else
1822
- detail::check_lsc_data_size<T, DS>();
1823
- detail::check_lsc_cache_hint<detail::lsc_action::store, L1H, L3H>();
1824
- constexpr auto Alignment =
1825
- FlagsT::template alignment<__ESIMD_DNS::__raw_t <T>>;
1826
- static_assert (
1827
- (Alignment >= __ESIMD_DNS::OperandSize::DWORD && sizeof (T) <= 4 ) ||
1828
- (Alignment >= __ESIMD_DNS::OperandSize::QWORD && sizeof (T) > 4 ),
1829
- " Incorrect alignment for the data type" );
1830
- // Prepare template arguments for the call of intrinsic.
1831
- constexpr uint16_t _AddressScale = 1 ;
1832
- constexpr int _ImmOffset = 0 ;
1833
- constexpr lsc_data_size _DS = detail::finalize_data_size<T, DS>();
1834
- static_assert (_DS == lsc_data_size::u16 || _DS == lsc_data_size::u8 ||
1835
- _DS == lsc_data_size::u32 || _DS == lsc_data_size::u64 ,
1836
- " Conversion data types are not supported" );
1837
- constexpr detail::lsc_data_order _Transposed =
1838
- detail::lsc_data_order::transpose;
1839
- constexpr int N = 1 ;
1840
-
1841
- __ESIMD_NS::simd<uint32_t , N> Offsets = offset;
1842
- auto si = __ESIMD_NS::get_surface_index (acc);
1843
-
1844
- constexpr int SmallIntFactor32Bit =
1845
- (_DS == lsc_data_size::u16 ) ? 2 : (_DS == lsc_data_size::u8 ? 4 : 1 );
1846
- static_assert (NElts > 0 && NElts % SmallIntFactor32Bit == 0 ,
1847
- " Number of elements is not supported by Transposed store" );
1848
-
1849
- constexpr bool Use64BitData =
1850
- Alignment >= __ESIMD_DNS::OperandSize::QWORD &&
1851
- (sizeof (T) == 8 ||
1852
- (DS == lsc_data_size::default_size && NElts / SmallIntFactor32Bit > 64 &&
1853
- (NElts * sizeof (T)) % 8 == 0 ));
1854
- constexpr int SmallIntFactor64Bit =
1855
- (_DS == lsc_data_size::u16 )
1856
- ? 4
1857
- : (_DS == lsc_data_size::u8 ? 8
1858
- : (_DS == lsc_data_size::u32 ? 2 : 1 ));
1859
- constexpr int SmallIntFactor =
1860
- Use64BitData ? SmallIntFactor64Bit : SmallIntFactor32Bit;
1861
- constexpr int FactoredNElts = NElts / SmallIntFactor;
1862
- constexpr lsc_data_size ActualDS = Use64BitData
1863
- ? __ESIMD_ENS::lsc_data_size::u64
1864
- : __ESIMD_ENS::lsc_data_size::u32 ;
1865
-
1866
- detail::check_lsc_vector_size<FactoredNElts>();
1867
- constexpr detail::lsc_vector_size _VS =
1868
- detail::to_lsc_vector_size<FactoredNElts>();
1869
-
1870
- using StoreType = __ESIMD_DNS::__raw_t <
1871
- std::conditional_t <SmallIntFactor == 1 , T,
1872
- std::conditional_t <Use64BitData, uint64_t , uint32_t >>>;
1873
-
1874
- __esimd_lsc_store_bti<StoreType, L1H, L3H, _AddressScale, _ImmOffset,
1875
- ActualDS, _VS, _Transposed, N>(
1876
- pred.data (), Offsets.data (),
1877
- sycl::bit_cast<__ESIMD_DNS::vector_type_t <StoreType, FactoredNElts>>(
1878
- vals.data ()),
1879
- si);
1880
- #endif
1818
+ __ESIMD_DNS::block_store_impl<T, NElts, L1H, L3H>(acc, offset, vals, pred,
1819
+ flags);
1881
1820
}
1882
1821
1883
1822
template <typename T, int NElts, lsc_data_size DS = lsc_data_size::default_size,
0 commit comments