Skip to content

Commit 3a914bf

Browse files
committed
Tiny memory save
1 parent b3e9bdb commit 3a914bf

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/classical.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,11 @@ function direct_interpolation(A, T, splitting)
4242
fill!(T.nzval, 1.)
4343
T = A .* T
4444
Pp = rs_direct_interpolation_pass1(T, A, splitting)
45-
Pp = Pp .+ 1
45+
Pp .= Pp .+ 1
4646

4747
Px, Pj, Pp = rs_direct_interpolation_pass2(A, T, splitting, Pp)
4848

49-
# Px .= abs.(Px)
50-
Pj = Pj .+ 1
49+
Pj .= Pj .+ 1
5150

5251
R = SparseMatrixCSC(maximum(Pj), size(A, 1), Pp, Pj, Px)
5352
P = R'

src/splitting.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ function RS_CF_splitting(S::SparseMatrixCSC, T::SparseMatrixCSC)
116116

117117
lambda[row] == 0 && continue
118118

119-
# assert(lambda[j] > 0);//this would cause problems!
120-
121119
# move j to the beginning of its current interval
122120
lambda_j = lambda[row] + 1
123121
old_pos = node_to_index[row]

0 commit comments

Comments
 (0)