Skip to content

Commit 8cff603

Browse files
committed
Fix formatting
1 parent ae59899 commit 8cff603

File tree

3 files changed

+423
-399
lines changed

3 files changed

+423
-399
lines changed

sycl/include/sycl/ext/oneapi/experimental/work_group_memory.hpp

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ inline constexpr bool is_unbounded_array_v = is_unbounded_array<T>::value;
2222

2323
class work_group_memory_impl {
2424
public:
25-
work_group_memory_impl() : wgm_size{ 0 }, buffer_size{ 0 } {}
25+
work_group_memory_impl() : wgm_size{0}, buffer_size{0} {}
2626
work_group_memory_impl(const work_group_memory_impl &rhs) = default;
2727
work_group_memory_impl &
2828
operator=(const work_group_memory_impl &rhs) = default;
@@ -36,22 +36,17 @@ inline size_t getWorkGroupMemoryOwnSize(detail::work_group_memory_impl *wgm) {
3636
return wgm->wgm_size;
3737
}
3838

39-
// The following 3 functions help us get the address of the first element of a multi-dimensional
40-
// array, be it bounded or unbounded. A scalar is also included. In that case, it just returns
41-
// the address of the scalar.
42-
template <typename DataT>
43-
auto getData(DataT& scalar) {
44-
return &scalar;
45-
}
39+
// The following 3 functions help us get the address of the first element of a
40+
// multi-dimensional array, be it bounded or unbounded. A scalar is also
41+
// included. In that case, it just returns the address of the scalar.
42+
template <typename DataT> auto getData(DataT &scalar) { return &scalar; }
4643

47-
template <typename DataT, size_t N>
48-
auto getData(DataT (&bounded_arr)[N]) {
49-
return getData(bounded_arr[0]);
44+
template <typename DataT, size_t N> auto getData(DataT (&bounded_arr)[N]) {
45+
return getData(bounded_arr[0]);
5046
}
5147

52-
template<typename DataT>
53-
auto getData(DataT (&unbounded_arr)[]) {
54-
return getData(unbounded_arr[0]);
48+
template <typename DataT> auto getData(DataT (&unbounded_arr)[]) {
49+
return getData(unbounded_arr[0]);
5550
}
5651

5752
} // namespace detail
@@ -86,7 +81,8 @@ class __SYCL_SPECIAL_CLASS __SYCL_TYPE(work_group_memory) work_group_memory
8681
multi_ptr<value_type, access::address_space::local_space, IsDecorated>
8782
get_multi_ptr() const {
8883
return sycl::address_space_cast<access::address_space::local_space,
89-
IsDecorated, value_type>(sycl::detail::getData(*ptr));
84+
IsDecorated, value_type>(
85+
sycl::detail::getData(*ptr));
9086
}
9187
DataT *operator&() const { return ptr; }
9288
operator DataT &() const { return *(this->operator&()); }

0 commit comments

Comments
 (0)