Skip to content

Commit e4ff160

Browse files
committed
Updates to reflect new load/store! API.
1 parent ba333bf commit e4ff160

File tree

8 files changed

+23
-30
lines changed

8 files changed

+23
-30
lines changed

Manifest.toml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,15 @@ uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
4949

5050
[[SIMDPirates]]
5151
deps = ["VectorizationBase"]
52-
git-tree-sha1 = "4a33e07340324e2d3200c72231b5db829b7bad1f"
53-
repo-rev = "master"
54-
repo-url = "https://github.com/chriselrod/SIMDPirates.jl.git"
52+
git-tree-sha1 = "ecacd3f808e559d9e363f2620041c6286c8efaca"
5553
uuid = "21efa798-c60a-11e8-04d3-e1a92915a26a"
56-
version = "0.3.16"
54+
version = "0.4.0"
5755

5856
[[SLEEFPirates]]
5957
deps = ["Libdl", "SIMDPirates", "VectorizationBase"]
60-
git-tree-sha1 = "8e4277a226f4ce3b3d7b5a60ab66d8f9f1ffdbab"
61-
repo-rev = "master"
62-
repo-url = "https://github.com/chriselrod/SLEEFPirates.jl.git"
58+
git-tree-sha1 = "bb99e28c0284de9c3233258a93882429752faa55"
6359
uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa"
64-
version = "0.3.7"
60+
version = "0.3.8"
6561

6662
[[Serialization]]
6763
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
@@ -75,8 +71,6 @@ uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
7571

7672
[[VectorizationBase]]
7773
deps = ["CpuId", "LinearAlgebra"]
78-
git-tree-sha1 = "794a8d4ad8c817f1c7b7598b3d858891ab100722"
79-
repo-rev = "master"
80-
repo-url = "https://github.com/chriselrod/VectorizationBase.jl.git"
74+
git-tree-sha1 = "b9b5c8fa55e9b859989e759f405624d16b0b0ca2"
8175
uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"
82-
version = "0.4.1"
76+
version = "0.4.2"

Project.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "LoopVectorization"
22
uuid = "bdcacae8-1622-11e9-2a5c-532679323890"
33
authors = ["Chris Elrod <[email protected]>"]
4-
version = "0.6.13"
4+
version = "0.6.14"
55

66
[deps]
77
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
@@ -12,9 +12,9 @@ VectorizationBase = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"
1212

1313
[compat]
1414
Parameters = "0"
15-
SIMDPirates = "~0.3.16"
16-
SLEEFPirates = "~0.3.7"
17-
VectorizationBase = "~0.4.1"
15+
SIMDPirates = "~0.4"
16+
SLEEFPirates = "~0.3.8"
17+
VectorizationBase = "~0.4.2"
1818
julia = "1.1"
1919

2020
[extras]

src/add_loads.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,8 @@ end
7373

7474
struct LoopValue end
7575
@inline VectorizationBase.stridedpointer(::LoopValue) = LoopValue()
76-
@inline SIMDPirates.vload(::LoopValue, i::Tuple{_MM{W}}) where {W} = _MM{W}(@inbounds(i[1].i) + 1)
77-
@inline SIMDPirates.vload(::LoopValue, i::Tuple{_MM{W}}, ::Unsigned) where {W} = _MM{W}(@inbounds(i[1].i) + 1)
78-
# @inline SIMDPirates.vload(::LoopValue, i::Tuple{_MM{W}}) where {W} = SVec(SIMDPirates.vrangeincr(Val{W}(), @inbounds(i[1].i), Val{1}()))
79-
# @inline SIMDPirates.vload(::LoopValue, i::Tuple{_MM{W}}, ::Unsigned) where {W} = SVec(SIMDPirates.vrangeincr(Val{W}(), @inbounds(i[1].i), Val{1}()))
76+
@inline VectorizationBase.load(::LoopValue, i::Tuple{_MM{W}}) where {W} = _MM{W}(@inbounds(i[1].i) + 1)
77+
@inline VectorizationBase.load(::LoopValue, i::Tuple{_MM{W}}, ::Unsigned) where {W} = _MM{W}(@inbounds(i[1].i) + 1)
8078
@inline VectorizationBase.load(::LoopValue, i::Integer) = i + one(i)
8179
@inline VectorizationBase.load(::LoopValue, i::Tuple{I}) where {I<:Integer} = @inbounds(i[1]) + one(I)
8280
@inline Base.eltype(::LoopValue) = Int8

src/filter.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ function vfilter!(f::F, x::Vector{T}, y::AbstractArray{T}) where {F,T <: SUPPORT
1010
ptr_x = pointer(x)
1111
ptr_y = pointer(y)
1212
for _ 1:Nrep
13-
vy = vload(Vec{W,T}, gep(ptr_y, i))
13+
vy = load(Vec{W,T}, ptr_y, i)
1414
mask = f(SVec(vy))
1515
SIMDPirates.compressstore!(gep(ptr_x, j), vy, mask)
1616
i += W
1717
j += count_ones(mask)
1818
end
1919
rem_mask = VectorizationBase.mask(T, Nrem)
20-
vy = vload(Vec{W,T}, gep(ptr_y, i), rem_mask)
20+
vy = load(Vec{W,T}, gep(ptr_y, i), rem_mask)
2121
mask = rem_mask & f(SVec(vy))
2222
SIMDPirates.compressstore!(gep(ptr_x, j), vy, mask)
2323
j += count_ones(mask)

src/lower_load.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ function pushvectorload!(q::Expr, op::Operation, var::Symbol, td::UnrollArgs, U:
22
@unpack u, unrolled = td
33
ptr = refname(op)
44
name, mo = name_memoffset(var, op, td, W, vecnotunrolled)
5-
instrcall = Expr(:call, lv(:vload), ptr, mo)
5+
instrcall = Expr(:call, lv(:load), ptr, mo)
66
if mask !== nothing && (vecnotunrolled || u == U - 1)
77
push!(instrcall.args, mask)
88
end

src/lower_store.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function lower_conditionalstore_vectorized!(
103103
td = UnrollArgs(u, unrolled, tiled, suffix)
104104
name, mo = name_memoffset(var, op, td, W, vecnotunrolled, parentisunrolled)
105105
condvarname = varassignname(condvar, u, condunrolled)
106-
instrcall = Expr(:call, lv(:vstore!), ptr, name, mo)
106+
instrcall = Expr(:call, lv(:store!), ptr, name, mo)
107107
if mask !== nothing && (vecnotunrolled || u == U - 1)
108108
push!(instrcall.args, Expr(:call, lv(:combinemasks), condvarname, mask))
109109
else
@@ -147,7 +147,7 @@ function lower_store_vectorized!(
147147
for u 0:U-1
148148
td = UnrollArgs(u, unrolled, tiled, suffix)
149149
name, mo = name_memoffset(var, op, td, W, vecnotunrolled, parentisunrolled)
150-
instrcall = Expr(:call, lv(:vstore!), ptr, name, mo)
150+
instrcall = Expr(:call, lv(:store!), ptr, name, mo)
151151
if mask !== nothing && (vecnotunrolled || u == U - 1)
152152
push!(instrcall.args, mask)
153153
end

src/map.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ function vmap_quote(N, ::Type{T}) where {T}
55
val = Expr(:call, Expr(:curly, :Val, W))
66
q = Expr(:block, Expr(:(=), :M, Expr(:call, :length, :dest)), Expr(:(=), :vdest, Expr(:call, :pointer, :dest)), Expr(:(=), :m, 0))
77
fcall = Expr(:call, :f)
8-
loopbody = Expr(:block, Expr(:call, :vstore!, :vdest, fcall, :m), Expr(:(+=), :m, W))
8+
loopbody = Expr(:block, Expr(:call, :store!, :vdest, fcall, :m), Expr(:(+=), :m, W))
99
fcallmask = Expr(:call, :f)
10-
bodymask = Expr(:block, Expr(:(=), :__mask__, Expr(:call, :mask, val, Expr(:call, :&, :M, W-1))), Expr(:call, :vstore!, :vdest, fcallmask, :m, :__mask__))
10+
bodymask = Expr(:block, Expr(:(=), :__mask__, Expr(:call, :mask, val, Expr(:call, :&, :M, W-1))), Expr(:call, :store!, :vdest, fcallmask, :m, :__mask__))
1111
for n 1:N
1212
arg_n = Symbol(:varg_,n)
1313
push!(q.args, Expr(:(=), arg_n, Expr(:macrocall, Symbol("@inbounds"), LineNumberNode(@__LINE__,Symbol(@__FILE__)), Expr(:call, :pointer, Expr(:ref, :args, n)))))
14-
push!(fcall.args, Expr(:call, :vload, val, arg_n, :m))
15-
push!(fcallmask.args, Expr(:call, :vload, val, arg_n, :m, :__mask__))
14+
push!(fcall.args, Expr(:call, :load, val, arg_n, :m))
15+
push!(fcallmask.args, Expr(:call, :load, val, arg_n, :m, :__mask__))
1616
end
1717
loop = Expr(:for, Expr(:(=), :_, Expr(:call, :(:), 0, Expr(:call, :-, Expr(:call, :(>>>), :M, Wshift), 1))), loopbody)
1818
push!(q.args, loop)

src/precompile.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ function _precompile_()
5858
precompile(Tuple{typeof(Base.Broadcast.broadcasted),Function,Array{Int64,3},LowDimArray{(false, true, true),Int64,3,Array{Int64,3}}})
5959
precompile(Tuple{typeof(Base.Broadcast.broadcasted),Function,Array{Int64,3},LowDimArray{(true, false, true),Int64,3,Array{Int64,3}}})
6060
precompile(Tuple{typeof(Base.Broadcast.broadcasted),Function,Array{Int64,3},LowDimArray{(true, true, false),Int64,3,Array{Int64,3}}})
61-
precompile(Tuple{typeof(Base.Broadcast.broadcasted),typeof(*ˡ),Array{Int32,2},Array{Int32,1}})
61+
precompile(Tuple{typeof(Base.Broadcast.broadcasted),typeof(*ˡ),Array{Float64,2},Array{Float64,1}})
62+
precompile(Tuple{typeof(Base.Broadcast.broadcasted),typeof(*ˡ),Array{Int64,2},Array{Int64,1}})
6263
precompile(Tuple{typeof(LoopVectorization._avx_loopset),Core.SimpleVector,Core.SimpleVector,Core.SimpleVector,Core.SimpleVector,NTuple{4,DataType}})
6364
precompile(Tuple{typeof(LoopVectorization._avx_loopset),Core.SimpleVector,Core.SimpleVector,Core.SimpleVector,Core.SimpleVector,NTuple{5,DataType}})
6465
precompile(Tuple{typeof(LoopVectorization._avx_loopset),Core.SimpleVector,Core.SimpleVector,Core.SimpleVector,Core.SimpleVector,NTuple{6,DataType}})

0 commit comments

Comments
 (0)