From 39f45862db67c6a90da91183a4e5196bb2c1726b Mon Sep 17 00:00:00 2001 From: Steffen Larsen Date: Fri, 7 Jan 2022 19:08:06 +0300 Subject: [PATCH] [SYCL][NFC] Fix confused clang-format formatting in accessor.hpp Signed-off-by: Steffen Larsen --- sycl/include/CL/sycl/accessor.hpp | 100 +++++++++++++++--------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/sycl/include/CL/sycl/accessor.hpp b/sycl/include/CL/sycl/accessor.hpp index dba3a3e98fd5e..c94b281b6c342 100644 --- a/sycl/include/CL/sycl/accessor.hpp +++ b/sycl/include/CL/sycl/accessor.hpp @@ -1688,64 +1688,64 @@ class __SYCL_SPECIAL_CLASS accessor : template operator typename detail::enable_if_t>() const { +#ifdef __ENABLE_USM_ADDR_SPACE__ + atomic #else - AccessMode == access::mode::atomic, - atomic>() const { + atomic #endif - const size_t LinearIndex = getLinearIndex(id()); - return atomic( - multi_ptr(getQualifiedPtr() + LinearIndex)); -} + >() const { + const size_t LinearIndex = getLinearIndex(id()); + return atomic( + multi_ptr(getQualifiedPtr() + LinearIndex)); + } -template -typename detail::enable_if_t<(Dims > 0) && AccessMode == access::mode::atomic, - atomic> -operator[](id Index) const { - const size_t LinearIndex = getLinearIndex(Index); - return atomic( - multi_ptr(getQualifiedPtr() + LinearIndex)); -} + template + typename detail::enable_if_t<(Dims > 0) && AccessMode == access::mode::atomic, + atomic> + operator[](id Index) const { + const size_t LinearIndex = getLinearIndex(Index); + return atomic( + multi_ptr(getQualifiedPtr() + LinearIndex)); + } -template -typename detail::enable_if_t> -operator[](size_t Index) const { - const size_t LinearIndex = getLinearIndex(id(Index)); - return atomic( - multi_ptr(getQualifiedPtr() + LinearIndex)); -} -template 1)>> -typename AccessorCommonT::template AccessorSubscript -operator[](size_t Index) const { - return AccessorSubscript(*this, Index); -} + template + typename detail::enable_if_t> + operator[](size_t Index) const { + const size_t LinearIndex = getLinearIndex(id(Index)); + return atomic( + multi_ptr(getQualifiedPtr() + LinearIndex)); + } + template 1)>> + typename AccessorCommonT::template AccessorSubscript + operator[](size_t Index) const { + return AccessorSubscript(*this, Index); + } -template > -DataT *get_pointer() const { - return getPointerAdjusted(); -} + template > + DataT *get_pointer() const { + return getPointerAdjusted(); + } -template < - access::target AccessTarget_ = AccessTarget, - typename = detail::enable_if_t> -global_ptr get_pointer() const { - return global_ptr(getPointerAdjusted()); -} + template < + access::target AccessTarget_ = AccessTarget, + typename = detail::enable_if_t> + global_ptr get_pointer() const { + return global_ptr(getPointerAdjusted()); + } -template > -constant_ptr get_pointer() const { - return constant_ptr(getPointerAdjusted()); -} + template > + constant_ptr get_pointer() const { + return constant_ptr(getPointerAdjusted()); + } -bool operator==(const accessor &Rhs) const { return impl == Rhs.impl; } -bool operator!=(const accessor &Rhs) const { return !(*this == Rhs); } + bool operator==(const accessor &Rhs) const { return impl == Rhs.impl; } + bool operator!=(const accessor &Rhs) const { return !(*this == Rhs); } private: // supporting function for get_pointer() @@ -1768,7 +1768,7 @@ bool operator!=(const accessor &Rhs) const { return !(*this == Rhs); } "buffer size must be greater than zero.", PI_INVALID_VALUE); } - }; // namespace sycl +}; #if __cplusplus > 201402L