diff --git a/Project.toml b/Project.toml index 901a7e6..a1dc5f7 100644 --- a/Project.toml +++ b/Project.toml @@ -16,7 +16,6 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -VectorizationBase = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f" [targets] -test = ["Aqua", "InteractiveUtils", "StaticArrays", "Test", "VectorizationBase"] +test = ["Aqua", "InteractiveUtils", "StaticArrays", "Test"] diff --git a/src/threadtasks.jl b/src/threadtasks.jl index 311eb55..c7bd3ce 100644 --- a/src/threadtasks.jl +++ b/src/threadtasks.jl @@ -25,9 +25,7 @@ function (tt::ThreadTask)() GC.@preserve THREADPOOL begin while true if _atomic_state(p) == TASK - # if _atomic_cas_cmp!(p, TASK, EXEC) _call(p) - # store!(p, SPIN) _atomic_store!(p, SPIN) wait_counter = zero(UInt32) continue diff --git a/test/internals.jl b/test/internals.jl index 58daa73..376ec6f 100644 --- a/test/internals.jl +++ b/test/internals.jl @@ -3,7 +3,7 @@ @test ThreadingUtilities.store!(pointer(UInt[]), nothing, 1) == 1 x = zeros(UInt, 100); GC.@preserve x begin - t1 = (1.0, C_NULL, Val(7), (3, UInt(17)), VectorizationBase.stridedpointer(x)) + t1 = (1.0, C_NULL, Val(7), (3, UInt(17)), (pointer(x), strides(x))) @test ThreadingUtilities.store!(pointer(x), t1, 0) === mapreduce(sizeof, +, t1) @test ThreadingUtilities.store!(pointer(x), Val(0), 0) == 0 @test ThreadingUtilities.load(pointer(x), typeof(t1), 0) === (mapreduce(sizeof, +, t1), t1) diff --git a/test/testsetup.jl b/test/testsetup.jl index c2b97af..6aaf492 100644 --- a/test/testsetup.jl +++ b/test/testsetup.jl @@ -1,6 +1,5 @@ using ThreadingUtilities using Test -using VectorizationBase import InteractiveUtils diff --git a/test/threadingutilities.jl b/test/threadingutilities.jl index e686e30..6215c1b 100644 --- a/test/threadingutilities.jl +++ b/test/threadingutilities.jl @@ -3,7 +3,7 @@ function (::Copy{P})(p::Ptr{UInt}) where {P} _, (ptry,ptrx,N) = ThreadingUtilities.load(p, P, 2*sizeof(UInt)) N > 0 || throw("This function throws if N == 0 for testing purposes.") @simd ivdep for n ∈ 1:N - vstore!(ptry, vload(ptrx, (n,)), (n,)) + unsafe_store!(ptry, unsafe_load(ptrx, n), n) end end @generated function copy_ptr(::A, ::B) where {A,B} @@ -15,8 +15,8 @@ end function setup_copy!(p, y, x) N = length(y) @assert length(x) == N - py = stridedpointer(y) - px = stridedpointer(x) + py = pointer(y) + px = pointer(x) fptr = copy_ptr(py, px) offset = ThreadingUtilities.store!(p, fptr, sizeof(UInt)) ThreadingUtilities.store!(p, (py,px,N), offset)