Skip to content

Commit

Permalink
Test ZeroInitializedStridedPointer.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriselrod committed Aug 3, 2020
1 parent 1d7c2c1 commit 7674ea7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ OffsetArrays = "1"
SIMDPirates = "0.8.20"
SLEEFPirates = "0.5.4"
UnPack = "0,1"
VectorizationBase = "0.12.29"
VectorizationBase = "0.12.30"
julia = "1.1"

[extras]
Expand Down
16 changes: 8 additions & 8 deletions benchmark/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ version = "1.0.1"

[[Distances]]
deps = ["LinearAlgebra", "Statistics"]
git-tree-sha1 = "bed62cc5afcff16de797a9f38fb358b74071f785"
git-tree-sha1 = "23717536c81b63e250f682b0e0933769eecd1411"
uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
version = "0.9.0"
version = "0.8.2"

[[Distributed]]
deps = ["Random", "Serialization", "Sockets"]
Expand Down Expand Up @@ -343,9 +343,9 @@ version = "0.21.0"

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

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

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

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

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

Expand Down
16 changes: 15 additions & 1 deletion test/gemm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,19 @@
LoopVectorization.maybestaticsize(::LinearAlgebra.Adjoint{T,SizedMatrix{M,N,T}}, ::Val{2}) where {M,N,T} = LoopVectorization.Static{M}()
LoopVectorization.maybestaticsize(::LinearAlgebra.Transpose{T,SizedMatrix{M,N,T}}, ::Val{1}) where {M,N,T} = LoopVectorization.Static{N}()
LoopVectorization.maybestaticsize(::LinearAlgebra.Transpose{T,SizedMatrix{M,N,T}}, ::Val{2}) where {M,N,T} = LoopVectorization.Static{M}()


struct ZeroInitializedArray{T,N,A<:DenseArray{T,N}} <: DenseArray{T,N}
data::A
end
Base.size(A::ZeroInitializedArray) = size(A.data)
Base.length(A::ZeroInitializedArray) = length(A.data)
Base.axes(A::ZeroInitializedArray, i) = axes(A.data, i)
@inline Base.getindex(A::ZeroInitializedArray{T}) where {T} = zero(T)
Base.@propagate_inbounds Base.setindex!(A::ZeroInitializedArray, v, i...) = setindex!(A.data, v, i...)
function LoopVectorization.VectorizationBase.stridedpointer(A::ZeroInitializedArray)
LoopVectorization.VectorizationBase.ZeroInitializedStridedPointer(LoopVectorization.VectorizationBase.stridedpointer(A.data))
end

for T (Float32, Float64, Int32, Int64)
# let T = Int32
# exceeds_time_limit() && break
Expand Down Expand Up @@ -684,6 +696,8 @@
@test C C2
AmuladdBavx!(C, At', Bt', 2, -1)
@test C C2
fill!(C, 9999.999); AmuladdBavx!(ZeroInitializedArray(C), At', Bt')
@test C C2
fill!(C, 9999.999); AmulB2x2avx!(C, A, B);
@test C C2
fill!(C, 9999.999); AmulB2x2avx!(C, At', B);
Expand Down

2 comments on commit 7674ea7

@chriselrod
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/18859

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.8.22 -m "<description of version>" 7674ea71f2de25aac07cfd915e1f97c5bc47c44e
git push origin v0.8.22

Please sign in to comment.