Skip to content

Commit ff8e0cc

Browse files
committed
Clang format
1 parent 7c9426f commit ff8e0cc

File tree

1 file changed

+25
-20
lines changed

1 file changed

+25
-20
lines changed

sycl/include/CL/sycl/accessor.hpp

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -841,13 +841,14 @@ class __SYCL_SPECIAL_CLASS accessor :
841841
__SYCL_UNROLL(3)
842842
for (int I = 0; I < Dims; ++I) {
843843
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>())) {
849847
Result += getOffset()[I];
850-
#endif
848+
}
849+
#else
850+
Result += getOffset()[I];
851+
#endif
851852
}
852853
return Result;
853854
}
@@ -905,26 +906,28 @@ class __SYCL_SPECIAL_CLASS accessor :
905906
MData = Ptr;
906907
#pragma unroll
907908
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>())) {
913912
getOffset()[I] = Offset[I];
914-
#endif
913+
}
914+
#else
915+
getOffset()[I] = Offset[I];
916+
#endif
915917
getAccessRange()[I] = AccessRange[I];
916918
getMemoryRange()[I] = MemRange[I];
917919
}
918920
// In case of 1D buffer, adjust pointer during initialization rather
919921
// then each time in operator[] or get_pointer functions.
920922
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>())) {
923926
MData += Offset[0];
924927
}
925-
#else
928+
#else
926929
MData += Offset[0];
927-
#endif
930+
#endif
928931
}
929932

930933
// __init variant used by the device compiler for ESIMD kernels.
@@ -1550,10 +1553,12 @@ class __SYCL_SPECIAL_CLASS accessor :
15501553

15511554
template <int Dims = Dimensions, typename = detail::enable_if_t<(Dims > 0)>>
15521555
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
15571562
return detail::convertToArrayOfN<Dimensions, 0>(getOffset());
15581563
}
15591564

0 commit comments

Comments
 (0)