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
It reads the value `old` located at address `ptr`, computes `old + val`, and stores the result back to memory at the same address.
125
+
These operations are performed in one atomic transaction.
126
+
The function returns `old`.
127
+
128
+
This operation is supported for values of type Int32, Int64, UInt32, UInt64, and Float32.
129
+
Additionally, on GPU hardware with compute capability 6.0+, values of type Float64 are supported.
130
+
"""
131
+
atomic_add!
132
+
133
+
"""
134
+
atomic_sub!(ptr::LLVMPtr{T}, val::T)
135
+
136
+
This is an atomic subtraction.
137
+
It reads the value `old` located at address `ptr`, computes `old - val`, and stores the result back to memory at the same address.
138
+
These operations are performed in one atomic transaction.
139
+
The function returns `old`.
140
+
141
+
This operation is supported for values of type Int32, Int64, UInt32 and UInt64.
142
+
"""
143
+
atomic_sub!
144
+
145
+
"""
146
+
atomic_and!(ptr::LLVMPtr{T}, val::T)
147
+
148
+
This is an atomic and.
149
+
It reads the value `old` located at address `ptr`, computes `old & val`, and stores the result back to memory at the same address.
150
+
These operations are performed in one atomic transaction.
151
+
The function returns `old`.
152
+
153
+
This operation is supported for values of type Int32, Int64, UInt32 and UInt64.
154
+
"""
155
+
atomic_and!
156
+
157
+
"""
158
+
atomic_or!(ptr::LLVMPtr{T}, val::T)
159
+
160
+
This is an atomic or.
161
+
It reads the value `old` located at address `ptr`, computes `old | val`, and stores the result back to memory at the same address.
162
+
These operations are performed in one atomic transaction.
163
+
The function returns `old`.
164
+
165
+
This operation is supported for values of type Int32, Int64, UInt32 and UInt64.
166
+
"""
167
+
atomic_or!
168
+
169
+
"""
170
+
atomic_xor!(ptr::LLVMPtr{T}, val::T)
171
+
172
+
This is an atomic xor.
173
+
It reads the value `old` located at address `ptr`, computes `old ⊻ val`, and stores the result back to memory at the same address.
174
+
These operations are performed in one atomic transaction.
175
+
The function returns `old`.
176
+
177
+
This operation is supported for values of type Int32, Int64, UInt32 and UInt64.
178
+
"""
179
+
atomic_xor!
180
+
181
+
"""
182
+
atomic_min!(ptr::LLVMPtr{T}, val::T)
183
+
184
+
This is an atomic min.
185
+
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.
186
+
These operations are performed in one atomic transaction.
187
+
The function returns `old`.
188
+
189
+
This operation is supported for values of type Int32, Int64, UInt32 and UInt64.
190
+
"""
191
+
atomic_min!
192
+
193
+
"""
194
+
atomic_max!(ptr::LLVMPtr{T}, val::T)
195
+
196
+
This is an atomic max.
197
+
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.
198
+
These operations are performed in one atomic transaction.
199
+
The function returns `old`.
200
+
201
+
This operation is supported for values of type Int32, Int64, UInt32 and UInt64.
202
+
"""
203
+
atomic_max!
204
+
205
+
"""
206
+
atomic_inc!(ptr::LLVMPtr{T}, val::T)
207
+
208
+
This is an atomic increment function that counts up to a certain number before starting again at 0.
209
+
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.
210
+
These three operations are performed in one atomic transaction.
211
+
The function returns `old`.
212
+
213
+
This operation is only supported for values of type Int32.
214
+
"""
215
+
atomic_inc!
216
+
217
+
"""
218
+
atomic_dec!(ptr::LLVMPtr{T}, val::T)
219
+
220
+
This is an atomic decrement function that counts down to 0 from a defined value `val`.
221
+
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.
222
+
These three operations are performed in one atomic transaction.
223
+
The function returns `old`.
224
+
225
+
This operation is only supported for values of type Int32.
0 commit comments