Skip to content

Commit 7674ea7

Browse files
committed
Test ZeroInitializedStridedPointer.
1 parent 1d7c2c1 commit 7674ea7

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ OffsetArrays = "1"
1818
SIMDPirates = "0.8.20"
1919
SLEEFPirates = "0.5.4"
2020
UnPack = "0,1"
21-
VectorizationBase = "0.12.29"
21+
VectorizationBase = "0.12.30"
2222
julia = "1.1"
2323

2424
[extras]

benchmark/Manifest.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ version = "1.0.1"
154154

155155
[[Distances]]
156156
deps = ["LinearAlgebra", "Statistics"]
157-
git-tree-sha1 = "bed62cc5afcff16de797a9f38fb358b74071f785"
157+
git-tree-sha1 = "23717536c81b63e250f682b0e0933769eecd1411"
158158
uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
159-
version = "0.9.0"
159+
version = "0.8.2"
160160

161161
[[Distributed]]
162162
deps = ["Random", "Serialization", "Sockets"]
@@ -343,9 +343,9 @@ version = "0.21.0"
343343

344344
[[Juno]]
345345
deps = ["Base64", "Logging", "Media", "Profile"]
346-
git-tree-sha1 = "a686b0cf235fa3e491b79b4783c2d2382292b436"
346+
git-tree-sha1 = "90976c3ab792a98d240d42f9df07420ccfc60668"
347347
uuid = "e5e0dc1b-0480-54bc-9374-aad01c23163d"
348-
version = "0.8.2"
348+
version = "0.8.3"
349349

350350
[[KernelDensity]]
351351
deps = ["Distributions", "FFTW", "Interpolations", "Optim", "StatsBase", "Test"]
@@ -413,17 +413,17 @@ deps = ["Libdl"]
413413
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
414414

415415
[[Loess]]
416-
deps = ["Distances", "Random", "Statistics", "Test"]
417-
git-tree-sha1 = "0ee46caf683a422b595be4dfaed6cda28f541e25"
416+
deps = ["Distances", "Statistics"]
417+
git-tree-sha1 = "67b1bc5f42144fb83b065b8a8e117e56ec10e601"
418418
uuid = "4345ca2d-374a-55d4-8d30-97f9976e7612"
419-
version = "0.5.0"
419+
version = "0.5.1"
420420

421421
[[Logging]]
422422
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
423423

424424
[[LoopVectorization]]
425425
deps = ["DocStringExtensions", "LinearAlgebra", "OffsetArrays", "SIMDPirates", "SLEEFPirates", "UnPack", "VectorizationBase"]
426-
path = "/home/chriselrod/.julia/dev/LoopVectorization"
426+
git-tree-sha1 = "695da000214847a1489c8d78ef781e0abd5b944a"
427427
uuid = "bdcacae8-1622-11e9-2a5c-532679323890"
428428
version = "0.8.21"
429429

test/gemm.jl

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,19 @@
631631
LoopVectorization.maybestaticsize(::LinearAlgebra.Adjoint{T,SizedMatrix{M,N,T}}, ::Val{2}) where {M,N,T} = LoopVectorization.Static{M}()
632632
LoopVectorization.maybestaticsize(::LinearAlgebra.Transpose{T,SizedMatrix{M,N,T}}, ::Val{1}) where {M,N,T} = LoopVectorization.Static{N}()
633633
LoopVectorization.maybestaticsize(::LinearAlgebra.Transpose{T,SizedMatrix{M,N,T}}, ::Val{2}) where {M,N,T} = LoopVectorization.Static{M}()
634-
634+
635+
struct ZeroInitializedArray{T,N,A<:DenseArray{T,N}} <: DenseArray{T,N}
636+
data::A
637+
end
638+
Base.size(A::ZeroInitializedArray) = size(A.data)
639+
Base.length(A::ZeroInitializedArray) = length(A.data)
640+
Base.axes(A::ZeroInitializedArray, i) = axes(A.data, i)
641+
@inline Base.getindex(A::ZeroInitializedArray{T}) where {T} = zero(T)
642+
Base.@propagate_inbounds Base.setindex!(A::ZeroInitializedArray, v, i...) = setindex!(A.data, v, i...)
643+
function LoopVectorization.VectorizationBase.stridedpointer(A::ZeroInitializedArray)
644+
LoopVectorization.VectorizationBase.ZeroInitializedStridedPointer(LoopVectorization.VectorizationBase.stridedpointer(A.data))
645+
end
646+
635647
for T (Float32, Float64, Int32, Int64)
636648
# let T = Int32
637649
# exceeds_time_limit() && break
@@ -684,6 +696,8 @@
684696
@test C C2
685697
AmuladdBavx!(C, At', Bt', 2, -1)
686698
@test C C2
699+
fill!(C, 9999.999); AmuladdBavx!(ZeroInitializedArray(C), At', Bt')
700+
@test C C2
687701
fill!(C, 9999.999); AmulB2x2avx!(C, A, B);
688702
@test C C2
689703
fill!(C, 9999.999); AmulB2x2avx!(C, At', B);

0 commit comments

Comments
 (0)