Skip to content

Commit 2098d86

Browse files
committed
Only reference function module for those within LoopVectorization's namespace. Fixes #79.
1 parent 1bda510 commit 2098d86

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ os:
55
- osx
66
julia:
77
- 1.1
8-
- 1.3
8+
- 1.4
99
- nightly
1010
notifications:
1111
email: false

Manifest.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,6 @@ version = "0.1.0"
6969

7070
[[VectorizationBase]]
7171
deps = ["CpuId", "LinearAlgebra"]
72-
git-tree-sha1 = "83f073a514b5d654cc9c72ae283a33388a0d0386"
72+
git-tree-sha1 = "83e32d4835fc4f4ecfd43eb59fa7fc00854b3d41"
7373
uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"
74-
version = "0.9.3"
74+
version = "0.9.4"

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

66
[deps]
77
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

src/broadcast.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ function add_broadcast!(
184184
elementbytes::Int
185185
) where {N,S<:Base.Broadcast.AbstractArrayStyle{N},F,A}
186186
instr = get(FUNCTIONSYMBOLS, F) do
187-
# f = gensym(:func)
188-
# pushpreamble!(ls, Expr(:(=), f, Expr(:(.), bcname, QuoteNode(:f))))
189-
Instruction(bcname, :f)
187+
f = gensym(:func)
188+
pushpreamble!(ls, Expr(:(=), f, Expr(:(.), bcname, QuoteNode(:f))))
189+
Instruction(bcname, f)
190190
end
191191
args = A.parameters
192192
Nargs = length(args)

src/costs.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ Base.convert(::Type{Expr}, instr::Instruction) = Expr(:(.), instr.mod, QuoteNode
1818
function Base.Expr(instr::Instruction, args...)
1919
if instr.mod === :LoopVectorization
2020
Expr(:call, lv(instr.instr), args...)::Expr
21-
elseif instr.mod === :Main
21+
else#if instr.mod === :Main
2222
Expr(:call, instr.instr, args...)::Expr
23-
else
24-
Expr(:call, convert(Expr, instr), args...)::Expr
23+
# else
24+
# Expr(:call, convert(Expr, instr), args...)::Expr
2525
end
2626
end
2727
Base.hash(instr::Instruction, h::UInt64) = hash(instr.instr, hash(instr.mod, h))
@@ -373,5 +373,6 @@ const FUNCTIONSYMBOLS = IdDict{Type{<:Function},Instruction}(
373373
typeof(>>) => :>>,
374374
typeof(>>>) => :>>>,
375375
typeof(ifelse) => :vifelse,
376-
typeof(vifelse) => :vifelse
376+
typeof(vifelse) => :vifelse,
377+
typeof(identity) => :identity
377378
)

src/reconstruct_loopset.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function Loop(ls::LoopSet, ex::Expr, sym::Symbol, ::Type{<:AbstractUnitRange})
44
pushpreamble!(ls, Expr(:(=), loopsym, ex))
55
pushpreamble!(ls, Expr(:(=), start, Expr(:call, :first, loopsym)))
66
pushpreamble!(ls, Expr(:(=), stop, Expr(:call, :last, loopsym)))
7-
Loop(sym, 0, 1024, start, stop, false, false)::Loop
7+
Loop(sym, 1, 1024, start, stop, false, false)::Loop
88
end
99
function Loop(ls::LoopSet, ex::Expr, sym::Symbol, ::Type{StaticUpperUnitRange{U}}) where {U}
1010
start = gensym(String(sym)*"_loopstart")

0 commit comments

Comments
 (0)