Skip to content

Commit 5674f89

Browse files
committed
ThreadingUtilities 0.5
1 parent 118d47a commit 5674f89

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ SIMDDualNumbers = "0.1"
4040
SLEEFPirates = "0.6.23"
4141
SpecialFunctions = "1, 2"
4242
Static = "0.3.3, 0.4"
43-
ThreadingUtilities = "0.4.5"
43+
ThreadingUtilities = "0.5"
4444
UnPack = "1"
4545
VectorizationBase = "0.21.21"
4646
julia = "1.5"

src/codegen/lower_threads.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ struct TURBO{UNROLL,OPS,ARF,AM,LPSYM,LBV,FLBV} <: Function end
44
# hopefully shouldn't add much to compile time.
55

66
function (::TURBO{UNROLL,OPS,ARF,AM,LPSYM,LBV,FLBV})(p::Ptr{UInt}) where {UNROLL,OPS,ARF,AM,LPSYM,K,LBV,FLBV<:Tuple{Vararg{Any,K}}}
7-
(_, _vargs) = ThreadingUtilities.load(p, FLBV, 2*sizeof(UInt))
7+
(_, _vargs) = ThreadingUtilities.load(p, FLBV, 2*sizeof(UInt))
88
# Main.VARGS[Threads.threadid()] = first(_vargs)
99
# Threads.threadid() == 2 && Core.println(typeof(_vargs))
10-
ret = _turbo_!(Val{UNROLL}(), Val{OPS}(), Val{ARF}(), Val{AM}(), Val{LPSYM}(), Val{LBV}(), _vargs...)
11-
ThreadingUtilities.store!(p, ret, Int(register_size()))
12-
nothing
10+
ret = _turbo_!(Val{UNROLL}(), Val{OPS}(), Val{ARF}(), Val{AM}(), Val{LPSYM}(), Val{LBV}(), _vargs...)
11+
ThreadingUtilities.store!(p, ret, Int(register_size()))
12+
ThreadingUtilities._atomic_store!(p, ThreadingUtilities.SPIN)
13+
nothing
1314
end
1415
@generated function Base.pointer(::TURBO{UNROLL,OPS,ARF,AM,LPSYM,LBV,FLBV}) where {UNROLL,OPS,ARF,AM,LPSYM,K,LBV,FLBV<:Tuple{Vararg{Any,K}}}
1516
f = TURBO{UNROLL,OPS,ARF,AM,LPSYM,LBV,FLBV}()

0 commit comments

Comments
 (0)