Skip to content

Commit 48d7bd3

Browse files
committed
Try to improve test coverage slightly.
1 parent abf1443 commit 48d7bd3

File tree

3 files changed

+29
-29
lines changed

3 files changed

+29
-29
lines changed

src/add_compute.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,16 @@ end
9090
# @assert iscompute(op)
9191
# pushop!(ls, child, name(op))
9292
# end
93-
function isreductzero(op::Operation, ls::LoopSet, reduct_zero::Symbol)
94-
isconstant(op) || return false
95-
reduct_zero === op.instruction.mod && return true
96-
if reduct_zero === :zero
97-
iszero(ls, op) && return true
98-
elseif reduct_zero === :one
99-
isone(ls, op) && return true
100-
end
101-
false
102-
end
93+
# function isreductzero(op::Operation, ls::LoopSet, reduct_zero::Symbol)
94+
# isconstant(op) || return false
95+
# reduct_zero === op.instruction.mod && return true
96+
# if reduct_zero === :zero
97+
# iszero(ls, op) && return true
98+
# elseif reduct_zero === :one
99+
# isone(ls, op) && return true
100+
# end
101+
# false
102+
# end
103103

104104
# function substitute_op_in_parents!(vparents::Vector{Operation}, replacer::Operation, replacee::Operation)
105105
# for i ∈ eachindex(vparents)

src/graphs.jl

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ function UnrollSpecification(us::UnrollSpecification, u₁, u₂)
1111
@unpack u₁loopnum, u₂loopnum, vectorizedloopnum = us
1212
UnrollSpecification(u₁loopnum, u₂loopnum, vectorizedloopnum, u₁, u₂)
1313
end
14-
function UnrollSpecification(us::UnrollSpecification; u₁ = us.u₁, u₂ = us.u₂)
15-
@unpack u₁loopnum, u₂loopnum, vectorizedloopnum = us
16-
UnrollSpecification(u₁loopnum, u₂loopnum, vectorizedloopnum, u₁, u₂)
17-
end
14+
# function UnrollSpecification(us::UnrollSpecification; u₁ = us.u₁, u₂ = us.u₂)
15+
# @unpack u₁loopnum, u₂loopnum, vectorizedloopnum = us
16+
# UnrollSpecification(u₁loopnum, u₂loopnum, vectorizedloopnum, u₁, u₂)
17+
# end
1818
isunrolled1(us::UnrollSpecification, n::Int) = us.u₁loopnum == n
1919
isunrolled2(us::UnrollSpecification, n::Int) = !isunrolled1(us, n) && us.u₂loopnum == n
2020
isvectorized(us::UnrollSpecification, n::Int) = us.vectorizedloopnum == n
@@ -225,20 +225,20 @@ function zerotype(ls::LoopSet, op::Operation)
225225
end
226226
INVALID
227227
end
228-
function Base.iszero(ls::LoopSet, op::Operation)
229-
opid = identifier(op)
230-
for (id,_) ls.preamble_zeros
231-
opid == id && return true
232-
end
233-
false
234-
end
235-
function Base.isone(ls::LoopSet, op::Operation)
236-
opid = identifier(op)
237-
for (id,_) ls.preamble_ones
238-
opid == id && return true
239-
end
240-
false
241-
end
228+
# function Base.iszero(ls::LoopSet, op::Operation)
229+
# opid = identifier(op)
230+
# for (id,_) ∈ ls.preamble_zeros
231+
# opid == id && return true
232+
# end
233+
# false
234+
# end
235+
# function Base.isone(ls::LoopSet, op::Operation)
236+
# opid = identifier(op)
237+
# for (id,_) ∈ ls.preamble_ones
238+
# opid == id && return true
239+
# end
240+
# false
241+
# end
242242

243243

244244
includesarray(ls::LoopSet, array::Symbol) = array ls.includedarrays

test/special.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
end
1313
function myvexpavx!(b, a)
1414
@avx for i eachindex(a)
15-
b[i] = exp(a[i])
15+
b[i] = Base.exp(a[i])
1616
end
1717
end
1818
function myvexp_avx!(b, a)

0 commit comments

Comments
 (0)