diff --git a/cpp/include/cugraph_c/graph.h b/cpp/include/cugraph_c/graph.h index d812b503778..c5ce9c9fbeb 100644 --- a/cpp/include/cugraph_c/graph.h +++ b/cpp/include/cugraph_c/graph.h @@ -35,48 +35,6 @@ typedef struct { bool_t is_multigraph; } cugraph_graph_properties_t; -/** - * @brief Construct an SG graph - * - * @deprecated This API will be deleted, use cugraph_graph_create_sg instead - * - * @param [in] handle Handle for accessing resources - * @param [in] properties Properties of the constructed graph - * @param [in] src Device array containing the source vertex ids. - * @param [in] dst Device array containing the destination vertex ids - * @param [in] weights Device array containing the edge weights. Note that an unweighted - * graph can be created by passing weights == NULL. - * @param [in] edge_ids Device array containing the edge ids for each edge. Optional - argument that can be NULL if edge ids are not used. - * @param [in] edge_type_ids Device array containing the edge types for each edge. Optional - argument that can be NULL if edge types are not used. - * @param [in] store_transposed If true create the graph initially in transposed format - * @param [in] renumber If true, renumber vertices to make an efficient data structure. - * If false, do not renumber. Renumbering enables some significant optimizations within - * the graph primitives library, so it is strongly encouraged. Renumbering is required if - * the vertices are not sequential integer values from 0 to num_vertices. - * @param [in] do_expensive_check If true, do expensive checks to validate the input data - * is consistent with software assumptions. If false bypass these checks. - * @param [out] graph A pointer to the graph object - * @param [out] error Pointer to an error object storing details of any error. Will - * be populated if error code is not CUGRAPH_SUCCESS - * - * @return error code - */ -cugraph_error_code_t cugraph_sg_graph_create( - const cugraph_resource_handle_t* handle, - const cugraph_graph_properties_t* properties, - const cugraph_type_erased_device_array_view_t* src, - const cugraph_type_erased_device_array_view_t* dst, - const cugraph_type_erased_device_array_view_t* weights, - const cugraph_type_erased_device_array_view_t* edge_ids, - const cugraph_type_erased_device_array_view_t* edge_type_ids, - bool_t store_transposed, - bool_t renumber, - bool_t do_expensive_check, - cugraph_graph_t** graph, - cugraph_error_t** error); - /** * @brief Construct an SG graph * @@ -133,51 +91,6 @@ cugraph_error_code_t cugraph_graph_create_sg( cugraph_graph_t** graph, cugraph_error_t** error); -/** - * @brief Construct an SG graph from a CSR input - * - * @deprecated This API will be deleted, use cugraph_graph_create_sg_from_csr instead - * - * @param [in] handle Handle for accessing resources - * @param [in] properties Properties of the constructed graph - * @param [in] offsets Device array containing the CSR offsets array - * @param [in] indices Device array containing the destination vertex ids - * @param [in] weights Device array containing the edge weights. Note that an unweighted - * graph can be created by passing weights == NULL. - * @param [in] edge_ids Device array containing the edge ids for each edge. Optional - argument that can be NULL if edge ids are not used. - * @param [in] edge_type_ids Device array containing the edge types for each edge. Optional - argument that can be NULL if edge types are not used. - * @param [in] store_transposed If true create the graph initially in transposed format - * @param [in] renumber If true, renumber vertices to make an efficient data structure. - * If false, do not renumber. Renumbering enables some significant optimizations within - * the graph primitives library, so it is strongly encouraged. Renumbering is required if - * the vertices are not sequential integer values from 0 to num_vertices. - * @param [in] symmetrize If true, symmetrize the edgelist. The symmetrization of edges - * with edge_ids and/or edge_type_ids is currently not supported. - * @param [in] do_expensive_check If true, do expensive checks to validate the input data - * is consistent with software assumptions. If false bypass these checks. - * @param [out] graph A pointer to the graph object - * @param [out] error Pointer to an error object storing details of any error. Will - * be populated if error code is not CUGRAPH_SUCCESS - * - * @return error code - */ -cugraph_error_code_t cugraph_sg_graph_create_from_csr( - const cugraph_resource_handle_t* handle, - const cugraph_graph_properties_t* properties, - const cugraph_type_erased_device_array_view_t* offsets, - const cugraph_type_erased_device_array_view_t* indices, - const cugraph_type_erased_device_array_view_t* weights, - const cugraph_type_erased_device_array_view_t* edge_ids, - const cugraph_type_erased_device_array_view_t* edge_type_ids, - bool_t store_transposed, - bool_t renumber, - bool_t symmetrize, - bool_t do_expensive_check, - cugraph_graph_t** graph, - cugraph_error_t** error); - /** * @brief Construct an SG graph from a CSR input * @@ -221,47 +134,6 @@ cugraph_error_code_t cugraph_graph_create_sg_from_csr( cugraph_graph_t** graph, cugraph_error_t** error); -/** - * @brief Construct an MG graph - * - * @deprecated This API will be deleted, use cugraph_graph_create_mg instead - * - * @param [in] handle Handle for accessing resources - * @param [in] properties Properties of the constructed graph - * @param [in] src Device array containing the source vertex ids - * @param [in] dst Device array containing the destination vertex ids - * @param [in] weights Device array containing the edge weights. Note that an unweighted - * graph can be created by passing weights == NULL. If a weighted - * graph is to be created, the weights device array should be created - * on each rank, but the pointer can be NULL and the size 0 - * if there are no inputs provided by this rank - * @param [in] edge_ids Device array containing the edge ids for each edge. Optional - argument that can be NULL if edge ids are not used. - * @param [in] edge_type_ids Device array containing the edge types for each edge. Optional - argument that can be NULL if edge types are not used. - * @param [in] store_transposed If true create the graph initially in transposed format - * @param [in] num_edges Number of edges - * @param [in] do_expensive_check If true, do expensive checks to validate the input data - * is consistent with software assumptions. If false bypass these checks. - * @param [out] graph A pointer to the graph object - * @param [out] error Pointer to an error object storing details of any error. Will - * be populated if error code is not CUGRAPH_SUCCESS - * @return error code - */ -cugraph_error_code_t cugraph_mg_graph_create( - const cugraph_resource_handle_t* handle, - const cugraph_graph_properties_t* properties, - const cugraph_type_erased_device_array_view_t* src, - const cugraph_type_erased_device_array_view_t* dst, - const cugraph_type_erased_device_array_view_t* weights, - const cugraph_type_erased_device_array_view_t* edge_ids, - const cugraph_type_erased_device_array_view_t* edge_type_ids, - bool_t store_transposed, - size_t num_edges, - bool_t do_expensive_check, - cugraph_graph_t** graph, - cugraph_error_t** error); - /** * @brief Construct an MG graph * @@ -332,24 +204,6 @@ cugraph_error_code_t cugraph_graph_create_mg( */ void cugraph_graph_free(cugraph_graph_t* graph); -/** - * @brief Destroy an SG graph - * - * @deprecated This API will be deleted, use cugraph_graph_free instead - * - * @param [in] graph A pointer to the graph object to destroy - */ -void cugraph_sg_graph_free(cugraph_graph_t* graph); - -/** - * @brief Destroy an MG graph - * - * @deprecated This API will be deleted, use cugraph_graph_free instead - * - * @param [in] graph A pointer to the graph object to destroy - */ -void cugraph_mg_graph_free(cugraph_graph_t* graph); - /** * @brief Create a data mask * diff --git a/cpp/src/c_api/graph_mg.cpp b/cpp/src/c_api/graph_mg.cpp index fc8014a5dd8..2057448dbe5 100644 --- a/cpp/src/c_api/graph_mg.cpp +++ b/cpp/src/c_api/graph_mg.cpp @@ -536,40 +536,3 @@ extern "C" cugraph_error_code_t cugraph_graph_create_mg( return CUGRAPH_SUCCESS; } - -extern "C" cugraph_error_code_t cugraph_mg_graph_create( - cugraph_resource_handle_t const* handle, - cugraph_graph_properties_t const* properties, - cugraph_type_erased_device_array_view_t const* src, - cugraph_type_erased_device_array_view_t const* dst, - cugraph_type_erased_device_array_view_t const* weights, - cugraph_type_erased_device_array_view_t const* edge_ids, - cugraph_type_erased_device_array_view_t const* edge_type_ids, - bool_t store_transposed, - size_t num_edges, - bool_t do_expensive_check, - cugraph_graph_t** graph, - cugraph_error_t** error) -{ - return cugraph_graph_create_mg(handle, - properties, - NULL, - &src, - &dst, - (weights == nullptr) ? nullptr : &weights, - (edge_ids == nullptr) ? nullptr : &edge_ids, - (edge_type_ids == nullptr) ? nullptr : &edge_type_ids, - store_transposed, - 1, - FALSE, - FALSE, - FALSE, - do_expensive_check, - graph, - error); -} - -extern "C" void cugraph_mg_graph_free(cugraph_graph_t* ptr_graph) -{ - if (ptr_graph != NULL) { cugraph_graph_free(ptr_graph); } -} diff --git a/cpp/src/c_api/graph_sg.cpp b/cpp/src/c_api/graph_sg.cpp index f6ea8e4142e..ea598b902ae 100644 --- a/cpp/src/c_api/graph_sg.cpp +++ b/cpp/src/c_api/graph_sg.cpp @@ -680,38 +680,6 @@ extern "C" cugraph_error_code_t cugraph_graph_create_sg( return CUGRAPH_SUCCESS; } -extern "C" cugraph_error_code_t cugraph_sg_graph_create( - const cugraph_resource_handle_t* handle, - const cugraph_graph_properties_t* properties, - const cugraph_type_erased_device_array_view_t* src, - const cugraph_type_erased_device_array_view_t* dst, - const cugraph_type_erased_device_array_view_t* weights, - const cugraph_type_erased_device_array_view_t* edge_ids, - const cugraph_type_erased_device_array_view_t* edge_type_ids, - bool_t store_transposed, - bool_t renumber, - bool_t do_expensive_check, - cugraph_graph_t** graph, - cugraph_error_t** error) -{ - return cugraph_graph_create_sg(handle, - properties, - NULL, - src, - dst, - weights, - edge_ids, - edge_type_ids, - store_transposed, - renumber, - FALSE, - FALSE, - FALSE, - do_expensive_check, - graph, - error); -} - cugraph_error_code_t cugraph_graph_create_sg_from_csr( const cugraph_resource_handle_t* handle, const cugraph_graph_properties_t* properties, @@ -819,36 +787,6 @@ cugraph_error_code_t cugraph_graph_create_sg_from_csr( return CUGRAPH_SUCCESS; } -cugraph_error_code_t cugraph_sg_graph_create_from_csr( - const cugraph_resource_handle_t* handle, - const cugraph_graph_properties_t* properties, - const cugraph_type_erased_device_array_view_t* offsets, - const cugraph_type_erased_device_array_view_t* indices, - const cugraph_type_erased_device_array_view_t* weights, - const cugraph_type_erased_device_array_view_t* edge_ids, - const cugraph_type_erased_device_array_view_t* edge_type_ids, - bool_t store_transposed, - bool_t renumber, - bool_t symmetrize, - bool_t do_expensive_check, - cugraph_graph_t** graph, - cugraph_error_t** error) -{ - return cugraph_graph_create_sg_from_csr(handle, - properties, - offsets, - indices, - weights, - edge_ids, - edge_type_ids, - store_transposed, - renumber, - symmetrize, - do_expensive_check, - graph, - error); -} - extern "C" void cugraph_graph_free(cugraph_graph_t* ptr_graph) { if (ptr_graph != NULL) { @@ -871,5 +809,3 @@ extern "C" void cugraph_graph_free(cugraph_graph_t* ptr_graph) delete internal_pointer; } } - -extern "C" void cugraph_sg_graph_free(cugraph_graph_t* ptr_graph) { cugraph_graph_free(ptr_graph); } diff --git a/cpp/tests/c_api/betweenness_centrality_test.c b/cpp/tests/c_api/betweenness_centrality_test.c index cc37a10798e..7fec78eaffd 100644 --- a/cpp/tests/c_api/betweenness_centrality_test.c +++ b/cpp/tests/c_api/betweenness_centrality_test.c @@ -122,7 +122,7 @@ int generic_betweenness_centrality_test(vertex_t* h_src, cugraph_type_erased_device_array_view_free(seeds_view); cugraph_type_erased_device_array_free(seeds); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/bfs_test.c b/cpp/tests/c_api/bfs_test.c index 8feb426a853..b61051d8f90 100644 --- a/cpp/tests/c_api/bfs_test.c +++ b/cpp/tests/c_api/bfs_test.c @@ -109,7 +109,7 @@ int generic_bfs_test(vertex_t* h_src, cugraph_type_erased_device_array_free(p_sources); cugraph_paths_result_free(p_result); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(p_handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/biased_neighbor_sample_test.c b/cpp/tests/c_api/biased_neighbor_sample_test.c index fe80514c825..0ccb236f7fc 100644 --- a/cpp/tests/c_api/biased_neighbor_sample_test.c +++ b/cpp/tests/c_api/biased_neighbor_sample_test.c @@ -461,7 +461,7 @@ int generic_biased_neighbor_sample_test(const cugraph_resource_handle_t* handle, cugraph_sample_result_free(result); #endif - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; } @@ -680,7 +680,7 @@ int test_biased_neighbor_sample_with_labels(const cugraph_resource_handle_t* han cugraph_sampling_options_free(sampling_options); #endif - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); } diff --git a/cpp/tests/c_api/core_number_test.c b/cpp/tests/c_api/core_number_test.c index ca0bbf7134f..c9c85694db5 100644 --- a/cpp/tests/c_api/core_number_test.c +++ b/cpp/tests/c_api/core_number_test.c @@ -81,7 +81,7 @@ int generic_core_number_test(vertex_t* h_src, } cugraph_core_result_free(p_result); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(p_handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/create_graph_test.c b/cpp/tests/c_api/create_graph_test.c index 104787e4c7b..a07f31fce57 100644 --- a/cpp/tests/c_api/create_graph_test.c +++ b/cpp/tests/c_api/create_graph_test.c @@ -204,7 +204,7 @@ int test_create_sg_graph_csr() handle, wgt_view, (byte_t*)h_wgt, &ret_error); TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "wgt copy_from_host failed."); - ret_code = cugraph_sg_graph_create_from_csr(handle, + ret_code = cugraph_graph_create_sg_from_csr(handle, &properties, offsets_view, indices_view, @@ -669,7 +669,7 @@ int test_create_sg_graph_csr_with_isolated() handle, wgt_view, (byte_t*)h_wgt, &ret_error); TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "wgt copy_from_host failed."); - ret_code = cugraph_sg_graph_create_from_csr(handle, + ret_code = cugraph_graph_create_sg_from_csr(handle, &properties, offsets_view, indices_view, diff --git a/cpp/tests/c_api/ecg_test.c b/cpp/tests/c_api/ecg_test.c index 4d4dd64572f..4f4c29b97b9 100644 --- a/cpp/tests/c_api/ecg_test.c +++ b/cpp/tests/c_api/ecg_test.c @@ -121,7 +121,7 @@ int generic_ecg_test(vertex_t* h_src, cugraph_hierarchical_clustering_result_free(result); } - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_free_resource_handle(handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/edge_betweenness_centrality_test.c b/cpp/tests/c_api/edge_betweenness_centrality_test.c index 95b875b21af..8b9167778d9 100644 --- a/cpp/tests/c_api/edge_betweenness_centrality_test.c +++ b/cpp/tests/c_api/edge_betweenness_centrality_test.c @@ -128,7 +128,7 @@ int generic_edge_betweenness_centrality_test(vertex_t* h_src, } cugraph_edge_centrality_result_free(result); - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_free_resource_handle(handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/egonet_test.c b/cpp/tests/c_api/egonet_test.c index b4d27935ce1..1bde50afbad 100644 --- a/cpp/tests/c_api/egonet_test.c +++ b/cpp/tests/c_api/egonet_test.c @@ -165,7 +165,7 @@ int generic_egonet_test(vertex_t* h_src, cugraph_induced_subgraph_result_free(result); } - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_free_resource_handle(resource_handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/eigenvector_centrality_test.c b/cpp/tests/c_api/eigenvector_centrality_test.c index ded505aeedc..d42745917d2 100644 --- a/cpp/tests/c_api/eigenvector_centrality_test.c +++ b/cpp/tests/c_api/eigenvector_centrality_test.c @@ -83,7 +83,7 @@ int generic_eigenvector_centrality_test(vertex_t* h_src, } cugraph_centrality_result_free(p_result); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(p_handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/extract_paths_test.c b/cpp/tests/c_api/extract_paths_test.c index 5b87c3151c7..46e23112742 100644 --- a/cpp/tests/c_api/extract_paths_test.c +++ b/cpp/tests/c_api/extract_paths_test.c @@ -124,7 +124,7 @@ int generic_bfs_test_with_extract_paths(vertex_t* h_src, cugraph_type_erased_device_array_free(p_destinations); cugraph_extract_paths_result_free(p_extract_paths_result); cugraph_paths_result_free(p_paths_result); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(p_handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/hits_test.c b/cpp/tests/c_api/hits_test.c index a9dbbb4f224..db63b0366b5 100644 --- a/cpp/tests/c_api/hits_test.c +++ b/cpp/tests/c_api/hits_test.c @@ -153,7 +153,7 @@ int generic_hits_test(vertex_t* h_src, } cugraph_hits_result_free(p_result); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(p_handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/k_core_test.c b/cpp/tests/c_api/k_core_test.c index 81c1973d051..c60001fc8e7 100644 --- a/cpp/tests/c_api/k_core_test.c +++ b/cpp/tests/c_api/k_core_test.c @@ -142,7 +142,7 @@ int generic_k_core_test(vertex_t* h_src, cugraph_k_core_result_free(k_core_result); cugraph_core_result_free(core_result); - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_free_resource_handle(resource_handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/k_truss_test.c b/cpp/tests/c_api/k_truss_test.c index 9aa90f66480..1ebacfead9f 100644 --- a/cpp/tests/c_api/k_truss_test.c +++ b/cpp/tests/c_api/k_truss_test.c @@ -150,7 +150,7 @@ int generic_k_truss_test(vertex_t* h_src, cugraph_induced_subgraph_result_free(result); } - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_free_resource_handle(resource_handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/katz_test.c b/cpp/tests/c_api/katz_test.c index 4ee61b2b806..33bb6a5a9af 100644 --- a/cpp/tests/c_api/katz_test.c +++ b/cpp/tests/c_api/katz_test.c @@ -93,7 +93,7 @@ int generic_katz_test(vertex_t* h_src, } cugraph_centrality_result_free(p_result); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(p_handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/legacy_spectral_test.c b/cpp/tests/c_api/legacy_spectral_test.c index ecb61e47ae6..ad695dd0883 100644 --- a/cpp/tests/c_api/legacy_spectral_test.c +++ b/cpp/tests/c_api/legacy_spectral_test.c @@ -141,7 +141,7 @@ int generic_spectral_test(vertex_t* h_src, cugraph_clustering_result_free(result); } - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_free_resource_handle(handle); cugraph_error_free(ret_error); @@ -272,7 +272,7 @@ int generic_balanced_cut_test(vertex_t* h_src, cugraph_clustering_result_free(result); } - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_free_resource_handle(handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/leiden_test.c b/cpp/tests/c_api/leiden_test.c index df206ebd1ed..57e6e921cce 100644 --- a/cpp/tests/c_api/leiden_test.c +++ b/cpp/tests/c_api/leiden_test.c @@ -114,7 +114,7 @@ int generic_leiden_test(vertex_t* h_src, cugraph_hierarchical_clustering_result_free(p_result); } - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(p_handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/louvain_test.c b/cpp/tests/c_api/louvain_test.c index 41d777545b2..c083dbaa676 100644 --- a/cpp/tests/c_api/louvain_test.c +++ b/cpp/tests/c_api/louvain_test.c @@ -114,7 +114,7 @@ int generic_louvain_test(vertex_t* h_src, cugraph_hierarchical_clustering_result_free(p_result); } - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(p_handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/mg_betweenness_centrality_test.c b/cpp/tests/c_api/mg_betweenness_centrality_test.c index 6a3cb69dd57..6f45792200e 100644 --- a/cpp/tests/c_api/mg_betweenness_centrality_test.c +++ b/cpp/tests/c_api/mg_betweenness_centrality_test.c @@ -118,7 +118,7 @@ int generic_betweenness_centrality_test(const cugraph_resource_handle_t* handle, cugraph_type_erased_device_array_view_free(seeds_view); cugraph_type_erased_device_array_free(seeds); - cugraph_mg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_bfs_test.c b/cpp/tests/c_api/mg_bfs_test.c index 026d8f0796c..db24a180774 100644 --- a/cpp/tests/c_api/mg_bfs_test.c +++ b/cpp/tests/c_api/mg_bfs_test.c @@ -106,7 +106,7 @@ int generic_bfs_test(const cugraph_resource_handle_t* p_handle, } cugraph_paths_result_free(paths_result); - cugraph_mg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_biased_neighbor_sample_test.c b/cpp/tests/c_api/mg_biased_neighbor_sample_test.c index ce96fc6f5f7..ead86f22ad3 100644 --- a/cpp/tests/c_api/mg_biased_neighbor_sample_test.c +++ b/cpp/tests/c_api/mg_biased_neighbor_sample_test.c @@ -432,7 +432,7 @@ int generic_biased_neighbor_sample_test(const cugraph_resource_handle_t* handle, cugraph_sample_result_free(result); #endif - cugraph_mg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; } @@ -678,7 +678,7 @@ int test_biased_neighbor_from_alex(const cugraph_resource_handle_t* handle) cugraph_sample_result_free(result); cugraph_type_erased_host_array_view_free(h_fan_out_view); - cugraph_mg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); cugraph_sampling_options_free(sampling_options); @@ -941,7 +941,7 @@ int test_biased_neighbor_sample_alex_bug(const cugraph_resource_handle_t* handle cugraph_sample_result_free(result); #endif - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); } @@ -1221,7 +1221,7 @@ int test_biased_neighbor_sample_sort_by_hop(const cugraph_resource_handle_t* han cugraph_sample_result_free(result); #endif - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); } diff --git a/cpp/tests/c_api/mg_core_number_test.c b/cpp/tests/c_api/mg_core_number_test.c index 68c69a83c4f..a588c1997b1 100644 --- a/cpp/tests/c_api/mg_core_number_test.c +++ b/cpp/tests/c_api/mg_core_number_test.c @@ -79,7 +79,7 @@ int generic_core_number_test(const cugraph_resource_handle_t* p_handle, } cugraph_core_result_free(p_result); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_ecg_test.c b/cpp/tests/c_api/mg_ecg_test.c index b14ebda2959..626cb6025f5 100644 --- a/cpp/tests/c_api/mg_ecg_test.c +++ b/cpp/tests/c_api/mg_ecg_test.c @@ -100,7 +100,7 @@ int generic_ecg_test(const cugraph_resource_handle_t* handle, cugraph_hierarchical_clustering_result_free(result); } - cugraph_mg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_edge_betweenness_centrality_test.c b/cpp/tests/c_api/mg_edge_betweenness_centrality_test.c index 319d4fb789b..cc3cc4c94c5 100644 --- a/cpp/tests/c_api/mg_edge_betweenness_centrality_test.c +++ b/cpp/tests/c_api/mg_edge_betweenness_centrality_test.c @@ -130,7 +130,7 @@ int generic_edge_betweenness_centrality_test(const cugraph_resource_handle_t* ha } cugraph_edge_centrality_result_free(result); - cugraph_mg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_egonet_test.c b/cpp/tests/c_api/mg_egonet_test.c index 6a308102ebe..41328f1f908 100644 --- a/cpp/tests/c_api/mg_egonet_test.c +++ b/cpp/tests/c_api/mg_egonet_test.c @@ -161,7 +161,7 @@ int generic_egonet_test(const cugraph_resource_handle_t* resource_handle, cugraph_induced_subgraph_result_free(result); } - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_eigenvector_centrality_test.c b/cpp/tests/c_api/mg_eigenvector_centrality_test.c index 37bf2afca3c..cdf2387fdb3 100644 --- a/cpp/tests/c_api/mg_eigenvector_centrality_test.c +++ b/cpp/tests/c_api/mg_eigenvector_centrality_test.c @@ -84,7 +84,7 @@ int generic_eigenvector_centrality_test(const cugraph_resource_handle_t* handle, } cugraph_centrality_result_free(p_result); - cugraph_mg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_hits_test.c b/cpp/tests/c_api/mg_hits_test.c index 3e10bfc05d6..201718417a7 100644 --- a/cpp/tests/c_api/mg_hits_test.c +++ b/cpp/tests/c_api/mg_hits_test.c @@ -154,7 +154,7 @@ int generic_hits_test(const cugraph_resource_handle_t* p_handle, } cugraph_hits_result_free(p_result); - cugraph_mg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_induced_subgraph_test.c b/cpp/tests/c_api/mg_induced_subgraph_test.c index 018b308688e..39eefb9258c 100644 --- a/cpp/tests/c_api/mg_induced_subgraph_test.c +++ b/cpp/tests/c_api/mg_induced_subgraph_test.c @@ -153,7 +153,7 @@ int generic_induced_subgraph_test(const cugraph_resource_handle_t* handle, cugraph_type_erased_device_array_free(subgraph_offsets); cugraph_type_erased_device_array_free(subgraph_vertices); cugraph_induced_subgraph_result_free(result); - cugraph_mg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; } diff --git a/cpp/tests/c_api/mg_k_core_test.c b/cpp/tests/c_api/mg_k_core_test.c index 1218475481b..45aa1283679 100644 --- a/cpp/tests/c_api/mg_k_core_test.c +++ b/cpp/tests/c_api/mg_k_core_test.c @@ -110,7 +110,7 @@ int generic_k_core_test(const cugraph_resource_handle_t* resource_handle, cugraph_k_core_result_free(k_core_result); cugraph_core_result_free(core_result); - cugraph_mg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_k_truss_test.c b/cpp/tests/c_api/mg_k_truss_test.c index e406eb330a7..ed385c6ca76 100644 --- a/cpp/tests/c_api/mg_k_truss_test.c +++ b/cpp/tests/c_api/mg_k_truss_test.c @@ -16,6 +16,7 @@ #include "mg_test_utils.h" /* RUN_TEST */ +#include #include #include @@ -99,7 +100,7 @@ int generic_k_truss_test(const cugraph_resource_handle_t* handle, } cugraph_induced_subgraph_result_free(result); - cugraph_mg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; } diff --git a/cpp/tests/c_api/mg_katz_test.c b/cpp/tests/c_api/mg_katz_test.c index 2efb5d50539..6d000c335da 100644 --- a/cpp/tests/c_api/mg_katz_test.c +++ b/cpp/tests/c_api/mg_katz_test.c @@ -94,7 +94,7 @@ int generic_katz_test(const cugraph_resource_handle_t* handle, } cugraph_centrality_result_free(p_result); - cugraph_mg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_leiden_test.c b/cpp/tests/c_api/mg_leiden_test.c index 72719b4d515..231c021c467 100644 --- a/cpp/tests/c_api/mg_leiden_test.c +++ b/cpp/tests/c_api/mg_leiden_test.c @@ -105,7 +105,7 @@ int generic_leiden_test(const cugraph_resource_handle_t* p_handle, cugraph_hierarchical_clustering_result_free(p_result); } - cugraph_mg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_lookup_src_dst_test.c b/cpp/tests/c_api/mg_lookup_src_dst_test.c index 0cffffeb425..8c85d245acc 100644 --- a/cpp/tests/c_api/mg_lookup_src_dst_test.c +++ b/cpp/tests/c_api/mg_lookup_src_dst_test.c @@ -206,7 +206,7 @@ int generic_lookup_src_dst_test(const cugraph_resource_handle_t* handle, cugraph_lookup_result_free(result); - cugraph_mg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_louvain_test.c b/cpp/tests/c_api/mg_louvain_test.c index 858783614e5..54331fd8c66 100644 --- a/cpp/tests/c_api/mg_louvain_test.c +++ b/cpp/tests/c_api/mg_louvain_test.c @@ -96,7 +96,7 @@ int generic_louvain_test(const cugraph_resource_handle_t* p_handle, cugraph_hierarchical_clustering_result_free(p_result); } - cugraph_mg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_negative_sampling_test.c b/cpp/tests/c_api/mg_negative_sampling_test.c index 3289206d8db..274bad35dfb 100644 --- a/cpp/tests/c_api/mg_negative_sampling_test.c +++ b/cpp/tests/c_api/mg_negative_sampling_test.c @@ -203,7 +203,7 @@ int generic_negative_sampling_test(const cugraph_resource_handle_t* handle, cugraph_type_erased_device_array_free(d_src_bias); cugraph_type_erased_device_array_free(d_dst_bias); cugraph_coo_free(result); - cugraph_mg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; } diff --git a/cpp/tests/c_api/mg_pagerank_test.c b/cpp/tests/c_api/mg_pagerank_test.c index 8bd02e70181..4616db3f704 100644 --- a/cpp/tests/c_api/mg_pagerank_test.c +++ b/cpp/tests/c_api/mg_pagerank_test.c @@ -94,7 +94,7 @@ int generic_pagerank_test(const cugraph_resource_handle_t* handle, } cugraph_centrality_result_free(p_result); - cugraph_mg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_error_free(ret_error); return test_ret_value; @@ -169,7 +169,7 @@ int generic_pagerank_nonconverging_test(const cugraph_resource_handle_t* handle, } cugraph_centrality_result_free(p_result); - cugraph_mg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_error_free(ret_error); return test_ret_value; @@ -278,7 +278,7 @@ int generic_personalized_pagerank_test(const cugraph_resource_handle_t* handle, } cugraph_centrality_result_free(p_result); - cugraph_mg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_error_free(ret_error); return test_ret_value; @@ -387,7 +387,7 @@ int generic_personalized_pagerank_nonconverging_test(const cugraph_resource_hand } cugraph_centrality_result_free(p_result); - cugraph_mg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_random_walks_test.c b/cpp/tests/c_api/mg_random_walks_test.c index 1c3e4ac0d38..13252e0f1dc 100644 --- a/cpp/tests/c_api/mg_random_walks_test.c +++ b/cpp/tests/c_api/mg_random_walks_test.c @@ -130,7 +130,7 @@ int generic_uniform_random_walks_test(const cugraph_resource_handle_t* handle, } cugraph_random_walk_result_free(result); - cugraph_mg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; @@ -232,7 +232,7 @@ int generic_biased_random_walks_test(const cugraph_resource_handle_t* handle, cugraph_random_walk_result_free(result); #endif - cugraph_mg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; @@ -338,7 +338,7 @@ int generic_node2vec_random_walks_test(const cugraph_resource_handle_t* handle, cugraph_random_walk_result_free(result); #endif - cugraph_mg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_similarity_test.c b/cpp/tests/c_api/mg_similarity_test.c index 486ca34aaca..637f66e40ed 100644 --- a/cpp/tests/c_api/mg_similarity_test.c +++ b/cpp/tests/c_api/mg_similarity_test.c @@ -189,7 +189,7 @@ int generic_similarity_test(const cugraph_resource_handle_t* handle, if (result != NULL) cugraph_similarity_result_free(result); if (vertex_pairs != NULL) cugraph_vertex_pairs_free(vertex_pairs); - cugraph_mg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_sssp_test.c b/cpp/tests/c_api/mg_sssp_test.c index 1158885aed2..3103b7331f4 100644 --- a/cpp/tests/c_api/mg_sssp_test.c +++ b/cpp/tests/c_api/mg_sssp_test.c @@ -94,7 +94,7 @@ int generic_sssp_test(const cugraph_resource_handle_t* p_handle, cugraph_type_erased_device_array_view_free(distances); cugraph_type_erased_device_array_view_free(predecessors); cugraph_paths_result_free(p_result); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_error_free(ret_error); return test_ret_value; @@ -167,7 +167,7 @@ int generic_sssp_test_double(const cugraph_resource_handle_t* p_handle, cugraph_type_erased_device_array_view_free(distances); cugraph_type_erased_device_array_view_free(predecessors); cugraph_paths_result_free(p_result); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_strongly_connected_components_test.c b/cpp/tests/c_api/mg_strongly_connected_components_test.c index 38b2691c784..95777cc86fe 100644 --- a/cpp/tests/c_api/mg_strongly_connected_components_test.c +++ b/cpp/tests/c_api/mg_strongly_connected_components_test.c @@ -100,7 +100,7 @@ int generic_scc_test(const cugraph_resource_handle_t* handle, cugraph_labeling_result_free(p_result); #endif - cugraph_mg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_test_utils.cpp b/cpp/tests/c_api/mg_test_utils.cpp index 58c5e59c16f..98b64014726 100644 --- a/cpp/tests/c_api/mg_test_utils.cpp +++ b/cpp/tests/c_api/mg_test_utils.cpp @@ -191,16 +191,20 @@ extern "C" int create_mg_test_graph(const cugraph_resource_handle_t* handle, handle, wgt_view, (byte_t*)h_wgt, ret_error); TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "wgt copy_from_host failed."); - ret_code = cugraph_mg_graph_create(handle, + ret_code = cugraph_graph_create_mg(handle, &properties, - src_view, - dst_view, - wgt_view, + NULL, + &src_view, + &dst_view, + &wgt_view, NULL, NULL, store_transposed, original_num_edges, // UNUSED FALSE, + FALSE, + FALSE, + FALSE, p_graph, ret_error); TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "graph creation failed."); @@ -285,16 +289,20 @@ extern "C" int create_mg_test_graph_double(const cugraph_resource_handle_t* hand handle, wgt_view, (byte_t*)h_wgt, ret_error); TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "wgt copy_from_host failed."); - ret_code = cugraph_mg_graph_create(handle, + ret_code = cugraph_graph_create_mg(handle, &properties, - src_view, - dst_view, - wgt_view, + NULL, + &src_view, + &dst_view, + &wgt_view, NULL, NULL, store_transposed, original_num_edges, // UNUSED FALSE, + FALSE, + FALSE, + FALSE, p_graph, ret_error); TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "graph creation failed."); @@ -373,16 +381,20 @@ extern "C" int create_mg_test_graph_with_edge_ids(const cugraph_resource_handle_ handle, idx_view, (byte_t*)h_idx, ret_error); TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "wgt copy_from_host failed."); - ret_code = cugraph_mg_graph_create(handle, + ret_code = cugraph_graph_create_mg(handle, &properties, - src_view, - dst_view, NULL, - idx_view, + &src_view, + &dst_view, + NULL, + &idx_view, NULL, store_transposed, original_num_edges, // UNUSED FALSE, + FALSE, + FALSE, + FALSE, p_graph, ret_error); TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "graph creation failed."); @@ -496,16 +508,20 @@ extern "C" int create_mg_test_graph_with_properties(const cugraph_resource_handl TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "wgt copy_from_host failed."); } - ret_code = cugraph_mg_graph_create(handle, + ret_code = cugraph_graph_create_mg(handle, &properties, - src_view, - dst_view, - wgt_view, - idx_view, - type_view, + NULL, + &src_view, + &dst_view, + &wgt_view, + &idx_view, + &type_view, store_transposed, original_num_edges, // UNUSED FALSE, + FALSE, + FALSE, + FALSE, p_graph, ret_error); TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "graph creation failed."); @@ -625,16 +641,20 @@ int create_mg_test_graph_new(const cugraph_resource_handle_t* handle, TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "edge_id copy_from_host failed."); } - ret_code = cugraph_mg_graph_create(handle, + ret_code = cugraph_graph_create_mg(handle, &properties, - src_view, - dst_view, - wgt_view, - edge_id_view, - edge_type_view, + NULL, + &src_view, + &dst_view, + &wgt_view, + &edge_id_view, + &edge_type_view, store_transposed, original_num_edges, // UNUSED FALSE, + FALSE, + FALSE, + FALSE, graph, ret_error); TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "graph creation failed."); diff --git a/cpp/tests/c_api/mg_triangle_count_test.c b/cpp/tests/c_api/mg_triangle_count_test.c index d6eec6aad25..149c42046f5 100644 --- a/cpp/tests/c_api/mg_triangle_count_test.c +++ b/cpp/tests/c_api/mg_triangle_count_test.c @@ -105,7 +105,7 @@ int generic_triangle_count_test(const cugraph_resource_handle_t* handle, cugraph_triangle_count_result_free(p_result); } - cugraph_mg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_two_hop_neighbors_test.c b/cpp/tests/c_api/mg_two_hop_neighbors_test.c index 056da2bcc45..31d5d535c8d 100644 --- a/cpp/tests/c_api/mg_two_hop_neighbors_test.c +++ b/cpp/tests/c_api/mg_two_hop_neighbors_test.c @@ -110,7 +110,7 @@ int generic_two_hop_nbr_test(const cugraph_resource_handle_t* resource_handle, cugraph_vertex_pairs_free(result); cugraph_type_erased_device_array_view_free(start_vertices_view); cugraph_type_erased_device_array_free(start_vertices); - cugraph_mg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/mg_uniform_neighbor_sample_test.c b/cpp/tests/c_api/mg_uniform_neighbor_sample_test.c index 3d8fb02ed46..b046b453c1c 100644 --- a/cpp/tests/c_api/mg_uniform_neighbor_sample_test.c +++ b/cpp/tests/c_api/mg_uniform_neighbor_sample_test.c @@ -431,7 +431,7 @@ int generic_uniform_neighbor_sample_test(const cugraph_resource_handle_t* handle cugraph_sample_result_free(result); #endif - cugraph_mg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; } @@ -676,7 +676,7 @@ int test_uniform_neighbor_from_alex(const cugraph_resource_handle_t* handle) cugraph_sample_result_free(result); cugraph_type_erased_host_array_view_free(h_fan_out_view); - cugraph_mg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); cugraph_sampling_options_free(sampling_options); @@ -938,7 +938,7 @@ int test_uniform_neighbor_sample_alex_bug(const cugraph_resource_handle_t* handl cugraph_sample_result_free(result); #endif - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); } @@ -1217,7 +1217,7 @@ int test_uniform_neighbor_sample_sort_by_hop(const cugraph_resource_handle_t* ha cugraph_sample_result_free(result); #endif - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); } diff --git a/cpp/tests/c_api/mg_weakly_connected_components_test.c b/cpp/tests/c_api/mg_weakly_connected_components_test.c index 3410c6dfd69..9b9dcfd6d5a 100644 --- a/cpp/tests/c_api/mg_weakly_connected_components_test.c +++ b/cpp/tests/c_api/mg_weakly_connected_components_test.c @@ -93,7 +93,7 @@ int generic_wcc_test(const cugraph_resource_handle_t* handle, cugraph_type_erased_device_array_view_free(components); cugraph_type_erased_device_array_view_free(vertices); cugraph_labeling_result_free(p_result); - cugraph_mg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_error_free(ret_error); return test_ret_value; diff --git a/cpp/tests/c_api/negative_sampling_test.c b/cpp/tests/c_api/negative_sampling_test.c index 5e8d3f7e765..52360d622dd 100644 --- a/cpp/tests/c_api/negative_sampling_test.c +++ b/cpp/tests/c_api/negative_sampling_test.c @@ -194,7 +194,7 @@ int generic_negative_sampling_test(const cugraph_resource_handle_t* handle, cugraph_type_erased_device_array_free(d_vertices); cugraph_type_erased_device_array_free(d_src_bias); cugraph_coo_free(result); - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; } diff --git a/cpp/tests/c_api/pagerank_test.c b/cpp/tests/c_api/pagerank_test.c index 0d55852dbb2..b0caef58eee 100644 --- a/cpp/tests/c_api/pagerank_test.c +++ b/cpp/tests/c_api/pagerank_test.c @@ -93,7 +93,7 @@ int generic_pagerank_test(vertex_t* h_src, } cugraph_centrality_result_free(p_result); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(p_handle); cugraph_error_free(ret_error); @@ -168,7 +168,7 @@ int generic_pagerank_nonconverging_test(vertex_t* h_src, } cugraph_centrality_result_free(p_result); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(p_handle); cugraph_error_free(ret_error); @@ -277,7 +277,7 @@ int generic_personalized_pagerank_test(vertex_t* h_src, } cugraph_centrality_result_free(p_result); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(p_handle); cugraph_error_free(ret_error); @@ -386,7 +386,7 @@ int generic_personalized_pagerank_nonconverging_test(vertex_t* h_src, } cugraph_centrality_result_free(p_result); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(p_handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/sg_random_walks_test.c b/cpp/tests/c_api/sg_random_walks_test.c index a4a77b5775a..05d77a0b3b2 100644 --- a/cpp/tests/c_api/sg_random_walks_test.c +++ b/cpp/tests/c_api/sg_random_walks_test.c @@ -141,7 +141,7 @@ int generic_uniform_random_walks_test(vertex_t* h_src, } cugraph_random_walk_result_free(result); - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_free_resource_handle(handle); cugraph_error_free(ret_error); @@ -258,7 +258,7 @@ int generic_biased_random_walks_test(vertex_t* h_src, cugraph_random_walk_result_free(result); - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_free_resource_handle(handle); cugraph_error_free(ret_error); @@ -377,7 +377,7 @@ int generic_node2vec_random_walks_test(vertex_t* h_src, cugraph_random_walk_result_free(result); - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_free_resource_handle(handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/similarity_test.c b/cpp/tests/c_api/similarity_test.c index 70e0cb6fb95..ac4dff850fa 100644 --- a/cpp/tests/c_api/similarity_test.c +++ b/cpp/tests/c_api/similarity_test.c @@ -128,7 +128,7 @@ int generic_similarity_test(vertex_t* h_src, if (result != NULL) cugraph_similarity_result_free(result); if (vertex_pairs != NULL) cugraph_vertex_pairs_free(vertex_pairs); - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_free_resource_handle(handle); cugraph_error_free(ret_error); @@ -238,7 +238,7 @@ int generic_all_pairs_similarity_test(vertex_t* h_src, } if (result != NULL) cugraph_similarity_result_free(result); - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_free_resource_handle(handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/sssp_test.c b/cpp/tests/c_api/sssp_test.c index 48039fcb43c..290542b1f9d 100644 --- a/cpp/tests/c_api/sssp_test.c +++ b/cpp/tests/c_api/sssp_test.c @@ -94,7 +94,7 @@ int generic_sssp_test(vertex_t* h_src, cugraph_type_erased_device_array_view_free(distances); cugraph_type_erased_device_array_view_free(predecessors); cugraph_paths_result_free(p_result); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(p_handle); cugraph_error_free(ret_error); @@ -168,7 +168,7 @@ int generic_sssp_test_double(vertex_t* h_src, cugraph_type_erased_device_array_view_free(distances); cugraph_type_erased_device_array_view_free(predecessors); cugraph_paths_result_free(p_result); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(p_handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/strongly_connected_components_test.c b/cpp/tests/c_api/strongly_connected_components_test.c index 24dd24c3fcd..0706c33a0bb 100644 --- a/cpp/tests/c_api/strongly_connected_components_test.c +++ b/cpp/tests/c_api/strongly_connected_components_test.c @@ -95,7 +95,7 @@ int generic_scc_test(vertex_t* h_src, cugraph_type_erased_device_array_view_free(vertices); cugraph_labeling_result_free(p_result); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(p_handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/test_utils.cpp b/cpp/tests/c_api/test_utils.cpp index 193251917a4..2df62345784 100644 --- a/cpp/tests/c_api/test_utils.cpp +++ b/cpp/tests/c_api/test_utils.cpp @@ -98,8 +98,9 @@ extern "C" int create_test_graph(const cugraph_resource_handle_t* p_handle, p_handle, wgt_view, (byte_t*)h_wgt, ret_error); TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "wgt copy_from_host failed."); - ret_code = cugraph_sg_graph_create(p_handle, + ret_code = cugraph_graph_create_sg(p_handle, &properties, + nullptr, src_view, dst_view, wgt_view, @@ -108,6 +109,9 @@ extern "C" int create_test_graph(const cugraph_resource_handle_t* p_handle, store_transposed, renumber, FALSE, + FALSE, + FALSE, + FALSE, p_graph, ret_error); TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "graph creation failed."); @@ -180,8 +184,9 @@ extern "C" int create_test_graph_double(const cugraph_resource_handle_t* p_handl p_handle, wgt_view, (byte_t*)h_wgt, ret_error); TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "wgt copy_from_host failed."); - ret_code = cugraph_sg_graph_create(p_handle, + ret_code = cugraph_graph_create_sg(p_handle, &properties, + nullptr, src_view, dst_view, wgt_view, @@ -190,6 +195,9 @@ extern "C" int create_test_graph_double(const cugraph_resource_handle_t* p_handl store_transposed, renumber, FALSE, + FALSE, + FALSE, + FALSE, p_graph, ret_error); TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "graph creation failed."); @@ -355,8 +363,9 @@ int create_sg_test_graph(const cugraph_resource_handle_t* handle, TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "edge_id copy_from_host failed."); } - ret_code = cugraph_sg_graph_create(handle, + ret_code = cugraph_graph_create_sg(handle, &properties, + nullptr, src_view, dst_view, wgt_view, @@ -365,6 +374,9 @@ int create_sg_test_graph(const cugraph_resource_handle_t* handle, store_transposed, renumber, FALSE, + FALSE, + FALSE, + FALSE, graph, ret_error); TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "graph creation failed."); diff --git a/cpp/tests/c_api/triangle_count_test.c b/cpp/tests/c_api/triangle_count_test.c index 5929e3d6560..383cc335941 100644 --- a/cpp/tests/c_api/triangle_count_test.c +++ b/cpp/tests/c_api/triangle_count_test.c @@ -102,7 +102,7 @@ int generic_triangle_count_test(vertex_t* h_src, cugraph_triangle_count_result_free(p_result); } - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(p_handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/two_hop_neighbors_test.c b/cpp/tests/c_api/two_hop_neighbors_test.c index bc95db3932b..44ccfd11622 100644 --- a/cpp/tests/c_api/two_hop_neighbors_test.c +++ b/cpp/tests/c_api/two_hop_neighbors_test.c @@ -117,7 +117,7 @@ int generic_two_hop_nbr_test(vertex_t* h_src, cugraph_vertex_pairs_free(result); cugraph_type_erased_device_array_view_free(start_vertices_view); cugraph_type_erased_device_array_free(start_vertices); - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_free_resource_handle(resource_handle); cugraph_error_free(ret_error); diff --git a/cpp/tests/c_api/uniform_neighbor_sample_test.c b/cpp/tests/c_api/uniform_neighbor_sample_test.c index 451dbca51a7..404e38627ae 100644 --- a/cpp/tests/c_api/uniform_neighbor_sample_test.c +++ b/cpp/tests/c_api/uniform_neighbor_sample_test.c @@ -460,7 +460,7 @@ int generic_uniform_neighbor_sample_test(const cugraph_resource_handle_t* handle cugraph_sample_result_free(result); #endif - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); return test_ret_value; } @@ -528,8 +528,9 @@ int create_test_graph_with_edge_ids(const cugraph_resource_handle_t* p_handle, ret_code = cugraph_type_erased_device_array_view_as_type(ids, weight_tid, &wgt_view, ret_error); TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "wgt cast from ids failed."); - ret_code = cugraph_sg_graph_create(p_handle, + ret_code = cugraph_graph_create_sg(p_handle, &properties, + NULL, src_view, dst_view, wgt_view, @@ -538,6 +539,9 @@ int create_test_graph_with_edge_ids(const cugraph_resource_handle_t* p_handle, store_transposed, renumber, FALSE, + FALSE, + FALSE, + FALSE, p_graph, ret_error); TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "graph creation failed."); @@ -766,7 +770,7 @@ int test_uniform_neighbor_sample_with_labels(const cugraph_resource_handle_t* ha cugraph_sampling_options_free(sampling_options); #endif - cugraph_sg_graph_free(graph); + cugraph_graph_free(graph); cugraph_error_free(ret_error); } diff --git a/cpp/tests/c_api/weakly_connected_components_test.c b/cpp/tests/c_api/weakly_connected_components_test.c index ee1a6b9066b..04fdcbc8930 100644 --- a/cpp/tests/c_api/weakly_connected_components_test.c +++ b/cpp/tests/c_api/weakly_connected_components_test.c @@ -93,7 +93,7 @@ int generic_wcc_test(vertex_t* h_src, cugraph_type_erased_device_array_view_free(components); cugraph_type_erased_device_array_view_free(vertices); cugraph_labeling_result_free(p_result); - cugraph_sg_graph_free(p_graph); + cugraph_graph_free(p_graph); cugraph_free_resource_handle(p_handle); cugraph_error_free(ret_error); diff --git a/python/pylibcugraph/pylibcugraph/_cugraph_c/graph.pxd b/python/pylibcugraph/pylibcugraph/_cugraph_c/graph.pxd index 497607860bd..5bbe5bc4a87 100644 --- a/python/pylibcugraph/pylibcugraph/_cugraph_c/graph.pxd +++ b/python/pylibcugraph/pylibcugraph/_cugraph_c/graph.pxd @@ -37,21 +37,6 @@ cdef extern from "cugraph_c/graph.h": bool_t is_symmetric bool_t is_multigraph - cdef cugraph_error_code_t \ - cugraph_sg_graph_create( - const cugraph_resource_handle_t* handle, - const cugraph_graph_properties_t* properties, - const cugraph_type_erased_device_array_view_t* src, - const cugraph_type_erased_device_array_view_t* dst, - const cugraph_type_erased_device_array_view_t* weights, - const cugraph_type_erased_device_array_view_t* edge_ids, - const cugraph_type_erased_device_array_view_t* edge_types, - bool_t store_transposed, - bool_t renumber, - bool_t check, - cugraph_graph_t** graph, - cugraph_error_t** error) - # Supports isolated vertices cdef cugraph_error_code_t \ cugraph_graph_create_sg( @@ -72,12 +57,6 @@ cdef extern from "cugraph_c/graph.h": cugraph_graph_t** graph, cugraph_error_t** error) - # This may get renamed to cugraph_graph_free() - cdef void \ - cugraph_sg_graph_free( - cugraph_graph_t* graph - ) - # FIXME: Might want to delete 'cugraph_sg_graph_free' and replace # 'cugraph_mg_graph_free' by 'cugraph_graph_free' cdef void \ @@ -85,45 +64,6 @@ cdef extern from "cugraph_c/graph.h": cugraph_graph_t* graph ) - cdef cugraph_error_code_t \ - cugraph_mg_graph_create( - const cugraph_resource_handle_t* handle, - const cugraph_graph_properties_t* properties, - const cugraph_type_erased_device_array_view_t* src, - const cugraph_type_erased_device_array_view_t* dst, - const cugraph_type_erased_device_array_view_t* weights, - const cugraph_type_erased_device_array_view_t* edge_ids, - const cugraph_type_erased_device_array_view_t* edge_types, - bool_t store_transposed, - size_t num_edges, - bool_t check, - cugraph_graph_t** graph, - cugraph_error_t** error - ) - - # This may get renamed to or replaced with cugraph_graph_free() - cdef void \ - cugraph_mg_graph_free( - cugraph_graph_t* graph - ) - - cdef cugraph_error_code_t \ - cugraph_sg_graph_create_from_csr( - const cugraph_resource_handle_t* handle, - const cugraph_graph_properties_t* properties, - const cugraph_type_erased_device_array_view_t* offsets, - const cugraph_type_erased_device_array_view_t* indices, - const cugraph_type_erased_device_array_view_t* weights, - const cugraph_type_erased_device_array_view_t* edge_ids, - const cugraph_type_erased_device_array_view_t* edge_type_ids, - bool_t store_transposed, - bool_t renumber, - bool_t symmetrize, - bool_t check, - cugraph_graph_t** graph, - cugraph_error_t** error - ) - cdef cugraph_error_code_t \ cugraph_graph_create_sg_from_csr( const cugraph_resource_handle_t* handle, @@ -135,27 +75,7 @@ cdef extern from "cugraph_c/graph.h": const cugraph_type_erased_device_array_view_t* edge_type_ids, bool_t store_transposed, bool_t renumber, - bool_t check, - cugraph_graph_t** graph, - cugraph_error_t** error - ) - - cdef void \ - cugraph_sg_graph_free( - cugraph_graph_t* graph - ) - - cdef cugraph_error_code_t \ - cugraph_mg_graph_create( - const cugraph_resource_handle_t* handle, - const cugraph_graph_properties_t* properties, - const cugraph_type_erased_device_array_view_t* src, - const cugraph_type_erased_device_array_view_t* dst, - const cugraph_type_erased_device_array_view_t* weights, - const cugraph_type_erased_device_array_view_t* edge_ids, - const cugraph_type_erased_device_array_view_t* edge_type_ids, - bool_t store_transposed, - size_t num_edges, + bool_t symmetrize, bool_t check, cugraph_graph_t** graph, cugraph_error_t** error @@ -179,8 +99,3 @@ cdef extern from "cugraph_c/graph.h": bool_t do_expensive_check, cugraph_graph_t** graph, cugraph_error_t** error) - - cdef void \ - cugraph_mg_graph_free( - cugraph_graph_t* graph - ) diff --git a/python/pylibcugraph/pylibcugraph/graphs.pyx b/python/pylibcugraph/pylibcugraph/graphs.pyx index 6eda0a83d3e..ba32eb5b641 100644 --- a/python/pylibcugraph/pylibcugraph/graphs.pyx +++ b/python/pylibcugraph/pylibcugraph/graphs.pyx @@ -26,12 +26,8 @@ from pylibcugraph._cugraph_c.array cimport ( from pylibcugraph._cugraph_c.graph cimport ( cugraph_graph_create_sg, cugraph_graph_create_mg, - cugraph_sg_graph_create_from_csr, #FIXME: Remove this once - # 'cugraph_graph_create_sg_from_csr' is exposed cugraph_graph_create_sg_from_csr, - cugraph_sg_graph_free, #FIXME: Remove this cugraph_graph_free, - cugraph_mg_graph_free, #FIXME: Remove this ) from pylibcugraph.resource_handle cimport ( ResourceHandle, @@ -234,7 +230,7 @@ cdef class SGGraph(_GPUGraph): "cugraph_graph_create_sg()") elif input_array_format == "CSR": - error_code = cugraph_sg_graph_create_from_csr( + error_code = cugraph_graph_create_sg_from_csr( resource_handle.c_resource_handle_ptr, &(graph_properties.c_graph_properties), srcs_or_offsets_view_ptr, @@ -270,7 +266,7 @@ cdef class SGGraph(_GPUGraph): def __dealloc__(self): if self.c_graph_ptr is not NULL: - cugraph_sg_graph_free(self.c_graph_ptr) + cugraph_graph_free(self.c_graph_ptr) cdef class MGGraph(_GPUGraph): @@ -503,4 +499,4 @@ cdef class MGGraph(_GPUGraph): def __dealloc__(self): if self.c_graph_ptr is not NULL: - cugraph_mg_graph_free(self.c_graph_ptr) + cugraph_graph_free(self.c_graph_ptr)