Skip to content

Commit c2d2a43

Browse files
committed
test fix
1 parent 9e7a783 commit c2d2a43

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

src/modeling/graphs.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,8 @@ staticmulincr(ptr, incr) = Expr(:call, lv(:staticmul), Expr(:call, :eltype, ptr)
208208
@inline vcmpendzs(i::Int, r::AbstractCloseOpen, ::StaticInt{W}) where {W} = i ((getfield(r,:upper) % Int) & (-W))
209209
@inline vcmpend(i::Int, r::AbstractUnitRange, ::StaticInt{W}) where {W} = i vsub_nsw(last(r), W-1)
210210
@inline vcmpendzs(i::Int, r::AbstractUnitRange, ::StaticInt{W}) where {W} = i (length(r) & (-W))
211-
# i = 0
212-
# i += 4*3 # i = 12
213-
@inline vcmpend(i::Int, r::AbstractRange, ::StaticInt{W}) where {W} = i vsub_nsw(last(r), vsub_nsw(W*step(r), 1))
214-
@inline vcmpendzs(i::Int, r::AbstractRange, ::StaticInt{W}) where {W} = i vsub_nsw(last(r), vsub_nsw(W*step(r), 1))
211+
@inline vcmpend(i::Int, r::AbstractRange, ::StaticInt{W}) where {W} = i vsub_nsw(last(r), vmul_nsw(vsub_nsw(W,1),step(r)))
212+
@inline vcmpendzs(i::Int, r::AbstractRange, ::StaticInt{W}) where {W} = i vsub_nsw(last(r), vmul_nsw(vsub_nsw(W,1),step(r)))
215213

216214
function staticloopexpr(loop::Loop)
217215
f = first(loop)

test/shuffleloadstores.jl

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -459,19 +459,17 @@ end
459459
img2 = Matrix{UInt8}(undef, w, w);
460460
@test readraw!(img1, raw) == readraw_turbo!(img2, raw)
461461

462-
for n_hi (9,71,72,73)
463-
@show n_hi
464-
n_hi = 9
462+
for n_hi 9:100
463+
iszero((n_hi-1)%3) && continue
465464
n_lo = n_hi ÷ 3
466465
a_lo_gc = rand(n_lo+2, n_lo+2);
467-
a_hi_tmp_ref = zeros(size(a_hi_gc));
468-
a_hi_tmp0 = zeros(size(a_hi_gc));
469-
# a_hi_tmp1 = zeros(size(a_hi_gc));
466+
a_hi_tmp_ref = zeros(n_hi+2, n_hi+2);
467+
a_hi_tmp0 = zeros(n_hi+2, n_hi+2);
470468

471469
issue348_ref!(a_hi_tmp_ref, a_lo_gc)
472470
issue348_v0!(a_hi_tmp0, a_lo_gc)
473471
@test a_hi_tmp_ref == a_hi_tmp0
474-
a_hi_tmp1 = view(zeros(size(a_hi_gc) .* 9), map((x,y) -> x .+ (4y), axes(a_hi_gc), size(a_hi_gc))...);
472+
a_hi_tmp1 = view(zeros(size(a_hi_tmp0) .* 9), map((x,y) -> x .+ (4y), axes(a_hi_tmp0), size(a_hi_tmp0))...);
475473
issue348_v1!(a_hi_tmp1, a_lo_gc)
476474
@test a_hi_tmp_ref == a_hi_tmp1
477475
@turbo a_hi_tmp1 .= 0;

0 commit comments

Comments
 (0)