Skip to content

Commit 2c910b9

Browse files
committed
Reenable GroupedStridedPointer to save strides
1 parent 3f605b9 commit 2c910b9

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
@@ -350,6 +350,11 @@ function check_shouldindbyind(ls::LoopSet, ind::Symbol, shouldindbyind::Vector{B
350350
end
351351
true
352352
end
353+
354+
355+
@inline dummy_ptrarray(sp, A) = sp
356+
@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))
357+
353358
# write a "check_loops_safe_to_zerorangestart
354359
# that will be used to
355360
# 1) decide whether to zerorangestart
@@ -398,7 +403,7 @@ function add_grouped_strided_pointer!(extra_args::Expr, ls::LoopSet)
398403
for (k,gespindsummary) gespsummaries
399404
ref = allarrayrefs[k]
400405
gespinds = calcgespinds(ls, ref, gespindsummary, shouldindbyind)
401-
push!(tgarrays.args, Expr(:call, lv(:gespf1), vptr(ref), gespinds))
406+
push!(tgarrays.args, Expr(:call, lv(:dummy_ptrarray), Expr(:call, lv(:gespf1), vptr(ref), gespinds), name(ref)))
402407
end
403408
push!(gsp.args, tgarrays)
404409
matcheddims = Expr(:tuple)

0 commit comments

Comments
 (0)