Skip to content

Commit e7f4eda

Browse files
committed
Some more fixes to reduce memory
1 parent 5b12168 commit e7f4eda

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/classical.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function rs_direct_interpolation_pass1(T, A, splitting)
127127

128128
if sum_strong_pos == 0
129129
diag += sum_all_pos
130-
beta = 0
130+
beta = zero(beta)
131131
end
132132

133133
neg_coeff = -1 * alpha / diag
@@ -152,7 +152,7 @@ function rs_direct_interpolation_pass1(T, A, splitting)
152152
end
153153

154154
m = zeros(Ti, n)
155-
sum = 0
155+
sum = zero(eltype(m))
156156
for i = 1:n
157157
m[i] = sum
158158
sum += splitting[i]

src/strength.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function strength_of_connection{T, Ti, Tv}(c::Classical{T}, A::SparseMatrixCSC{T
5050
end
5151

5252
function find_max_off_diag(A, i)
53-
m = 0
53+
m = zero(eltype(A))
5454
for j in nzrange(A, i)
5555
row = A.rowval[j]
5656
val = A.nzval[j]

0 commit comments

Comments
 (0)