Skip to content

Commit

Permalink
move fence earlier for vmapnt
Browse files Browse the repository at this point in the history
  • Loading branch information
chriselrod committed May 11, 2024
1 parent eeaa0b2 commit b413ba8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/simdfunctionals/map.jl
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ function (m::VmapClosure{NonTemporal,F,D,N,A})(
(offset, stop) = ThreadingUtilities.load(p, Int, offset)

_vmap_singlethread!(m.f, dest, start, stop, Val{NonTemporal}(), args)
ThreadingUtilities._atomic_store!(p, ThreadingUtilities.SPIN)
NonTemporal && Threads.atomic_fence()
ThreadingUtilities._atomic_store!(p, ThreadingUtilities.SPIN)
nothing
end

Expand Down

0 comments on commit b413ba8

Please sign in to comment.