Skip to content

Commit 745f79e

Browse files
committed
Clang-format fix
1 parent f53d913 commit 745f79e

File tree

7 files changed

+54
-46
lines changed

7 files changed

+54
-46
lines changed

sycl/include/CL/sycl/accessor.hpp

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,8 +1200,8 @@ class __SYCL_SPECIAL_CLASS accessor :
12001200
const property_list &PropertyList = {},
12011201
const detail::code_location CodeLoc = detail::code_location::current())
12021202
: accessor(BufferRef, PropertyList, CodeLoc) {
1203-
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get());
1204-
}
1203+
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get());
1204+
}
12051205

12061206
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
12071207
typename TagT, typename... PropTypes,
@@ -1215,8 +1215,8 @@ class __SYCL_SPECIAL_CLASS accessor :
12151215
{},
12161216
const detail::code_location CodeLoc = detail::code_location::current())
12171217
: accessor(BufferRef, PropertyList, CodeLoc) {
1218-
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get(), PropertyList);
1219-
}
1218+
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get(), PropertyList);
1219+
}
12201220
#endif
12211221

12221222
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
@@ -1294,8 +1294,8 @@ class __SYCL_SPECIAL_CLASS accessor :
12941294
TagT, const property_list &PropertyList = {},
12951295
const detail::code_location CodeLoc = detail::code_location::current())
12961296
: accessor(BufferRef, CommandGroupHandler, PropertyList, CodeLoc) {
1297-
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get());
1298-
}
1297+
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get());
1298+
}
12991299

13001300
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
13011301
typename TagT, typename... PropTypes,
@@ -1310,8 +1310,8 @@ class __SYCL_SPECIAL_CLASS accessor :
13101310
{},
13111311
const detail::code_location CodeLoc = detail::code_location::current())
13121312
: accessor(BufferRef, CommandGroupHandler, PropertyList, CodeLoc) {
1313-
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get(), PropertyList);
1314-
}
1313+
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get(), PropertyList);
1314+
}
13151315

13161316
#endif
13171317

@@ -1354,8 +1354,8 @@ class __SYCL_SPECIAL_CLASS accessor :
13541354
TagT, const property_list &PropertyList = {},
13551355
const detail::code_location CodeLoc = detail::code_location::current())
13561356
: accessor(BufferRef, AccessRange, {}, PropertyList, CodeLoc) {
1357-
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get());
1358-
}
1357+
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get());
1358+
}
13591359

13601360
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
13611361
typename TagT, typename... PropTypes,
@@ -1370,8 +1370,8 @@ class __SYCL_SPECIAL_CLASS accessor :
13701370
{},
13711371
const detail::code_location CodeLoc = detail::code_location::current())
13721372
: accessor(BufferRef, AccessRange, {}, PropertyList, CodeLoc) {
1373-
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get(), PropertyList);
1374-
}
1373+
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get(), PropertyList);
1374+
}
13751375
#endif
13761376

13771377
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
@@ -1416,8 +1416,8 @@ class __SYCL_SPECIAL_CLASS accessor :
14161416
const detail::code_location CodeLoc = detail::code_location::current())
14171417
: accessor(BufferRef, CommandGroupHandler, AccessRange, {}, PropertyList,
14181418
CodeLoc) {
1419-
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get());
1420-
}
1419+
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get());
1420+
}
14211421

14221422
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
14231423
typename TagT, typename... PropTypes,
@@ -1433,8 +1433,8 @@ class __SYCL_SPECIAL_CLASS accessor :
14331433
const detail::code_location CodeLoc = detail::code_location::current())
14341434
: accessor(BufferRef, CommandGroupHandler, AccessRange, {}, PropertyList,
14351435
CodeLoc) {
1436-
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get(), PropertyList);
1437-
}
1436+
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get(), PropertyList);
1437+
}
14381438
#endif
14391439

14401440
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
@@ -1515,8 +1515,8 @@ class __SYCL_SPECIAL_CLASS accessor :
15151515
id<Dimensions> AccessOffset, TagT, const property_list &PropertyList = {},
15161516
const detail::code_location CodeLoc = detail::code_location::current())
15171517
: accessor(BufferRef, AccessRange, AccessOffset, PropertyList, CodeLoc) {
1518-
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get());
1519-
}
1518+
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get());
1519+
}
15201520

15211521
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
15221522
typename TagT, typename... PropTypes,
@@ -1531,8 +1531,8 @@ class __SYCL_SPECIAL_CLASS accessor :
15311531
{},
15321532
const detail::code_location CodeLoc = detail::code_location::current())
15331533
: accessor(BufferRef, AccessRange, AccessOffset, PropertyList, CodeLoc) {
1534-
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get(), PropertyList);
1535-
}
1534+
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get(), PropertyList);
1535+
}
15361536
#endif
15371537

15381538
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
@@ -1614,8 +1614,8 @@ class __SYCL_SPECIAL_CLASS accessor :
16141614
const detail::code_location CodeLoc = detail::code_location::current())
16151615
: accessor(BufferRef, CommandGroupHandler, AccessRange, AccessOffset,
16161616
PropertyList, CodeLoc) {
1617-
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get());
1618-
}
1617+
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get());
1618+
}
16191619

16201620
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
16211621
typename TagT, typename... PropTypes,
@@ -1631,8 +1631,8 @@ class __SYCL_SPECIAL_CLASS accessor :
16311631
const detail::code_location CodeLoc = detail::code_location::current())
16321632
: accessor(BufferRef, CommandGroupHandler, AccessRange, AccessOffset,
16331633
PropertyList, CodeLoc) {
1634-
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get(), PropertyList);
1635-
}
1634+
adjustAccPropsInBuf(detail::getSyclObjImpl(BufferRef).get(), PropertyList);
1635+
}
16361636
#endif
16371637

16381638
template <typename... NewPropsT>
@@ -1796,20 +1796,24 @@ class __SYCL_SPECIAL_CLASS accessor :
17961796
#if __cplusplus >= 201703L
17971797
template <typename... PropTypes>
17981798
void adjustAccPropsInBuf(detail::SYCLMemObjI *SYCLMemObject,
1799-
const sycl::ext::oneapi::accessor_property_list<PropTypes...> &PropertyList = {}) {
1799+
const sycl::ext::oneapi::accessor_property_list<
1800+
PropTypes...> &PropertyList = {}) {
18001801
if constexpr (PropertyListT::template has_property<
1801-
sycl::ext::intel::property::buffer_location>()) {
1802+
sycl::ext::intel::property::buffer_location>()) {
18021803
auto location = (PropertyListT::template get_property<
1803-
sycl::ext::intel::property::buffer_location>()).get_location();
1804-
property_list PropList{sycl::property::buffer::detail::buffer_location(location)};
1804+
sycl::ext::intel::property::buffer_location>())
1805+
.get_location();
1806+
property_list PropList{
1807+
sycl::property::buffer::detail::buffer_location(location)};
18051808
SYCLMemObject->addOrReplaceAccessorProperties(PropList);
18061809
} else {
18071810
deleteAccPropsFromBuf(SYCLMemObject);
18081811
}
18091812
}
18101813

18111814
void deleteAccPropsFromBuf(detail::SYCLMemObjI *SYCLMemObject) {
1812-
SYCLMemObject->deleteAccessorProperty(sycl::detail::PropWithDataKind::AccPropBufferLocation);
1815+
SYCLMemObject->deleteAccessorProperty(
1816+
sycl::detail::PropWithDataKind::AccPropBufferLocation);
18131817
}
18141818
#endif
18151819
};

sycl/include/CL/sycl/detail/property_list_base.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ class PropertyListBase {
107107
const std::vector<std::shared_ptr<PropertyWithDataBase>> &PropsWithData) {
108108
for (auto &Prop : PropsWithData) {
109109
if (Prop->isSame(sycl::detail::PropWithDataKind::AccPropBufferLocation)) {
110-
delete_accessor_property_helper(sycl::detail::PropWithDataKind::AccPropBufferLocation);
110+
delete_accessor_property_helper(
111+
sycl::detail::PropWithDataKind::AccPropBufferLocation);
111112
MPropsWithData.push_back(Prop);
112113
}
113114
}
@@ -125,8 +126,6 @@ class PropertyListBase {
125126
}
126127
}
127128

128-
129-
130129
// Stores enabled/disabled for simple properties
131130
std::bitset<DataLessPropKind::DataLessPropKindSize> MDataLessProps;
132131
// Stores shared_ptrs to complex properties

sycl/include/CL/sycl/detail/sycl_mem_obj_i.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#pragma once
1010

1111
#include <CL/sycl/detail/pi.hpp>
12-
#include <CL/sycl/stl.hpp>
1312
#include <CL/sycl/property_list.hpp>
13+
#include <CL/sycl/stl.hpp>
1414

1515
__SYCL_INLINE_NAMESPACE(cl) {
1616
namespace sycl {
@@ -66,8 +66,8 @@ class SYCLMemObjI {
6666
// interoperability constructor, nullptr otherwise.
6767
virtual ContextImplPtr getInteropContext() const = 0;
6868

69-
70-
virtual void addOrReplaceAccessorProperties(const property_list &PropertyList) = 0;
69+
virtual void
70+
addOrReplaceAccessorProperties(const property_list &PropertyList) = 0;
7171

7272
virtual void deleteAccessorProperty(const PropWithDataKind &Kind) = 0;
7373

sycl/include/CL/sycl/detail/sycl_mem_obj_t.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,13 @@ class __SYCL_EXPORT SYCLMemObjT : public SYCLMemObjI {
111111
return MProps.get_property<propertyT>();
112112
}
113113

114-
__SYCL_DLL_LOCAL void addOrReplaceAccessorProperties(const property_list &PropertyList) override {
114+
__SYCL_DLL_LOCAL void
115+
addOrReplaceAccessorProperties(const property_list &PropertyList) override {
115116
MProps.add_or_replace_accessor_properties(PropertyList);
116117
}
117118

118-
__SYCL_DLL_LOCAL void deleteAccessorProperty(const PropWithDataKind &Kind) override {
119+
__SYCL_DLL_LOCAL void
120+
deleteAccessorProperty(const PropWithDataKind &Kind) override {
119121
MProps.delete_accessor_property(Kind);
120122
}
121123

sycl/include/CL/sycl/properties/accessor_properties.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ struct buffer_location {
5858
constexpr bool operator!=(const buffer_location::instance<B> &) const {
5959
return A != B;
6060
}
61-
int get_location() {
62-
return A;
63-
}
61+
int get_location() { return A; }
6462
};
6563
};
6664
} // namespace property

sycl/include/CL/sycl/properties/buffer_properties.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ class mem_channel : public detail::PropertyWithData<
5151
uint32_t MChannel;
5252
};
5353

54-
namespace detail{
55-
class buffer_location : public sycl::detail::PropertyWithData<sycl::detail::PropWithDataKind::AccPropBufferLocation> {
54+
namespace detail {
55+
class buffer_location
56+
: public sycl::detail::PropertyWithData<
57+
sycl::detail::PropWithDataKind::AccPropBufferLocation> {
5658
public:
5759
buffer_location(uint64_t Location) : MLocation(Location) {}
5860
uint64_t get_buffer_location() const { return MLocation; }

sycl/source/detail/memory_manager.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,11 +363,14 @@ MemoryManager::allocateBufferObject(ContextImplPtr TargetContext, void *UserPtr,
363363
RT::PiMem NewMem = nullptr;
364364
const detail::plugin &Plugin = TargetContext->getPlugin();
365365
if (PropsList.has_property<property::buffer::detail::buffer_location>()) {
366-
auto location = PropsList.get_property<property::buffer::detail::buffer_location>().get_buffer_location();
367-
pi_mem_properties props[3] = {PI_MEM_PROPERTIES_ALLOC_BUFFER_LOCATION, location, 0};
366+
auto location =
367+
PropsList.get_property<property::buffer::detail::buffer_location>()
368+
.get_buffer_location();
369+
pi_mem_properties props[3] = {PI_MEM_PROPERTIES_ALLOC_BUFFER_LOCATION,
370+
location, 0};
368371
memBufferCreateHelper(Plugin, TargetContext->getHandleRef(), CreationFlags,
369-
Size, UserPtr, &NewMem, props);
370-
372+
Size, UserPtr, &NewMem, props);
373+
371374
} else {
372375
memBufferCreateHelper(Plugin, TargetContext->getHandleRef(), CreationFlags,
373376
Size, UserPtr, &NewMem, nullptr);

0 commit comments

Comments
 (0)