Skip to content

Commit 9311671

Browse files
committed
Actually fix >=256 elements, fixes #310
1 parent 2465016 commit 9311671

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
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.55"
4+
version = "0.12.56"
55

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

src/reconstruct_loopset.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ expandbyoffset(inds::Vector{Int}, offsets::Vector{Int}, expand::Bool) = expandby
380380
function loopindex!(idxs::Vector{Int}, ls::LoopSet, u::Unsigned, shift::Unsigned)
381381
mask = (one(shift) << shift) - one(shift) # mask to zero out all but shift-bits
382382
while u != zero(u)
383-
pushfirst!(idxs, ( u % UInt8 ) & mask)
383+
pushfirst!(idxs, ( u % typeof(shift) ) & mask)
384384
u >>= shift
385385
end
386386
idxs
@@ -408,8 +408,8 @@ childdependencies(ls::LoopSet, os::OperationStruct, expand = false, offset = 0)
408408
# parents(ls::LoopSet, u::UInt128) = loopindexoffset(ls, u, false)
409409
function parents(ls::LoopSet, u₀::UInt128, u₁::UInt128)
410410
idxs = Int[]
411-
u₁ == zero(u₁) || loopindex!(idxs, ls, u₁, 0x10)
412-
loopindex!(idxs, ls, u₀, 0x10)
411+
u₁ == zero(u₁) || loopindex!(idxs, ls, u₁, 0x0010)
412+
loopindex!(idxs, ls, u₀, 0x0010)
413413
reverse!(idxs)
414414
end
415415
parents(ls::LoopSet, os::OperationStruct) = parents(ls, os.parents₀, os.parents₁)

0 commit comments

Comments
 (0)