@@ -330,13 +330,11 @@ class [[__sycl_detail__::__uses_aspects__(
330330 // / argument.
331331 // / @param acc The accessor to read from.
332332 // / @param offset offset in bytes of the first element.
333- template <typename AccessorT, typename Flags = element_aligned_tag,
334- typename = std::enable_if_t <
335- (sycl::detail::acc_properties::is_local_accessor_v<AccessorT> ||
336- detail::is_sycl_accessor_with<
337- AccessorT, accessor_mode_cap::can_read,
338- sycl::access::target::device>::value) &&
339- is_simd_flag_type_v<Flags>>>
333+ template <
334+ typename AccessorT, typename Flags = element_aligned_tag,
335+ typename = std::enable_if_t <
336+ detail::is_accessor_with_v<AccessorT, accessor_mode_cap::can_read> &&
337+ is_simd_flag_type_v<Flags>>>
340338 simd_obj_impl (AccessorT acc,
341339#ifdef __ESIMD_FORCE_STATELESS_MEM
342340 uint64_t offset,
@@ -744,8 +742,7 @@ class [[__sycl_detail__::__uses_aspects__(
744742 template <typename AccessorT, typename Flags = element_aligned_tag,
745743 int ChunkSize = 32 ,
746744 typename = std::enable_if_t <is_simd_flag_type_v<Flags>>>
747- ESIMD_INLINE EnableIfAccessor<AccessorT, accessor_mode_cap::can_read,
748- sycl::access::target::device, void >
745+ ESIMD_INLINE EnableIfAccessor<AccessorT, accessor_mode_cap::can_read, void >
749746 copy_from (AccessorT acc,
750747#ifdef __ESIMD_FORCE_STATELESS_MEM
751748 uint64_t offset,
@@ -754,6 +751,25 @@ class [[__sycl_detail__::__uses_aspects__(
754751#endif
755752 Flags = {}) SYCL_ESIMD_FUNCTION;
756753
754+ // / Copy a contiguous block of data from memory into this simd_obj_impl
755+ // / object. The amount of memory copied equals the total size of vector
756+ // / elements in this object. Source memory location is represented via a
757+ // / local accessor and offset.
758+ // / None of the template parameters except documented ones can/should be
759+ // / specified by callers.
760+ // / @tparam AccessorT Type of the accessor (auto-deduced).
761+ // / @tparam Flags Alignment control for the copy operation.
762+ // / See @ref sycl_esimd_core_align for more info.
763+ // / @param acc accessor to copy from.
764+ // / @param offset offset to copy from (in bytes).
765+ template <typename AccessorT, typename Flags = element_aligned_tag,
766+ int ChunkSize = 32 ,
767+ typename = std::enable_if_t <is_simd_flag_type_v<Flags>>>
768+ ESIMD_INLINE std::enable_if_t <
769+ detail::is_local_accessor_with_v<AccessorT, accessor_mode_cap::can_read>,
770+ void >
771+ copy_from (AccessorT acc, uint32_t offset, Flags = {}) SYCL_ESIMD_FUNCTION;
772+
757773 // / Copy all vector elements of this object into a contiguous block in memory.
758774 // / None of the template parameters should be be specified by callers.
759775 // / @tparam Flags Alignment control for the copy operation.
@@ -776,8 +792,7 @@ class [[__sycl_detail__::__uses_aspects__(
776792 template <typename AccessorT, typename Flags = element_aligned_tag,
777793 int ChunkSize = 32 ,
778794 typename = std::enable_if_t <is_simd_flag_type_v<Flags>>>
779- ESIMD_INLINE EnableIfAccessor<AccessorT, accessor_mode_cap::can_write,
780- sycl::access::target::device, void >
795+ ESIMD_INLINE EnableIfAccessor<AccessorT, accessor_mode_cap::can_write, void >
781796 copy_to (AccessorT acc,
782797#ifdef __ESIMD_FORCE_STATELESS_MEM
783798 uint64_t offset,
@@ -786,6 +801,23 @@ class [[__sycl_detail__::__uses_aspects__(
786801#endif
787802 Flags = {}) const SYCL_ESIMD_FUNCTION;
788803
804+ // / Copy all vector elements of this object into a contiguous block in memory.
805+ // / Destination memory location is represented via a local accessor and
806+ // / offset.
807+ // / None of the template parameters should be be specified by callers.
808+ // / @tparam AccessorT Type of the accessor (auto-deduced).
809+ // / @tparam Flags Alignment control for the copy operation.
810+ // / See @ref sycl_esimd_core_align for more info.
811+ // / @param acc accessor to copy from.
812+ // / @param offset offset to copy from.
813+ template <typename AccessorT, typename Flags = element_aligned_tag,
814+ int ChunkSize = 32 ,
815+ typename = std::enable_if_t <is_simd_flag_type_v<Flags>>>
816+ ESIMD_INLINE std::enable_if_t <
817+ detail::is_local_accessor_with_v<AccessorT, accessor_mode_cap::can_write>,
818+ void >
819+ copy_to (AccessorT acc, uint32_t offset, Flags = {}) const SYCL_ESIMD_FUNCTION;
820+
789821 // Unary operations.
790822
791823 // / Per-element bitwise inversion, available in all subclasses, but only for
@@ -916,6 +948,13 @@ class [[__sycl_detail__::__uses_aspects__(
916948 // The underlying data for this vector.
917949 raw_vector_type M_data;
918950
951+ template <int ChunkSize, typename Flags, typename AccessorT, typename TOffset>
952+ ESIMD_INLINE void copy_to_impl (AccessorT acc,
953+ TOffset offset) const SYCL_ESIMD_FUNCTION;
954+ template <int ChunkSize, typename Flags, typename AccessorT, typename TOffset>
955+ ESIMD_INLINE void copy_from_impl (AccessorT acc,
956+ TOffset offset) SYCL_ESIMD_FUNCTION;
957+
919958protected:
920959 // The test proxy if enabled
921960 __ESIMD_DECLARE_TEST_PROXY
0 commit comments