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
#@inline function Cassette.overdub(::CPUCtx, ::typeof(__atomic), ex)
115
-
# println(ex)
116
-
#end
117
-
118
83
# Other Documentation
119
84
120
85
"""
121
-
atomic_add!(ptr::LLVMPtr{T}, val::T)
86
+
atomic_add!(ptr::Ptr{T}, val::T)
122
87
123
88
This is an atomic addition.
124
89
It reads the value `old` located at address `ptr`, computes `old + val`, and stores the result back to memory at the same address.
@@ -131,7 +96,7 @@ Additionally, on GPU hardware with compute capability 6.0+, values of type Float
131
96
atomic_add!
132
97
133
98
"""
134
-
atomic_sub!(ptr::LLVMPtr{T}, val::T)
99
+
atomic_sub!(ptr::Ptr{T}, val::T)
135
100
136
101
This is an atomic subtraction.
137
102
It reads the value `old` located at address `ptr`, computes `old - val`, and stores the result back to memory at the same address.
@@ -143,7 +108,7 @@ This operation is supported for values of type Int32, Int64, UInt32 and UInt64.
143
108
atomic_sub!
144
109
145
110
"""
146
-
atomic_and!(ptr::LLVMPtr{T}, val::T)
111
+
atomic_and!(ptr::Ptr{T}, val::T)
147
112
148
113
This is an atomic and.
149
114
It reads the value `old` located at address `ptr`, computes `old & val`, and stores the result back to memory at the same address.
@@ -155,7 +120,7 @@ This operation is supported for values of type Int32, Int64, UInt32 and UInt64.
155
120
atomic_and!
156
121
157
122
"""
158
-
atomic_or!(ptr::LLVMPtr{T}, val::T)
123
+
atomic_or!(ptr::Ptr{T}, val::T)
159
124
160
125
This is an atomic or.
161
126
It reads the value `old` located at address `ptr`, computes `old | val`, and stores the result back to memory at the same address.
@@ -167,7 +132,7 @@ This operation is supported for values of type Int32, Int64, UInt32 and UInt64.
167
132
atomic_or!
168
133
169
134
"""
170
-
atomic_xor!(ptr::LLVMPtr{T}, val::T)
135
+
atomic_xor!(ptr::Ptr{T}, val::T)
171
136
172
137
This is an atomic xor.
173
138
It reads the value `old` located at address `ptr`, computes `old ⊻ val`, and stores the result back to memory at the same address.
@@ -179,7 +144,7 @@ This operation is supported for values of type Int32, Int64, UInt32 and UInt64.
179
144
atomic_xor!
180
145
181
146
"""
182
-
atomic_min!(ptr::LLVMPtr{T}, val::T)
147
+
atomic_min!(ptr::Ptr{T}, val::T)
183
148
184
149
This is an atomic min.
185
150
It reads the value `old` located at address `ptr`, computes `min(old, val)`, and st ores the result back to memory at the same address.
@@ -191,7 +156,7 @@ This operation is supported for values of type Int32, Int64, UInt32 and UInt64.
191
156
atomic_min!
192
157
193
158
"""
194
-
atomic_max!(ptr::LLVMPtr{T}, val::T)
159
+
atomic_max!(ptr::Ptr{T}, val::T)
195
160
196
161
This is an atomic max.
197
162
It reads the value `old` located at address `ptr`, computes `max(old, val)`, and st ores the result back to memory at the same address.
@@ -203,7 +168,7 @@ This operation is supported for values of type Int32, Int64, UInt32 and UInt64.
203
168
atomic_max!
204
169
205
170
"""
206
-
atomic_inc!(ptr::LLVMPtr{T}, val::T)
171
+
atomic_inc!(ptr::Ptr{T}, val::T)
207
172
208
173
This is an atomic increment function that counts up to a certain number before starting again at 0.
209
174
It reads the value `old` located at address `ptr`, computes `((old >= val) ? 0 : (o ld+1))`, and stores the result back to memory at the same address.
@@ -215,7 +180,7 @@ This operation is only supported for values of type Int32.
215
180
atomic_inc!
216
181
217
182
"""
218
-
atomic_dec!(ptr::LLVMPtr{T}, val::T)
183
+
atomic_dec!(ptr::Ptr{T}, val::T)
219
184
220
185
This is an atomic decrement function that counts down to 0 from a defined value `val`.
221
186
It reads the value `old` located at address `ptr`, computes `(((old == 0) | (old > val)) ? val : (old-1))`, and stores the result back to memory at the same address.
0 commit comments