diff --git a/LAGraph/src/algorithm/LG_CC_FastSV6.c b/LAGraph/src/algorithm/LG_CC_FastSV6.c index 6595fe2ee..24b900141 100644 --- a/LAGraph/src/algorithm/LG_CC_FastSV6.c +++ b/LAGraph/src/algorithm/LG_CC_FastSV6.c @@ -556,7 +556,6 @@ int LG_CC_FastSV6 // SuiteSparse:GraphBLAS method, with GxB extensions bool T_jumbled, T_iso ; GRB_TRY (GxB_Matrix_unpack_CSR (T, &Tp, &Tj, &Tx, &Tp_size, &Tj_size, &Tx_size, &T_iso, &T_jumbled, NULL)) ; -// printf ("did unpack T\n") ; fflush (stdout) ; fflush (stderr) ; #pragma omp parallel for num_threads(nthreads) schedule(static) for (tid = 0 ; tid < nthreads ; tid++) { @@ -601,33 +600,15 @@ int LG_CC_FastSV6 // SuiteSparse:GraphBLAS method, with GxB extensions count [tid] = p - Tp [range [tid]] ; } -// printf ("did prune T\n") ; fflush (stdout) ; fflush (stderr) ; - // Compact empty space out of Tj not filled in from the above phase. nvals = 0 ; for (tid = 0 ; tid < nthreads ; tid++) { - // `memcpy` is not safe if src/dest are overlapping. - // Use `memmove` (or if available `memmove_s`) instead. - -// #if defined (__STDC_LIB_EXT1__) -// memmove_s (Tj + nvals, Tj_size - sizeof (GrB_Index) * nvals, -// Tj + Tp [range [tid]], sizeof (GrB_Index) * count [tid]) ; -// #else - - // memmove is safe: src/dest can overlap, but the copy will not go - // outside of the array, and Tj is never NULL at this point - // (GRB_TRY on the GxB_Matrix_unpack_CSR above would catch that - // condition). So memmove_s isn't necessary. memmove (Tj + nvals, Tj + Tp [range [tid]], sizeof (GrB_Index) * count [tid]) ; - -// #endif - nvals += count [tid] ; count [tid] = nvals - count [tid] ; } -// printf ("did compact T\n") ; fflush (stdout) ; fflush (stderr) ; // Compact empty space out of Tp #pragma omp parallel for num_threads(nthreads) schedule(static) @@ -640,8 +621,6 @@ int LG_CC_FastSV6 // SuiteSparse:GraphBLAS method, with GxB extensions } } -// printf ("did 2nd compact T\n") ; fflush (stdout) ; fflush (stderr) ; - // finalize T Tp [n] = nvals ; @@ -649,14 +628,10 @@ int LG_CC_FastSV6 // SuiteSparse:GraphBLAS method, with GxB extensions GRB_TRY (GxB_Matrix_pack_CSR (T, &Tp, &Tj, &Tx, Tp_size, Tj_size, Tx_size, T_iso, /* T is now jumbled */ true, NULL)) ; -// printf ("did pack T\n") ; fflush (stdout) ; fflush (stderr) ; - // pack A (unchanged since last unpack); this is the original G->A. GRB_TRY (GxB_Matrix_pack_CSR (A, &Ap, &Aj, &Ax, Ap_size, Aj_size, Ax_size, A_iso, A_jumbled, NULL)) ; -// printf ("did pack A\n") ; fflush (stdout) ; fflush (stderr) ; - // ]. The unpack/pack of A into Ap, Aj, Ax will not be needed, and G->A // will become truly a read-only matrix.