Skip to content

Commit b9a4725

Browse files
committed
Fix: now if symbol is indexed matrix is block
1 parent 79f4172 commit b9a4725

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

experimental/algorithm/LAGraph_CFL_reachability_advanced.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,16 +1055,20 @@ GrB_Info LAGraph_CFL_reachability_adv(
10551055

10561056
GRB_TRY(GrB_Matrix_new(&T[i], GrB_BOOL, n, n));
10571057

1058+
GrB_Index nrows;
1059+
GrB_Matrix_nrows(&nrows, adj_matrices[i]);
1060+
GrB_Index ncols;
1061+
GrB_Matrix_ncols(&ncols, adj_matrices[i]);
1062+
10581063
GrB_Matrix_dup(&delta_matrices[i].base, adj_matrices[i]);
10591064
delta_matrices[i] = matrix_from_base(delta_matrices[i].base);
10601065

1061-
GRB_TRY(GrB_Matrix_new(&matrix, GrB_BOOL, n, n));
1066+
GRB_TRY(GrB_Matrix_new(&matrix, GrB_BOOL, nrows, ncols));
10621067
matrices[i] = ((optimizations & OPT_LAZY) || (optimizations & OPT_BLOCK))
10631068
? matrix_from_base_lazy(matrix)
10641069
: matrix_from_base(matrix);
1065-
// matrix_print_lazy(&matrices[i]);
10661070

1067-
GRB_TRY(GrB_Matrix_new(&matrix, GrB_BOOL, n, n));
1071+
GRB_TRY(GrB_Matrix_new(&matrix, GrB_BOOL, nrows, ncols));
10681072
temp_matrices[i] = matrix_from_base(matrix);
10691073
}
10701074

0 commit comments

Comments
 (0)