Skip to content

Commit 17a3382

Browse files
committed
Support int32
1 parent ab05ad8 commit 17a3382

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/aggregate.jl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
struct StandardAggregation
22
end
33

4-
function aggregation(::StandardAggregation, S)
4+
function aggregation(::StandardAggregation, S::SparseMatrixCSC{T,R}) where {T,R}
55

6+
@show R
67
n = size(S, 1)
7-
x = zeros(Int, n)
8-
y = zeros(Int, n)
8+
x = zeros(R, n)
9+
y = zeros(R, n)
910

1011
next_aggregate = 1
1112

@@ -96,12 +97,12 @@ function aggregation(::StandardAggregation, S)
9697
# Some nodes not aggregated
9798
if minimum(x) == -1
9899
mask = x .!= -1
99-
I = collect(1:n)[mask]
100+
I = collect(R, 1:n)[mask]
100101
J = x[mask] + 1
101102
V = ones(eltype(S), length(J))
102103
AggOp = sparse(J,I,V,N,M)
103104
else
104-
Tp = collect(1:n+1)
105+
Tp = collect(R, 1:n+1)
105106
x .= x .+ 1
106107
Tx = ones(eltype(S), length(x))
107108
AggOp = SparseMatrixCSC(N, M, Tp, x, Tx)

0 commit comments

Comments
 (0)