@@ -3509,8 +3509,8 @@ end
35093509
35103510# # circular shift
35113511
3512- # swaps blocks start:split and split+1:fin in col
3513- function swap ! (col:: AbstractVector , start:: Integer , fin:: Integer , split:: Integer )
3512+ # thius helper in-place swaps blocks start:split and split+1:fin in col
3513+ function _swap ! (col:: AbstractVector , start:: Integer , fin:: Integer , split:: Integer )
35143514 split == fin && return
35153515 reverse! (col, start, split)
35163516 reverse! (col, split + 1 , fin)
@@ -3519,8 +3519,8 @@ function swap!(col::AbstractVector, start::Integer, fin::Integer, split::Integer
35193519end
35203520
35213521
3522- # this helper shifts a column by r
3523- function shifter ! (R:: AbstractVector , V:: AbstractVector , start:: Integer , fin:: Integer , m:: Integer , r:: Integer )
3522+ # this helper shifts a column by r. Used also by sparsevector.jl
3523+ function subvector_shifter ! (R:: AbstractVector , V:: AbstractVector , start:: Integer , fin:: Integer , m:: Integer , r:: Integer )
35243524 split = fin
35253525 @inbounds for j = start: fin
35263526 # shift in the vertical direction...
@@ -3532,8 +3532,8 @@ function shifter!(R::AbstractVector, V::AbstractVector, start::Integer, fin::Int
35323532 end
35333533 end
35343534 # ...but rowval should be sorted within columns
3535- swap ! (R, start, fin, split)
3536- swap ! (V, start, fin, split)
3535+ _swap ! (R, start, fin, split)
3536+ _swap ! (V, start, fin, split)
35373537end
35383538
35393539
@@ -3567,7 +3567,7 @@ function circshift!(O::SparseMatrixCSC, X::SparseMatrixCSC, (r,c)::Base.DimsInte
35673567 # #### vertical shift
35683568 r = mod (r, X. m)
35693569 @inbounds for i= 1 : O. n
3570- shifter ! (O. rowval, O. nzval, O. colptr[i], O. colptr[i+ 1 ]- 1 , O. m, r)
3570+ subvector_shifter ! (O. rowval, O. nzval, O. colptr[i], O. colptr[i+ 1 ]- 1 , O. m, r)
35713571 end
35723572 return O
35733573end
0 commit comments