Skip to content

Commit 6409bf4

Browse files
committed
Merge branch 'master' of github.com:chriselrod/LoopVectorization.jl
2 parents 8c8c876 + 2c910b9 commit 6409bf4

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
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.12.15"
4+
version = "0.12.16"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"

src/LoopVectorization.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ using SLEEFPirates: log_fast, log2_fast, log10_fast
4040

4141
using ArrayInterface
4242
using ArrayInterface: OptionallyStaticUnitRange, OptionallyStaticRange, Zero, One, StaticBool, True, False, reduce_tup, indices, UpTri, LoTri
43-
using StrideArraysCore: CloseOpen
43+
using StrideArraysCore: CloseOpen, PtrArray
4444
# @static if VERSION ≥ v"1.6.0-rc1" #TODO: delete `else` when dropping 1.5 support
4545
# using ArrayInterface: static_step
4646
# else # Julia 1.5 did not define `step` on CartesianIndices

src/condense_loopset.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,11 @@ function check_shouldindbyind(ls::LoopSet, ind::Symbol, shouldindbyind::Vector{B
378378
end
379379
true
380380
end
381+
382+
383+
@inline dummy_ptrarray(sp, A) = sp
384+
@inline dummy_ptrarray(sp::AbstractStridedPointer{T,N}, A::AbstractArray{T,N}) where {T,N} = PtrArray(sp, VectorizationBase.zerotuple(Val{N}()), VectorizationBase.val_dense_dims(A))
385+
381386
# write a "check_loops_safe_to_zerorangestart
382387
# that will be used to
383388
# 1) decide whether to zerorangestart
@@ -426,7 +431,7 @@ function add_grouped_strided_pointer!(extra_args::Expr, ls::LoopSet)
426431
for (k,gespindsummary) gespsummaries
427432
ref = allarrayrefs[k]
428433
gespinds = calcgespinds(ls, ref, gespindsummary, shouldindbyind)
429-
push!(tgarrays.args, Expr(:call, lv(:gespf1), vptr(ref), gespinds))
434+
push!(tgarrays.args, Expr(:call, lv(:dummy_ptrarray), Expr(:call, lv(:gespf1), vptr(ref), gespinds), name(ref)))
430435
end
431436
push!(gsp.args, tgarrays)
432437
matcheddims = Expr(:tuple)

0 commit comments

Comments
 (0)