Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions sycl/include/sycl/accessor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1082,8 +1082,7 @@ class __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
void __init(ConcreteASPtrType Ptr, range<AdjustedDim> AccessRange,
range<AdjustedDim> MemRange, id<AdjustedDim> Offset) {
MData = Ptr;
#pragma unroll
for (int I = 0; I < AdjustedDim; ++I) {
detail::dim_loop<AdjustedDim>([&, this](size_t I) {
#if __cplusplus >= 201703L
if constexpr (!(PropertyListT::template has_property<
sycl::ext::oneapi::property::no_offset>())) {
Expand All @@ -1094,7 +1093,7 @@ class __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
#endif
getAccessRange()[I] = AccessRange[I];
getMemoryRange()[I] = MemRange[I];
}
});

// Adjust for offsets as that part is invariant for all invocations of
// operator[]. Will have to re-adjust in get_pointer.
Expand Down Expand Up @@ -2362,9 +2361,8 @@ class __SYCL_SPECIAL_CLASS local_accessor_base :
void __init(ConcreteASPtrType Ptr, range<AdjustedDim> AccessRange,
range<AdjustedDim>, id<AdjustedDim>) {
MData = Ptr;
#pragma unroll
for (int I = 0; I < AdjustedDim; ++I)
getSize()[I] = AccessRange[I];
detail::dim_loop<AdjustedDim>(
[&, this](size_t I) { getSize()[I] = AccessRange[I]; });
}

public:
Expand Down