Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
2 changes: 0 additions & 2 deletions src/threadtasks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/internals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion test/testsetup.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using ThreadingUtilities
using Test
using VectorizationBase

import InteractiveUtils

6 changes: 3 additions & 3 deletions test/threadingutilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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)
Expand Down