Skip to content

Commit

Permalink
Merge pull request #542 from VerenaBeckham/verena/cl_memory_order
Browse files Browse the repository at this point in the history
Move cl::sycl::memory_order, atomic class and atomic operations to sycl namespace

(cherry picked from commit b8ae78b)
  • Loading branch information
gmlueck committed Nov 7, 2024
1 parent cf918d0 commit 291138d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
8 changes: 3 additions & 5 deletions adoc/chapters/programming_interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18988,10 +18988,8 @@ T* operator--() const

The atomic types and operations on atomic types provided by SYCL 1.2.1 are
deprecated in SYCL 2020, and will be removed in a future version of SYCL.
The types and operations are made available in the [code]#cl::sycl::# namespace
for backwards compatibility.

The constructors and member functions for the [code]#cl::sycl::atomic# class are
The constructors and member functions for the [code]#sycl::atomic# class are
listed in <<table.atomics.constructors>> and <<table.atomics.members>>
respectively.

Expand All @@ -19010,7 +19008,7 @@ include::{header_dir}/atomicoperations.h[lines=4..-1]


[[table.atomics.constructors]]
.Constructors of the [code]#cl::sycl::atomic# class template
.Constructors of the [code]#sycl::atomic# class template
[width="100%",options="header",separator="@",cols="65%,35%"]
|====
@ Constructor @ Description
Expand All @@ -19031,7 +19029,7 @@ instance of SYCL [code]#atomic# which is associated with the pointer


[[table.atomics.members]]
.Member functions available on an object of type [code]#cl::sycl::atomic<T>#
.Member functions available on an object of type [code]#sycl::atomic<T>#
[width="100%",options="header",separator="@",cols="65%,35%"]
|====
@ Member function @ Description
Expand Down
4 changes: 2 additions & 2 deletions adoc/headers/accessorBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ class accessor {
/* Deprecated
Available only when: (AccessMode == access_mode::atomic && Dimensions == 0)
*/
operator cl::sycl::atomic<DataT, access::address_space::global_space>() const;
operator sycl::atomic<DataT, access::address_space::global_space>() const;

/* Deprecated
Available only when: (AccessMode == access_mode::atomic && Dimensions == 1) */
cl::sycl::atomic<DataT, access::address_space::global_space>
sycl::atomic<DataT, access::address_space::global_space>
operator[](id<Dimensions> index) const;

/* Deprecated in SYCL 2020
Expand Down
5 changes: 0 additions & 5 deletions adoc/headers/atomic.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
// Copyright (c) 2011-2024 The Khronos Group, Inc.
// SPDX-License-Identifier: Apache-2.0

namespace cl {
namespace sycl {

/* Deprecated in SYCL 2020 */
enum class memory_order : /* unspecified */ { relaxed };

/* Deprecated in SYCL 2020 */
template <typename T, access::address_space AddressSpace =
access::address_space::global_space>
Expand Down Expand Up @@ -50,4 +46,3 @@ class atomic {
};

} // namespace sycl
} // namespace cl
2 changes: 0 additions & 2 deletions adoc/headers/atomicoperations.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2011-2024 The Khronos Group, Inc.
// SPDX-License-Identifier: Apache-2.0

namespace cl {
namespace sycl {
/* Deprecated in SYCL 2020 */
template <typename T, access::address_space AddressSpace>
Expand Down Expand Up @@ -60,4 +59,3 @@ template <typename T, access::address_space AddressSpace>
T atomic_fetch_max(atomic<T, AddressSpace> object, T operand,
memory_order memoryOrder = memory_order::relaxed);
} // namespace sycl
} // namespace cl

0 comments on commit 291138d

Please sign in to comment.