Skip to content

Commit 5913d06

Browse files
Recovering FP-working version for test using CI
1 parent e374a07 commit 5913d06

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sycl/include/sycl/ext/intel/esimd/detail/memory_intrin.hpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,13 +421,15 @@ __esimd_scatter_scaled(__ESIMD_DNS::simd_mask_storage_t<N> pred,
421421
#else
422422
{
423423
static_assert(N == 1 || N == 8 || N == 16 || N == 32);
424+
static_assert(sizeof(Ty) == 4);
424425
static_assert(TySizeLog2 <= 2);
425426
static_assert(std::is_integral<Ty>::value || TySizeLog2 == 2);
426427

427428
// determine the original element's type size (as __esimd_scatter_scaled
428429
// requires vals to be a vector of 4-byte integers)
429430
constexpr size_t OrigSize = __ESIMD_DNS::ElemsPerAddrDecoding(TySizeLog2);
430-
using RestoredTy = __ESIMD_DNS::uint_type_t<OrigSize>;
431+
using RestoredTy = std::conditional_t<sizeof(Ty) == OrigSize, Ty,
432+
__ESIMD_DNS::uint_type_t<OrigSize>>;
431433

432434
sycl::detail::ESIMDDeviceInterface *I =
433435
sycl::detail::getESIMDDeviceInterface();
@@ -638,11 +640,13 @@ __esimd_gather_masked_scaled2(SurfIndAliasTy surf_ind, uint32_t global_offset,
638640
#else
639641
{
640642
static_assert(Scale == 0);
643+
static_assert(sizeof(Ty) == 4);
641644

642645
// determine the original element's type size (as __esimd_scatter_scaled
643646
// requires vals to be a vector of 4-byte integers)
644647
constexpr size_t OrigSize = __ESIMD_DNS::ElemsPerAddrDecoding(TySizeLog2);
645-
using RestoredTy = __ESIMD_DNS::uint_type_t<OrigSize>;
648+
using RestoredTy = std::conditional_t<sizeof(Ty) == OrigSize, Ty,
649+
__ESIMD_DNS::uint_type_t<OrigSize>>;
646650

647651
__ESIMD_DNS::vector_type_t<Ty, N> retv = 0;
648652
sycl::detail::ESIMDDeviceInterface *I =

0 commit comments

Comments
 (0)