Skip to content

Commit f07b9fd

Browse files
committed
Fix depwarning in tests that caused extreme slowdown (one(::CartesianIndex) -> oneunit(::CartesianIndex)
1 parent 6ef5e85 commit f07b9fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/gemm.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,8 +619,8 @@
619619
Base.IndexStyle(::Type{<:SizedMatrix}) = Base.IndexLinear()
620620
Base.@propagate_inbounds Base.getindex(A::SizedMatrix, i::Int) = getindex(parent(A), i)
621621
Base.@propagate_inbounds Base.setindex!(A::SizedMatrix, v, i::Int) = setindex!(parent(A), v, i)
622-
Base.@propagate_inbounds Base.getindex(A::SizedMatrix, i::CartesianIndex) = getindex(parent(A), i + one(i))
623-
Base.@propagate_inbounds Base.setindex!(A::SizedMatrix, v, i::CartesianIndex) = setindex!(parent(A), v, i + one(i))
622+
Base.@propagate_inbounds Base.getindex(A::SizedMatrix, i::CartesianIndex) = getindex(parent(A), i + oneunit(i))
623+
Base.@propagate_inbounds Base.setindex!(A::SizedMatrix, v, i::CartesianIndex) = setindex!(parent(A), v, i + oneunit(i))
624624
Base.@propagate_inbounds Base.getindex(A::SizedMatrix, i::Int, j::Int) = getindex(parent(A), i+1, j+1)
625625
Base.@propagate_inbounds Base.setindex!(A::SizedMatrix, v, i::Int, j::Int) = setindex!(parent(A), v, i+1, j+1)
626626
Base.size(::SizedMatrix{M,N}) where {M,N} = (M,N)

0 commit comments

Comments
 (0)