@@ -841,13 +841,14 @@ class __SYCL_SPECIAL_CLASS accessor :
841
841
__SYCL_UNROLL (3 )
842
842
for (int I = 0 ; I < Dims; ++I) {
843
843
Result = Result * getMemoryRange ()[I] + Id[I];
844
- #if __cplusplus >= 201703L
845
- if constexpr (!(PropertyListT::template has_property<sycl::ext::oneapi::property::no_offset>())) {
846
- Result += getOffset ()[I];
847
- }
848
- #else
844
+ #if __cplusplus >= 201703L
845
+ if constexpr (!(PropertyListT::template has_property<
846
+ sycl::ext::oneapi::property::no_offset>())) {
849
847
Result += getOffset ()[I];
850
- #endif
848
+ }
849
+ #else
850
+ Result += getOffset ()[I];
851
+ #endif
851
852
}
852
853
return Result;
853
854
}
@@ -905,26 +906,28 @@ class __SYCL_SPECIAL_CLASS accessor :
905
906
MData = Ptr;
906
907
#pragma unroll
907
908
for (int I = 0 ; I < AdjustedDim; ++I) {
908
- #if __cplusplus >= 201703L
909
- if constexpr (!(PropertyListT::template has_property<sycl::ext::oneapi::property::no_offset>())) {
910
- getOffset ()[I] = Offset[I];
911
- }
912
- #else
909
+ #if __cplusplus >= 201703L
910
+ if constexpr (!(PropertyListT::template has_property<
911
+ sycl::ext::oneapi::property::no_offset>())) {
913
912
getOffset ()[I] = Offset[I];
914
- #endif
913
+ }
914
+ #else
915
+ getOffset ()[I] = Offset[I];
916
+ #endif
915
917
getAccessRange ()[I] = AccessRange[I];
916
918
getMemoryRange ()[I] = MemRange[I];
917
919
}
918
920
// In case of 1D buffer, adjust pointer during initialization rather
919
921
// then each time in operator[] or get_pointer functions.
920
922
if (1 == AdjustedDim)
921
- #if __cplusplus >= 201703L
922
- if constexpr (!(PropertyListT::template has_property<sycl::ext::oneapi::property::no_offset>())) {
923
+ #if __cplusplus >= 201703L
924
+ if constexpr (!(PropertyListT::template has_property<
925
+ sycl::ext::oneapi::property::no_offset>())) {
923
926
MData += Offset[0 ];
924
927
}
925
- #else
928
+ #else
926
929
MData += Offset[0 ];
927
- #endif
930
+ #endif
928
931
}
929
932
930
933
// __init variant used by the device compiler for ESIMD kernels.
@@ -1550,10 +1553,12 @@ class __SYCL_SPECIAL_CLASS accessor :
1550
1553
1551
1554
template <int Dims = Dimensions, typename = detail::enable_if_t <(Dims > 0 )>>
1552
1555
id<Dimensions> get_offset () const {
1553
- #if __cplusplus >= 201703L
1554
- static_assert (!(PropertyListT::template has_property<sycl::ext::oneapi::property::no_offset>()),
1555
- " Accessor has no_offset property, get_offset() can not be used" );
1556
- #endif
1556
+ #if __cplusplus >= 201703L
1557
+ static_assert (
1558
+ !(PropertyListT::template has_property<
1559
+ sycl::ext::oneapi::property::no_offset>()),
1560
+ " Accessor has no_offset property, get_offset() can not be used" );
1561
+ #endif
1557
1562
return detail::convertToArrayOfN<Dimensions, 0 >(getOffset ());
1558
1563
}
1559
1564
0 commit comments