Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.2 branch #244

Merged
merged 2 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions experimental/test/LG_check_coarsen.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ int LG_check_coarsen
// also calculate n_new
for (GrB_Index i = 0 ; i < n ; i++) {
uint64_t par ;
LG_ASSERT (GrB_Vector_extractElement (&par, parent, i) == GrB_SUCCESS, GrB_INVALID_VALUE) ;
GrB_Info status = GrB_Vector_extractElement (&par, parent, i) ;
LG_ASSERT (status == GrB_SUCCESS, GrB_INVALID_VALUE) ;
LG_ASSERT (par >= 0 && par < n, GrB_INVALID_INDEX) ;

uint64_t grandpa ;
Expand All @@ -71,7 +72,8 @@ int LG_check_coarsen
if (par != i && (!preserve_mapping)) {
// make sure that there is no new label for nodes that get discarded
uint64_t dummy ;
LG_ASSERT (GrB_Vector_extractElement (&dummy, newlabel, i) == GrB_NO_VALUE, GrB_INVALID_VALUE) ;
status = GrB_Vector_extractElement (&dummy, newlabel, i) ;
LG_ASSERT (status == GrB_NO_VALUE, GrB_INVALID_VALUE) ;
// also update new number of nodes
n_new-- ;
}
Expand Down Expand Up @@ -105,10 +107,12 @@ int LG_check_coarsen
// check inv_newlabel
for (GrB_Index i = 0 ; i < n_new ; i++) {
uint64_t old_label ;
LG_ASSERT (GrB_Vector_extractElement (&old_label, inv_newlabel, i) == GrB_SUCCESS, GrB_INVALID_VALUE) ;
GrB_Info status= GrB_Vector_extractElement (&old_label, inv_newlabel, i) ;
LG_ASSERT (status == GrB_SUCCESS, GrB_INVALID_VALUE) ;

uint64_t new_label ; // entry in newlabel, check that it matches i
LG_ASSERT (GrB_Vector_extractElement (&new_label, newlabel, old_label) == GrB_SUCCESS, GrB_INVALID_VALUE) ;
status = GrB_Vector_extractElement (&new_label, newlabel, old_label) ;
LG_ASSERT (status == GrB_SUCCESS, GrB_INVALID_VALUE) ;

LG_ASSERT (new_label == i, GrB_INVALID_VALUE) ;
}
Expand Down Expand Up @@ -181,4 +185,4 @@ int LG_check_coarsen
LG_TRY (LAGraph_Free ((void**)(&vals), msg)) ;

return (GrB_SUCCESS) ;
}
}
15 changes: 15 additions & 0 deletions include/LAGraphX.h
Original file line number Diff line number Diff line change
Expand Up @@ -1109,4 +1109,19 @@ int LAGraph_Hdip_Fiedler // compute the Hdip_Fiedler
char *msg
);

//------------------------------------------------------------------------------
// for GPU development
//------------------------------------------------------------------------------

int LAGr_TriangleCount_GPU
(
// output:
uint64_t *ntriangles,
// input:
const LAGraph_Graph G,
LAGr_TriangleCount_Method *method,
LAGr_TriangleCount_Presort *presort,
char *msg
) ;

#endif
Loading
Loading