|
631 | 631 | LoopVectorization.maybestaticsize(::LinearAlgebra.Adjoint{T,SizedMatrix{M,N,T}}, ::Val{2}) where {M,N,T} = LoopVectorization.Static{M}()
|
632 | 632 | LoopVectorization.maybestaticsize(::LinearAlgebra.Transpose{T,SizedMatrix{M,N,T}}, ::Val{1}) where {M,N,T} = LoopVectorization.Static{N}()
|
633 | 633 | 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 | + |
635 | 647 | for T ∈ (Float32, Float64, Int32, Int64)
|
636 | 648 | # let T = Int32
|
637 | 649 | # exceeds_time_limit() && break
|
|
684 | 696 | @test C ≈ C2
|
685 | 697 | AmuladdBavx!(C, At', Bt', 2, -1)
|
686 | 698 | @test C ≈ C2
|
| 699 | + fill!(C, 9999.999); AmuladdBavx!(ZeroInitializedArray(C), At', Bt') |
| 700 | + @test C ≈ C2 |
687 | 701 | fill!(C, 9999.999); AmulB2x2avx!(C, A, B);
|
688 | 702 | @test C ≈ C2
|
689 | 703 | fill!(C, 9999.999); AmulB2x2avx!(C, At', B);
|
|
0 commit comments