Skip to content

Commit 45ba66d

Browse files
committed
Actually add the tests
1 parent 2548cef commit 45ba66d

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

src/parse/memory_ops_common.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function gesp_const_offset!(ls::LoopSet, vptrarray::Symbol, ninds::Int, indices:
100100
else
101101
# want same name for arrays to be given the same name if possible
102102
mltsym = Symbol(sym, "##multiplied##by##", mlt)
103-
pushpreamble!(ls, Expr(:(=), mltsym, Expr(:call, :(*), mlt, sym)))
103+
# pushpreamble!(ls, Expr(:(=), mltsym, Expr(:call, :(*), mlt, sym)))
104104
# pushprepreamble!(ls, Expr(:(=), mltsym, Expr(:call, :(*), mlt, sym)))
105105
subset_vptr!(ls, vptrarray, ninds, mltsym, indices, loopedindex, D)
106106
end

test/dot.jl

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ using Test
6565
s
6666
end
6767
function myselfdotavx(a)
68-
s = zero(eltype(a))
69-
@turbo for i eachindex(a)
70-
s += a[i]*a[i]
71-
end
72-
s
68+
s = zero(eltype(a))
69+
@turbo for i eachindex(a)
70+
s += a[i]*a[i]
71+
end
72+
s
7373
end
7474
function myselfdotavx_v2(a)
7575
s = zero(eltype(a))
@@ -93,13 +93,15 @@ using Test
9393
end
9494
s
9595
end
96-
function dot_unroll2avx(x::Vector{T}, y::Vector{T}) where {T<:Number}
97-
z = zero(T)
98-
@turbo unroll=2 for i 1:length(x)
99-
z += x[i]*y[i]
100-
end
101-
z
96+
function dot_unroll2avx(x::Vector{T}, y::Vector{T}) where {T<:Number}
97+
z = zero(T)
98+
o = (3,)
99+
b = (3,)
100+
@turbo unroll=2 for i 1:length(x)
101+
z += x[i]*y[i+o[1]-b[1]]
102102
end
103+
z
104+
end
103105
function dot_unroll3avx(x::Vector{T}, y::Vector{T}) where {T<:Number}
104106
z = zero(T)
105107
@turbo unroll=3 for i 1:length(x)

0 commit comments

Comments
 (0)