diff --git a/LAGraph/experimental/algorithm/LG_CC_FastSV5.c b/LAGraph/experimental/algorithm/LG_CC_FastSV5.c index 2da6f5872..b8bd73b7c 100644 --- a/LAGraph/experimental/algorithm/LG_CC_FastSV5.c +++ b/LAGraph/experimental/algorithm/LG_CC_FastSV5.c @@ -674,8 +674,17 @@ int LG_CC_FastSV5 // SuiteSparse:GraphBLAS method, with GxB extensions GrB_Index offset = 0 ; for (tid = 0 ; tid < nthreads ; tid++) { - memcpy (Tj + offset, Tj + Tp [range [tid]], - sizeof (GrB_Index) * count [tid]) ; + +// memcpy (Tj + offset, Tj + Tp [range [tid]], +// sizeof (GrB_Index) * count [tid]) ; + + GrB_Index *Tj_dest = Tj + offset ; + GrB_Index *Tj_src = Tj + Tp [range [tid]] ; + for (int64_t k = 0 ; k < count [tid] ; k++) + { + Tj_dest [k] = Tj_src [k] ; + } + offset += count [tid] ; count [tid] = offset - count [tid] ; } diff --git a/LAGraph/src/algorithm/LG_CC_FastSV6.c b/LAGraph/src/algorithm/LG_CC_FastSV6.c index bdee26b8e..a4b2a5bf0 100644 --- a/LAGraph/src/algorithm/LG_CC_FastSV6.c +++ b/LAGraph/src/algorithm/LG_CC_FastSV6.c @@ -604,8 +604,16 @@ printf ("did prune T\n") ; fflush (stdout) ; fflush (stderr) ; nvals = 0 ; for (tid = 0 ; tid < nthreads ; tid++) { - memcpy (Tj + nvals, Tj + Tp [range [tid]], - sizeof (GrB_Index) * count [tid]) ; + +// memcpy (Tj + nvals, Tj + Tp [range [tid]], +// sizeof (GrB_Index) * count [tid]) ; + GrB_Index *Tj_dest = Tj + nvals ; + GrB_Index *Tj_src = Tj + Tp [range [tid]] ; + for (int64_t k = 0 ; k < count [tid] ; k++) + { + Tj_dest [k] = Tj_src [k] ; + } + nvals += count [tid] ; count [tid] = nvals - count [tid] ; }