Skip to content

Commit 527fd0e

Browse files
committed
small cpu fixes
1 parent 3035067 commit 527fd0e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/cpu.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,23 +275,24 @@ KernelAbstractions.argconvert(k::Kernel{CPU}, arg) = arg
275275
###
276276

277277
if Base.VERSION < v"1.7.0"
278+
278279
import KernelAbstractions: atomic_add!, atomic_and!, atomic_cas!,
279280
atomic_dec!, atomic_inc!, atomic_max!,
280281
atomic_min!, atomic_op!, atomic_or!,
281282
atomic_sub!, atomic_xchg!, atomic_xor!
283+
282284
function atomic_error(args...)
283-
error("CPU Atomics are not allowed for julia version under 1.7!"
285+
error("CPU Atomics are not allowed for julia version under 1.7!")
284286
end
285287

286288
afxs = [atomic_add!, atomic_and!, atomic_cas!, atomic_dec!,
287289
atomic_inc!, atomic_max!, atomic_min!, atomic_op!,
288-
atomic_or!, atomic_sub!, atomic_xchg!, atomic_xor! ]
290+
atomic_or!, atomic_sub!, atomic_xchg!, atomic_xor!]
291+
289292
for afx in afxs
290293
@inline function Cassette.overdub(::CPUCtx, ::typeof(afx), args...)
291294
atomic_error(args...)
292295
end
293296
end
294297
end
295298

296-
end
297-

0 commit comments

Comments
 (0)