You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sycl/doc/extensions/ExtendedAtomics/SYCL_INTEL_extended_atomics.asciidoc
+17-1Lines changed: 17 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ This extension is written against the SYCL 1.2.1 specification, Revision 6.
59
59
60
60
== Overview
61
61
62
-
The SYCL atomic library (+cl::sycl::atomic+) defined in SYCL 1.2.1 is based on the standard atomic libary (+std::atomic+) but has some differences. This extension introduces an alternative atomic class (+cl::sycl::intel::atomic_ref+) including additional features from {cpp}20:
62
+
The SYCL atomic library (+cl::sycl::atomic+) defined in SYCL 1.2.1 is based on the standard atomic libary (+std::atomic+) but has some differences. This extension introduces a new fence function (+cl::sycl::intel::atomic_fence+) and an alternative atomic class (+cl::sycl::intel::atomic_ref+) including additional features from {cpp}20:
63
63
64
64
- Overloaded operators to reduce the verbosity of using atomics
65
65
- Missing functions (e.g. `is_lock_free()`)
@@ -282,6 +282,18 @@ The additional member functions below are available for atomic references to poi
282
282
283
283
|===
284
284
285
+
==== Atomic Fence
286
+
287
+
The +atomic_fence+ function corresponds to the +std::atomic_thread_fence+ function, and performs a memory fence ordering accesses to any memory space.
288
+
289
+
The effects of a call to +atomic_fence+ depend on the value of the +order+ parameter:
290
+
291
+
- `relaxed`: No effect
292
+
- `acquire`: Acquire fence
293
+
- `release`: Release fence
294
+
- `acq_rel`: Both an acquire fence and a release fence
295
+
- `seq_cst`: A sequentially consistent acquire and release fence
296
+
285
297
==== Sample Header
286
298
287
299
[source,c++]
@@ -489,6 +501,9 @@ class atomic_ref<T*, DefaultOrder, Space> {
489
501
T* operator-=(difference_type) const noexcept;
490
502
491
503
};
504
+
505
+
void atomic_fence(memory_order order):
506
+
492
507
} // namespace intel
493
508
} // namespace sycl
494
509
} // namespace cl
@@ -513,6 +528,7 @@ None.
513
528
|Rev|Date|Author|Changes
514
529
|1|2020-01-30|John Pennycook|*Initial public working draft*
0 commit comments