File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 555555
556556# Special adjoint/transpose methods for Adjoint/Transpose that have been reshaped as a vector
557557# these are used in transposing banded matrices by forwarding the operation to the bands
558- # compute vec(transpose(A)), but avoid an allocating reshape if possible
558+ """
559+ _vectranspose(A::AbstractVector)::AbstractVector
560+
561+ Compute `vec(transpose(A))`, but avoid an allocating reshape if possible
562+ """
559563_vectranspose (A:: AbstractVector ) = vec (transpose (A))
560564_vectranspose (A:: Base.ReshapedArray{<:Any,1,<:TransposeAbsVec} ) = transpose (parent (A))
561- # compute vec(adjoint(A)), but avoid an allocating reshape if possible
565+ """
566+ _vecadjoint(A::AbstractVector)::AbstractVector
567+ Compute `vec(adjoint(A))`, but avoid an allocating reshape if possible
568+ """
562569_vecadjoint (A:: AbstractVector ) = vec (adjoint (A))
563570_vecadjoint (A:: Base.ReshapedArray{<:Any,1,<:AdjointAbsVec} ) = adjoint (parent (A))
Original file line number Diff line number Diff line change @@ -1250,6 +1250,8 @@ end
12501250 @test B[1 ,1 ] == m
12511251 C[2 ,1 ] = el
12521252 @test B[1 ,2 ] == m
1253+ @test (@allocated op (B)) == 0
1254+ @test (@allocated op (op (B))) == 0
12531255 end
12541256end
12551257
Original file line number Diff line number Diff line change @@ -1523,6 +1523,8 @@ end
15231523 el = op (m)
15241524 C[1 ,1 ] = el
15251525 @test D[1 ,1 ] == m
1526+ @test (@allocated op (D)) == 0
1527+ @test (@allocated op (op (D))) == 0
15261528 end
15271529end
15281530
You can’t perform that action at this time.
0 commit comments