Skip to main content

cugraph_sys/
bindings.rs

1// Generated by scripts/dev/bindings.sh cugraph with bindgen-cli 0.73.2.
2// DO NOT EDIT. Run scripts/dev/bindings.sh cugraph to regenerate.
3
4/* automatically generated by rust-bindgen 0.73.2 */
5
6impl cugraph_error_code_ {
7    pub const CUGRAPH_SUCCESS: cugraph_error_code_ = cugraph_error_code_(0);
8    pub const CUGRAPH_UNKNOWN_ERROR: cugraph_error_code_ = cugraph_error_code_(1);
9    pub const CUGRAPH_INVALID_HANDLE: cugraph_error_code_ = cugraph_error_code_(2);
10    pub const CUGRAPH_ALLOC_ERROR: cugraph_error_code_ = cugraph_error_code_(3);
11    pub const CUGRAPH_INVALID_INPUT: cugraph_error_code_ = cugraph_error_code_(4);
12    pub const CUGRAPH_NOT_IMPLEMENTED: cugraph_error_code_ = cugraph_error_code_(5);
13    pub const CUGRAPH_UNSUPPORTED_TYPE_COMBINATION: cugraph_error_code_ = cugraph_error_code_(6);
14    pub const CUGRAPH_INVALID_STATE: cugraph_error_code_ = cugraph_error_code_(7);
15}
16#[repr(transparent)]
17#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
18pub struct cugraph_error_code_(pub ::std::os::raw::c_uint);
19pub use self::cugraph_error_code_ as cugraph_error_code_t;
20impl cugraph_allocation_source_ {
21    pub const CUGRAPH_ALLOCATION_SOURCE_UNKNOWN: cugraph_allocation_source_ = cugraph_allocation_source_(0);
22    pub const CUGRAPH_ALLOCATION_SOURCE_RMM_OUT_OF_MEMORY: cugraph_allocation_source_ = cugraph_allocation_source_(1);
23    pub const CUGRAPH_ALLOCATION_SOURCE_RMM_BAD_ALLOC: cugraph_allocation_source_ = cugraph_allocation_source_(2);
24    pub const CUGRAPH_ALLOCATION_SOURCE_STD_BAD_ALLOC: cugraph_allocation_source_ = cugraph_allocation_source_(3);
25}
26#[repr(transparent)]
27#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
28pub struct cugraph_allocation_source_(pub ::std::os::raw::c_uint);
29pub use self::cugraph_allocation_source_ as cugraph_allocation_source_t;
30impl cugraph_error_failure_source_ {
31    pub const CUGRAPH_ERROR_FAILURE_SOURCE_PHYSICAL: cugraph_error_failure_source_ = cugraph_error_failure_source_(0);
32    pub const CUGRAPH_ERROR_FAILURE_SOURCE_RESERVATION_LIMIT: cugraph_error_failure_source_ =
33        cugraph_error_failure_source_(1);
34    pub const CUGRAPH_ERROR_FAILURE_SOURCE_UNKNOWN: cugraph_error_failure_source_ = cugraph_error_failure_source_(2);
35}
36#[repr(transparent)]
37#[doc = " @brief Provenance of an allocation failure, when the allocation owner can\n        distinguish a logical reservation limit from physical device memory\n        pressure.\n\n This is intentionally separate from `cugraph_allocation_source_t`, which\n records the C++ exception type caught at the boundary."]
38#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
39pub struct cugraph_error_failure_source_(pub ::std::os::raw::c_uint);
40#[doc = " @brief Provenance of an allocation failure, when the allocation owner can\n        distinguish a logical reservation limit from physical device memory\n        pressure.\n\n This is intentionally separate from `cugraph_allocation_source_t`, which\n records the C++ exception type caught at the boundary."]
41pub use self::cugraph_error_failure_source_ as cugraph_error_failure_source_t;
42#[repr(C)]
43#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
44pub struct cugraph_error_ {
45    pub align_: i32,
46}
47#[allow(clippy::unnecessary_operation, clippy::identity_op)]
48const _: () = {
49    ["Size of cugraph_error_"][::std::mem::size_of::<cugraph_error_>() - 4usize];
50    ["Alignment of cugraph_error_"][::std::mem::align_of::<cugraph_error_>() - 4usize];
51    ["Offset of field: cugraph_error_::align_"][::std::mem::offset_of!(cugraph_error_, align_) - 0usize];
52};
53pub type cugraph_error_t = cugraph_error_;
54unsafe extern "C" {
55    #[doc = " @brief     Return an error message\n\n @param [in]  error       The error object from some cugraph function call\n @return a C-style string that provides detail for the error"]
56    pub fn cugraph_error_message(error: *const cugraph_error_t) -> *const ::std::os::raw::c_char;
57}
58unsafe extern "C" {
59    pub fn cugraph_error_allocation_source(error: *const cugraph_error_t) -> cugraph_allocation_source_t;
60}
61unsafe extern "C" {
62    pub fn cugraph_error_failure_source(error: *const cugraph_error_t) -> cugraph_error_failure_source_t;
63}
64unsafe extern "C" {
65    pub fn cugraph_error_domain_id(error: *const cugraph_error_t) -> u64;
66}
67unsafe extern "C" {
68    pub fn cugraph_error_member_id(error: *const cugraph_error_t) -> u64;
69}
70unsafe extern "C" {
71    pub fn cugraph_error_generation(error: *const cugraph_error_t) -> u64;
72}
73unsafe extern "C" {
74    pub fn cugraph_error_requested_bytes(error: *const cugraph_error_t) -> u64;
75}
76unsafe extern "C" {
77    pub fn cugraph_error_alignment(error: *const cugraph_error_t) -> u64;
78}
79unsafe extern "C" {
80    pub fn cugraph_error_cuda_error(error: *const cugraph_error_t) -> i32;
81}
82unsafe extern "C" {
83    #[doc = " @brief    Destroy an error message\n\n @param [in]  error       The error object from some cugraph function call"]
84    pub fn cugraph_error_free(error: *mut cugraph_error_t);
85}
86impl bool_ {
87    pub const FALSE: bool_ = bool_(0);
88    pub const TRUE: bool_ = bool_(1);
89}
90#[repr(transparent)]
91#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
92pub struct bool_(pub ::std::os::raw::c_uint);
93pub use self::bool_ as bool_t;
94pub type byte_t = i8;
95impl data_type_id_ {
96    pub const INT8: data_type_id_ = data_type_id_(0);
97    pub const INT16: data_type_id_ = data_type_id_(1);
98    pub const INT32: data_type_id_ = data_type_id_(2);
99    pub const INT64: data_type_id_ = data_type_id_(3);
100    pub const UINT8: data_type_id_ = data_type_id_(4);
101    pub const UINT16: data_type_id_ = data_type_id_(5);
102    pub const UINT32: data_type_id_ = data_type_id_(6);
103    pub const UINT64: data_type_id_ = data_type_id_(7);
104    pub const FLOAT32: data_type_id_ = data_type_id_(8);
105    pub const FLOAT64: data_type_id_ = data_type_id_(9);
106    pub const SIZE_T: data_type_id_ = data_type_id_(10);
107    pub const BOOL: data_type_id_ = data_type_id_(11);
108    pub const NTYPES: data_type_id_ = data_type_id_(12);
109}
110#[repr(transparent)]
111#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
112pub struct data_type_id_(pub ::std::os::raw::c_uint);
113pub use self::data_type_id_ as cugraph_data_type_id_t;
114#[repr(C)]
115#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
116pub struct cugraph_resource_handle_ {
117    pub align_: i32,
118}
119#[allow(clippy::unnecessary_operation, clippy::identity_op)]
120const _: () = {
121    ["Size of cugraph_resource_handle_"][::std::mem::size_of::<cugraph_resource_handle_>() - 4usize];
122    ["Alignment of cugraph_resource_handle_"][::std::mem::align_of::<cugraph_resource_handle_>() - 4usize];
123    ["Offset of field: cugraph_resource_handle_::align_"]
124        [::std::mem::offset_of!(cugraph_resource_handle_, align_) - 0usize];
125};
126pub type cugraph_resource_handle_t = cugraph_resource_handle_;
127unsafe extern "C" {
128    #[doc = " @brief     Construct a resource handle\n\n @param [in]  raft_handle   Handle for accessing resources\n                            If NULL, we will create a raft handle\n                            internally\n\n @return A graph resource handle"]
129    pub fn cugraph_create_resource_handle(raft_handle: *mut ::std::os::raw::c_void) -> *mut cugraph_resource_handle_t;
130}
131unsafe extern "C" {
132    #[doc = " @brief get comm_size from resource handle\n\n If the resource handle has been configured for multi-gpu, this will return\n the comm_size for this cluster.  If the resource handle has not been configured for\n multi-gpu this will always return 1.\n\n @param [in]  handle          Handle for accessing resources\n @return comm_size"]
133    pub fn cugraph_resource_handle_get_comm_size(handle: *const cugraph_resource_handle_t) -> ::std::os::raw::c_int;
134}
135unsafe extern "C" {
136    #[doc = " @brief get rank from resource handle\n\n If the resource handle has been configured for multi-gpu, this will return\n the rank for this worker.  If the resource handle has not been configured for\n multi-gpu this will always return 0.\n\n @param [in]  handle          Handle for accessing resources\n @return rank"]
137    pub fn cugraph_resource_handle_get_rank(handle: *const cugraph_resource_handle_t) -> ::std::os::raw::c_int;
138}
139unsafe extern "C" {
140    #[doc = " @brief     Free resources in the resource handle\n\n @param [in]  handle          Handle for accessing resources"]
141    pub fn cugraph_free_resource_handle(handle: *mut cugraph_resource_handle_t);
142}
143#[repr(C)]
144#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
145pub struct cugraph_type_erased_device_array_t {
146    pub align_: i32,
147}
148#[allow(clippy::unnecessary_operation, clippy::identity_op)]
149const _: () = {
150    ["Size of cugraph_type_erased_device_array_t"]
151        [::std::mem::size_of::<cugraph_type_erased_device_array_t>() - 4usize];
152    ["Alignment of cugraph_type_erased_device_array_t"]
153        [::std::mem::align_of::<cugraph_type_erased_device_array_t>() - 4usize];
154    ["Offset of field: cugraph_type_erased_device_array_t::align_"]
155        [::std::mem::offset_of!(cugraph_type_erased_device_array_t, align_) - 0usize];
156};
157#[repr(C)]
158#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
159pub struct cugraph_type_erased_device_array_view_t {
160    pub align_: i32,
161}
162#[allow(clippy::unnecessary_operation, clippy::identity_op)]
163const _: () = {
164    ["Size of cugraph_type_erased_device_array_view_t"]
165        [::std::mem::size_of::<cugraph_type_erased_device_array_view_t>() - 4usize];
166    ["Alignment of cugraph_type_erased_device_array_view_t"]
167        [::std::mem::align_of::<cugraph_type_erased_device_array_view_t>() - 4usize];
168    ["Offset of field: cugraph_type_erased_device_array_view_t::align_"]
169        [::std::mem::offset_of!(cugraph_type_erased_device_array_view_t, align_) - 0usize];
170};
171#[repr(C)]
172#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
173pub struct cugraph_type_erased_host_array_t {
174    pub align_: i32,
175}
176#[allow(clippy::unnecessary_operation, clippy::identity_op)]
177const _: () = {
178    ["Size of cugraph_type_erased_host_array_t"][::std::mem::size_of::<cugraph_type_erased_host_array_t>() - 4usize];
179    ["Alignment of cugraph_type_erased_host_array_t"]
180        [::std::mem::align_of::<cugraph_type_erased_host_array_t>() - 4usize];
181    ["Offset of field: cugraph_type_erased_host_array_t::align_"]
182        [::std::mem::offset_of!(cugraph_type_erased_host_array_t, align_) - 0usize];
183};
184#[repr(C)]
185#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
186pub struct cugraph_type_erased_host_array_view_t {
187    pub align_: i32,
188}
189#[allow(clippy::unnecessary_operation, clippy::identity_op)]
190const _: () = {
191    ["Size of cugraph_type_erased_host_array_view_t"]
192        [::std::mem::size_of::<cugraph_type_erased_host_array_view_t>() - 4usize];
193    ["Alignment of cugraph_type_erased_host_array_view_t"]
194        [::std::mem::align_of::<cugraph_type_erased_host_array_view_t>() - 4usize];
195    ["Offset of field: cugraph_type_erased_host_array_view_t::align_"]
196        [::std::mem::offset_of!(cugraph_type_erased_host_array_view_t, align_) - 0usize];
197};
198unsafe extern "C" {
199    #[doc = " @brief     Create a type erased device array\n\n @param [in]  handle      Handle for accessing resources\n @param [in]  n_elems     The number of elements in the array\n @param [in]  dtype       The type of array to create\n @param [out] array       Pointer to the location to store the pointer to the device array\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
200    pub fn cugraph_type_erased_device_array_create(
201        handle: *const cugraph_resource_handle_t,
202        n_elems: usize,
203        dtype: cugraph_data_type_id_t,
204        array: *mut *mut cugraph_type_erased_device_array_t,
205        error: *mut *mut cugraph_error_t,
206    ) -> cugraph_error_code_t;
207}
208unsafe extern "C" {
209    #[doc = " @brief     Create a type erased device array from a view\n\n Copies the data from the view into the new device array\n\n @param [in]  handle Handle for accessing resources\n @param [in]  view   Type erased device array view to copy from\n @param [out] array  Pointer to the location to store the pointer to the device array\n @param [out] error  Pointer to an error object storing details of any error.  Will\n                     be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
210    pub fn cugraph_type_erased_device_array_create_from_view(
211        handle: *const cugraph_resource_handle_t,
212        view: *const cugraph_type_erased_device_array_view_t,
213        array: *mut *mut cugraph_type_erased_device_array_t,
214        error: *mut *mut cugraph_error_t,
215    ) -> cugraph_error_code_t;
216}
217unsafe extern "C" {
218    #[doc = " @brief    Destroy a type erased device array\n\n @param [in]  p    Pointer to the type erased device array"]
219    pub fn cugraph_type_erased_device_array_free(p: *mut cugraph_type_erased_device_array_t);
220}
221unsafe extern "C" {
222    #[doc = " @brief    Create a type erased device array view from\n           a type erased device array\n\n @param [in]  array       Pointer to the type erased device array\n @return Pointer to the view of the host array"]
223    pub fn cugraph_type_erased_device_array_view(
224        array: *mut cugraph_type_erased_device_array_t,
225    ) -> *mut cugraph_type_erased_device_array_view_t;
226}
227unsafe extern "C" {
228    #[doc = " @brief Create a type erased device array view with a different type\n\n    Create a type erased device array view from\n    a type erased device array treating the underlying\n    pointer as a different type.\n\n    Note: This is only viable when the underlying types are the same size.  That\n    is, you can switch between INT32 and FLOAT32, or between INT64 and FLOAT64.\n    But if the types are different sizes this will be an error.\n\n @param [in]  array        Pointer to the type erased device array\n @param [in]  dtype        The type to cast the pointer to\n @param [out] result_view  Address where to put the allocated device view\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
229    pub fn cugraph_type_erased_device_array_view_as_type(
230        array: *mut cugraph_type_erased_device_array_t,
231        dtype: cugraph_data_type_id_t,
232        result_view: *mut *mut cugraph_type_erased_device_array_view_t,
233        error: *mut *mut cugraph_error_t,
234    ) -> cugraph_error_code_t;
235}
236unsafe extern "C" {
237    #[doc = " @brief    Create a type erased device array view from\n           a raw device pointer.\n\n @param [in]  pointer     Raw device pointer\n @param [in]  n_elems     The number of elements in the array\n @param [in]  dtype       The type of array to create\n @return Pointer to the view of the host array"]
238    pub fn cugraph_type_erased_device_array_view_create(
239        pointer: *mut ::std::os::raw::c_void,
240        n_elems: usize,
241        dtype: cugraph_data_type_id_t,
242    ) -> *mut cugraph_type_erased_device_array_view_t;
243}
244unsafe extern "C" {
245    #[doc = " @brief    Destroy a type erased device array view\n\n @param [in]  p    Pointer to the type erased device array view"]
246    pub fn cugraph_type_erased_device_array_view_free(p: *mut cugraph_type_erased_device_array_view_t);
247}
248unsafe extern "C" {
249    #[doc = " @brief    Get the size of a type erased device array view\n\n @param [in]  p    Pointer to the type erased device array view\n @return The number of elements in the array"]
250    pub fn cugraph_type_erased_device_array_view_size(p: *const cugraph_type_erased_device_array_view_t) -> usize;
251}
252unsafe extern "C" {
253    #[doc = " @brief    Get the type of a type erased device array view\n\n @param [in]  p    Pointer to the type erased device array view\n @return The type of the elements in the array"]
254    pub fn cugraph_type_erased_device_array_view_type(
255        p: *const cugraph_type_erased_device_array_view_t,
256    ) -> cugraph_data_type_id_t;
257}
258unsafe extern "C" {
259    #[doc = " @brief    Get the raw pointer of the type erased device array view\n\n @param [in]  p    Pointer to the type erased device array view\n @return Pointer (device memory) for the data in the array"]
260    pub fn cugraph_type_erased_device_array_view_pointer(
261        p: *const cugraph_type_erased_device_array_view_t,
262    ) -> *const ::std::os::raw::c_void;
263}
264unsafe extern "C" {
265    #[doc = " @brief     Create a type erased host array\n\n @param [in]  handle      Handle for accessing resources\n @param [in]  n_elems     The number of elements in the array\n @param [in]  dtype       The type of array to create\n @param [out] array       Pointer to the location to store the pointer to the host array\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
266    pub fn cugraph_type_erased_host_array_create(
267        handle: *const cugraph_resource_handle_t,
268        n_elems: usize,
269        dtype: cugraph_data_type_id_t,
270        array: *mut *mut cugraph_type_erased_host_array_t,
271        error: *mut *mut cugraph_error_t,
272    ) -> cugraph_error_code_t;
273}
274unsafe extern "C" {
275    #[doc = " @brief    Destroy a type erased host array\n\n @param [in]  p    Pointer to the type erased host array"]
276    pub fn cugraph_type_erased_host_array_free(p: *mut cugraph_type_erased_host_array_t);
277}
278unsafe extern "C" {
279    #[doc = " @brief    Create a type erased host array view from\n           a type erased host array\n\n @param [in]  array       Pointer to the type erased host array\n @return Pointer to the view of the host array"]
280    pub fn cugraph_type_erased_host_array_view(
281        array: *mut cugraph_type_erased_host_array_t,
282    ) -> *mut cugraph_type_erased_host_array_view_t;
283}
284unsafe extern "C" {
285    #[doc = " @brief    Create a type erased host array view from\n           a raw host pointer.\n\n @param [in]  pointer     Raw host pointer\n @param [in]  n_elems     The number of elements in the array\n @param [in]  dtype       The type of array to create\n @return pointer to the view of the host array"]
286    pub fn cugraph_type_erased_host_array_view_create(
287        pointer: *mut ::std::os::raw::c_void,
288        n_elems: usize,
289        dtype: cugraph_data_type_id_t,
290    ) -> *mut cugraph_type_erased_host_array_view_t;
291}
292unsafe extern "C" {
293    #[doc = " @brief    Destroy a type erased host array view\n\n @param [in]  p    Pointer to the type erased host array view"]
294    pub fn cugraph_type_erased_host_array_view_free(p: *mut cugraph_type_erased_host_array_view_t);
295}
296unsafe extern "C" {
297    #[doc = " @brief    Get the size of a type erased host array view\n\n @param [in]  p    Pointer to the type erased host array view\n @return The number of elements in the array"]
298    pub fn cugraph_type_erased_host_array_size(p: *const cugraph_type_erased_host_array_view_t) -> usize;
299}
300unsafe extern "C" {
301    #[doc = " @brief    Get the type of a type erased host array view\n\n @param [in]  p    Pointer to the type erased host array view\n @return The type of the elements in the array"]
302    pub fn cugraph_type_erased_host_array_type(
303        p: *const cugraph_type_erased_host_array_view_t,
304    ) -> cugraph_data_type_id_t;
305}
306unsafe extern "C" {
307    #[doc = " @brief    Get the raw pointer of the type erased host array view\n\n @param [in]  p    Pointer to the type erased host array view\n @return Pointer (host memory) for the data in the array"]
308    pub fn cugraph_type_erased_host_array_pointer(
309        p: *const cugraph_type_erased_host_array_view_t,
310    ) -> *mut ::std::os::raw::c_void;
311}
312unsafe extern "C" {
313    #[doc = " @brief    Copy data between two type erased device array views\n\n @param [in]  handle      Handle for accessing resources\n @param [out] dst         Pointer to type erased host array view destination\n @param [in]  src         Pointer to type erased host array view source\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
314    pub fn cugraph_type_erased_host_array_view_copy(
315        handle: *const cugraph_resource_handle_t,
316        dst: *mut cugraph_type_erased_host_array_view_t,
317        src: *const cugraph_type_erased_host_array_view_t,
318        error: *mut *mut cugraph_error_t,
319    ) -> cugraph_error_code_t;
320}
321unsafe extern "C" {
322    #[doc = " @brief    Copy data from host to a type erased device array view\n\n @param [in]  handle      Handle for accessing resources\n @param [out] dst         Pointer to the type erased device array view\n @param [in]  h_src       Pointer to host array to copy into device memory\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
323    pub fn cugraph_type_erased_device_array_view_copy_from_host(
324        handle: *const cugraph_resource_handle_t,
325        dst: *mut cugraph_type_erased_device_array_view_t,
326        h_src: *const byte_t,
327        error: *mut *mut cugraph_error_t,
328    ) -> cugraph_error_code_t;
329}
330unsafe extern "C" {
331    #[doc = " @brief    Copy data from device to a type erased host array\n\n @param [in]  handle      Handle for accessing resources\n @param [out] h_dst       Pointer to host array\n @param [in]  src         Pointer to the type erased device array view source\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
332    pub fn cugraph_type_erased_device_array_view_copy_to_host(
333        handle: *const cugraph_resource_handle_t,
334        h_dst: *mut byte_t,
335        src: *const cugraph_type_erased_device_array_view_t,
336        error: *mut *mut cugraph_error_t,
337    ) -> cugraph_error_code_t;
338}
339unsafe extern "C" {
340    #[doc = " @brief    Copy data between two type erased device array views\n\n @param [in]  handle      Handle for accessing resources\n @param [out] dst         Pointer to type erased device array view destination\n @param [in]  src         Pointer to type erased device array view source\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
341    pub fn cugraph_type_erased_device_array_view_copy(
342        handle: *const cugraph_resource_handle_t,
343        dst: *mut cugraph_type_erased_device_array_view_t,
344        src: *const cugraph_type_erased_device_array_view_t,
345        error: *mut *mut cugraph_error_t,
346    ) -> cugraph_error_code_t;
347}
348#[repr(C)]
349#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
350pub struct cugraph_graph_t {
351    pub align_: i32,
352}
353#[allow(clippy::unnecessary_operation, clippy::identity_op)]
354const _: () = {
355    ["Size of cugraph_graph_t"][::std::mem::size_of::<cugraph_graph_t>() - 4usize];
356    ["Alignment of cugraph_graph_t"][::std::mem::align_of::<cugraph_graph_t>() - 4usize];
357    ["Offset of field: cugraph_graph_t::align_"][::std::mem::offset_of!(cugraph_graph_t, align_) - 0usize];
358};
359#[repr(C)]
360#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
361pub struct cugraph_data_mask_t {
362    pub align_: i32,
363}
364#[allow(clippy::unnecessary_operation, clippy::identity_op)]
365const _: () = {
366    ["Size of cugraph_data_mask_t"][::std::mem::size_of::<cugraph_data_mask_t>() - 4usize];
367    ["Alignment of cugraph_data_mask_t"][::std::mem::align_of::<cugraph_data_mask_t>() - 4usize];
368    ["Offset of field: cugraph_data_mask_t::align_"][::std::mem::offset_of!(cugraph_data_mask_t, align_) - 0usize];
369};
370#[repr(C)]
371#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
372pub struct cugraph_graph_properties_t {
373    pub is_symmetric: bool_t,
374    pub is_multigraph: bool_t,
375}
376#[allow(clippy::unnecessary_operation, clippy::identity_op)]
377const _: () = {
378    ["Size of cugraph_graph_properties_t"][::std::mem::size_of::<cugraph_graph_properties_t>() - 8usize];
379    ["Alignment of cugraph_graph_properties_t"][::std::mem::align_of::<cugraph_graph_properties_t>() - 4usize];
380    ["Offset of field: cugraph_graph_properties_t::is_symmetric"]
381        [::std::mem::offset_of!(cugraph_graph_properties_t, is_symmetric) - 0usize];
382    ["Offset of field: cugraph_graph_properties_t::is_multigraph"]
383        [::std::mem::offset_of!(cugraph_graph_properties_t, is_multigraph) - 4usize];
384};
385unsafe extern "C" {
386    #[doc = " @brief     Construct an SG graph\n\n @deprecated Use cugraph_graph_create_with_times_sg instead\n\n @param [in]  handle         Handle for accessing resources\n @param [in]  properties     Properties of the constructed graph\n @param [in]  vertices       Optional device array containing a list of vertex ids\n                             (specify NULL if we should create vertex ids from the\n                             unique contents of @p src and @p dst)\n @param [in]  src            Device array containing the source vertex ids.\n @param [in]  dst            Device array containing the destination vertex ids\n @param [in]  weights        Device array containing the edge weights.  Note that an unweighted\n                             graph can be created by passing weights == NULL.\n @param [in]  edge_ids       Device array containing the edge ids for each edge.  Optional\nargument that can be NULL if edge ids are not used.\n @param [in]  edge_type_ids  Device array containing the edge types for each edge.  Optional\nargument that can be NULL if edge types are not used.\n @param [in]  store_transposed If true create the graph initially in transposed format\n @param [in]  renumber       If true, renumber vertices to make an efficient data structure.\n    If false, do not renumber.  Renumbering enables some significant optimizations within\n    the graph primitives library, so it is strongly encouraged.  Renumbering is required if\n    the vertices are not sequential integer values from 0 to num_vertices.\n @param [in]  drop_self_loops  If true, drop any self loops that exist in the provided edge list.\n @param [in]  drop_multi_edges If true, drop any multi edges that exist in the provided edge list.\n    Note that setting this flag will arbitrarily select one instance of a multi edge to be the\n    edge that survives.  If the edges have properties that should be honored (e.g. sum the\nweights,\n    or take the maximum weight), the caller should remove specific edges themselves and not rely\n    on this flag.\n @param [in] symmetrize      If true, symmetrize the edgelist. The symmetrization of edges\n with edge_ids and/or edge_type_ids is currently not supported.\n @param [in]  do_expensive_check    If true, do expensive checks to validate the input data\n    is consistent with software assumptions.  If false bypass these checks.\n @param [out] graph          A pointer to the graph object\n @param [out] error          Pointer to an error object storing details of any error.  Will\n                             be populated if error code is not CUGRAPH_SUCCESS\n\n @return error code"]
387    pub fn cugraph_graph_create_sg(
388        handle: *const cugraph_resource_handle_t,
389        properties: *const cugraph_graph_properties_t,
390        vertices: *const cugraph_type_erased_device_array_view_t,
391        src: *const cugraph_type_erased_device_array_view_t,
392        dst: *const cugraph_type_erased_device_array_view_t,
393        weights: *const cugraph_type_erased_device_array_view_t,
394        edge_ids: *const cugraph_type_erased_device_array_view_t,
395        edge_type_ids: *const cugraph_type_erased_device_array_view_t,
396        store_transposed: bool_t,
397        renumber: bool_t,
398        drop_self_loops: bool_t,
399        drop_multi_edges: bool_t,
400        symmetrize: bool_t,
401        do_expensive_check: bool_t,
402        graph: *mut *mut cugraph_graph_t,
403        error: *mut *mut cugraph_error_t,
404    ) -> cugraph_error_code_t;
405}
406unsafe extern "C" {
407    #[doc = " @brief     Construct an SG graph\n\n @param [in]  handle         Handle for accessing resources\n @param [in]  properties     Properties of the constructed graph\n @param [in]  vertices       Optional device array containing a list of vertex ids\n                             (specify NULL if we should create vertex ids from the\n                             unique contents of @p src and @p dst)\n @param [in]  src            Device array containing the source vertex ids.\n @param [in]  dst            Device array containing the destination vertex ids\n @param [in]  weights        Device array containing the edge weights.  Note that an unweighted\n                             graph can be created by passing weights == NULL.\n @param [in]  edge_ids       Device array containing the edge ids for each edge.  Optional\nargument that can be NULL if edge ids are not used.\n @param [in]  edge_type_ids  Device array containing the edge types for each edge.  Optional\nargument that can be NULL if edge types are not used.\n @param [in]  edge_start_time_ids   Device array containing the edge start times for each\n edge. Optional argument that can be NULL if edge start times are not used.\n @param [in]  edge_end_time_ids   Device array containing the edge end times for each\n edge. Optional argument that can be NULL if edge end times are not used.\n @param [in]  store_transposed If true create the graph initially in transposed format\n @param [in]  renumber       If true, renumber vertices to make an efficient data structure.\n    If false, do not renumber.  Renumbering enables some significant optimizations within\n    the graph primitives library, so it is strongly encouraged.  Renumbering is required if\n    the vertices are not sequential integer values from 0 to num_vertices.\n @param [in]  drop_self_loops  If true, drop any self loops that exist in the provided edge list.\n @param [in]  drop_multi_edges If true, drop any multi edges that exist in the provided edge list.\n    Note that setting this flag will arbitrarily select one instance of a multi edge to be the\n    edge that survives.  If the edges have properties that should be honored (e.g. sum the\nweights,\n    or take the maximum weight), the caller should remove specific edges themselves and not rely\n    on this flag.\n @param [in] symmetrize      If true, symmetrize the edgelist. The symmetrization of edges\n with edge_ids and/or edge_type_ids is currently not supported.\n @param [in]  do_expensive_check    If true, do expensive checks to validate the input data\n    is consistent with software assumptions.  If false bypass these checks.\n @param [out] graph          A pointer to the graph object\n @param [out] error          Pointer to an error object storing details of any error.  Will\n                             be populated if error code is not CUGRAPH_SUCCESS\n\n @return error code"]
408    pub fn cugraph_graph_create_with_times_sg(
409        handle: *const cugraph_resource_handle_t,
410        properties: *const cugraph_graph_properties_t,
411        vertices: *const cugraph_type_erased_device_array_view_t,
412        src: *const cugraph_type_erased_device_array_view_t,
413        dst: *const cugraph_type_erased_device_array_view_t,
414        weights: *const cugraph_type_erased_device_array_view_t,
415        edge_ids: *const cugraph_type_erased_device_array_view_t,
416        edge_type_ids: *const cugraph_type_erased_device_array_view_t,
417        edge_start_time_ids: *const cugraph_type_erased_device_array_view_t,
418        edge_end_time_ids: *const cugraph_type_erased_device_array_view_t,
419        store_transposed: bool_t,
420        renumber: bool_t,
421        drop_self_loops: bool_t,
422        drop_multi_edges: bool_t,
423        symmetrize: bool_t,
424        do_expensive_check: bool_t,
425        graph: *mut *mut cugraph_graph_t,
426        error: *mut *mut cugraph_error_t,
427    ) -> cugraph_error_code_t;
428}
429unsafe extern "C" {
430    #[doc = " @brief     Construct an SG graph from a CSR input\n\n @param [in]  handle         Handle for accessing resources\n @param [in]  properties     Properties of the constructed graph\n @param [in]  offsets        Device array containing the CSR offsets array\n @param [in]  indices        Device array containing the destination vertex ids\n @param [in]  weights        Device array containing the edge weights.  Note that an unweighted\n                             graph can be created by passing weights == NULL.\n @param [in]  edge_ids       Device array containing the edge ids for each edge.  Optional\nargument that can be NULL if edge ids are not used.\n @param [in]  edge_type_ids  Device array containing the edge types for each edge.  Optional\nargument that can be NULL if edge types are not used.\n @param [in]  store_transposed If true create the graph initially in transposed format\n @param [in]  renumber       If true, renumber vertices to make an efficient data structure.\n    If false, do not renumber.  Renumbering enables some significant optimizations within\n    the graph primitives library, so it is strongly encouraged.  Renumbering is required if\n    the vertices are not sequential integer values from 0 to num_vertices.\n @param [in]  symmetrize     If true, symmetrize the edgelist. The symmetrization of edges\n with edge_ids and/or edge_type_ids is currently not supported.\n @param [in]  do_expensive_check    If true, do expensive checks to validate the input data\n    is consistent with software assumptions.  If false bypass these checks.\n @param [out] graph          A pointer to the graph object\n @param [out] error          Pointer to an error object storing details of any error.  Will\n                             be populated if error code is not CUGRAPH_SUCCESS\n\n @return error code"]
431    pub fn cugraph_graph_create_sg_from_csr(
432        handle: *const cugraph_resource_handle_t,
433        properties: *const cugraph_graph_properties_t,
434        offsets: *const cugraph_type_erased_device_array_view_t,
435        indices: *const cugraph_type_erased_device_array_view_t,
436        weights: *const cugraph_type_erased_device_array_view_t,
437        edge_ids: *const cugraph_type_erased_device_array_view_t,
438        edge_type_ids: *const cugraph_type_erased_device_array_view_t,
439        store_transposed: bool_t,
440        renumber: bool_t,
441        symmetrize: bool_t,
442        do_expensive_check: bool_t,
443        graph: *mut *mut cugraph_graph_t,
444        error: *mut *mut cugraph_error_t,
445    ) -> cugraph_error_code_t;
446}
447unsafe extern "C" {
448    #[doc = " @brief     Construct an MG graph\n\n @deprecated Use cugraph_graph_create_with_times_mg instead\n\n @param [in]  handle          Handle for accessing resources\n @param [in]  properties      Properties of the constructed graph\n @param [in]  vertices        List of device arrays containing the unique vertex ids.\n                              If NULL we will construct this internally using the unique\n                              entries specified in src and dst\n                              All entries in this list will be concatenated on this GPU\n                              into a single array.\n @param [in]  src             List of device array containing the source vertex ids\n                              All entries in this list will be concatenated on this GPU\n                              into a single array.\n @param [in]  dst             List of device array containing the destination vertex ids\n                              All entries in this list will be concatenated on this GPU\n                              into a single array.\n @param [in]  weights         List of device array containing the edge weights.  Note that an\n unweighted graph can be created by passing weights == NULL.  If a weighted graph is to be\n created, the weights device array should be created on each rank, but the pointer can be NULL and\n the size 0 if there are no inputs provided by this rank All entries in this list will be\n concatenated on this GPU into a single array.\n @param [in]  edge_ids        List of device array containing the edge ids for each edge. Optional\n                              argument that can be NULL if edge ids are not used.\n                              All entries in this list will be concatenated on this GPU\n                              into a single array.\n @param [in]  edge_type_ids   List of device array containing the edge types for each edge.\n Optional argument that can be NULL if edge types are not used. All entries in this list will be\n concatenated on this GPU into a single array.\n @param [in]  store_transposed If true create the graph initially in transposed format\n @param [in]  num_arrays      The number of arrays specified in @p vertices, @p src, @p dst, @p\n                              weights, @p edge_ids and @p edge_type_ids\n @param [in]  drop_self_loops  If true, drop any self loops that exist in the provided edge list.\n @param [in]  drop_multi_edges If true, drop any multi edges that exist in the provided edge list.\n    Note that setting this flag will arbitrarily select one instance of a multi edge to be the\n    edge that survives.  If the edges have properties that should be honored (e.g. sum the\n weights, or take the maximum weight), the caller should do that on not rely on this flag.\n @param [in]  symmetrize      If true, symmetrize the edgelist. The symmetrization of edges\n with edge_ids and/or edge_type_ids is currently not supported.\n @param [in]  do_expensive_check  If true, do expensive checks to validate the input data\n    is consistent with software assumptions.  If false bypass these checks.\n @param [out] graph           A pointer to the graph object\n @param [out] error           Pointer to an error object storing details of any error.  Will\n                              be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
449    pub fn cugraph_graph_create_mg(
450        handle: *const cugraph_resource_handle_t,
451        properties: *const cugraph_graph_properties_t,
452        vertices: *const *const cugraph_type_erased_device_array_view_t,
453        src: *const *const cugraph_type_erased_device_array_view_t,
454        dst: *const *const cugraph_type_erased_device_array_view_t,
455        weights: *const *const cugraph_type_erased_device_array_view_t,
456        edge_ids: *const *const cugraph_type_erased_device_array_view_t,
457        edge_type_ids: *const *const cugraph_type_erased_device_array_view_t,
458        store_transposed: bool_t,
459        num_arrays: usize,
460        drop_self_loops: bool_t,
461        drop_multi_edges: bool_t,
462        symmetrize: bool_t,
463        do_expensive_check: bool_t,
464        graph: *mut *mut cugraph_graph_t,
465        error: *mut *mut cugraph_error_t,
466    ) -> cugraph_error_code_t;
467}
468unsafe extern "C" {
469    #[doc = " @brief     Construct an MG graph\n\n @param [in]  handle          Handle for accessing resources\n @param [in]  properties      Properties of the constructed graph\n @param [in]  vertices        List of device arrays containing the unique vertex ids.\n                              If NULL we will construct this internally using the unique\n                              entries specified in src and dst\n                              All entries in this list will be concatenated on this GPU\n                              into a single array.\n @param [in]  src             List of device array containing the source vertex ids\n                              All entries in this list will be concatenated on this GPU\n                              into a single array.\n @param [in]  dst             List of device array containing the destination vertex ids\n                              All entries in this list will be concatenated on this GPU\n                              into a single array.\n @param [in]  weights         List of device array containing the edge weights.  Note that an\n unweighted graph can be created by passing weights == NULL.  If a weighted graph is to be\n created, the weights device array should be created on each rank, but the pointer can be NULL and\n the size 0 if there are no inputs provided by this rank All entries in this list will be\n concatenated on this GPU into a single array.\n @param [in]  edge_ids        List of device array containing the edge ids for each edge. Optional\n                              argument that can be NULL if edge ids are not used.\n                              All entries in this list will be concatenated on this GPU\n                              into a single array.\n @param [in]  edge_type_ids   List of device array containing the edge types for each edge.\n Optional argument that can be NULL if edge types are not used. All entries in this list will be\n concatenated on this GPU into a single array.\n @param [in]  edge_type_ids   List of device array containing the edge types for each edge.\n Optional argument that can be NULL if edge types are not used. All entries in this list will be\n concatenated on this GPU into a single array.\n @param [in]  edge_start_time_ids   List of device array containing the edge start times for each\n edge. Optional argument that can be NULL if edge start times are not used. All entries in this\n list will be concatenated on this GPU into a single array.\n @param [in]  edge_end_time_ids   List of device array containing the edge end times for each\n edge. Optional argument that can be NULL if edge end times are not used. All entries in this list\n will be concatenated on this GPU into a single array.\n @param [in]  store_transposed If true create the graph initially in transposed format\n @param [in]  num_arrays      The number of arrays specified in @p vertices, @p src, @p dst, @p\n                              weights, @p edge_ids and @p edge_type_ids\n @param [in]  drop_self_loops  If true, drop any self loops that exist in the provided edge list.\n @param [in]  drop_multi_edges If true, drop any multi edges that exist in the provided edge list.\n    Note that setting this flag will arbitrarily select one instance of a multi edge to be the\n    edge that survives.  If the edges have properties that should be honored (e.g. sum the\n weights, or take the maximum weight), the caller should do that on not rely on this flag.\n @param [in]  symmetrize      If true, symmetrize the edgelist. The symmetrization of edges\n with edge_ids and/or edge_type_ids is currently not supported.\n @param [in]  do_expensive_check  If true, do expensive checks to validate the input data\n    is consistent with software assumptions.  If false bypass these checks.\n @param [out] graph           A pointer to the graph object\n @param [out] error           Pointer to an error object storing details of any error.  Will\n                              be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
470    pub fn cugraph_graph_create_with_times_mg(
471        handle: *const cugraph_resource_handle_t,
472        properties: *const cugraph_graph_properties_t,
473        vertices: *const *const cugraph_type_erased_device_array_view_t,
474        src: *const *const cugraph_type_erased_device_array_view_t,
475        dst: *const *const cugraph_type_erased_device_array_view_t,
476        weights: *const *const cugraph_type_erased_device_array_view_t,
477        edge_ids: *const *const cugraph_type_erased_device_array_view_t,
478        edge_type_ids: *const *const cugraph_type_erased_device_array_view_t,
479        edge_start_time_ids: *const *const cugraph_type_erased_device_array_view_t,
480        edge_end_time_ids: *const *const cugraph_type_erased_device_array_view_t,
481        store_transposed: bool_t,
482        num_arrays: usize,
483        drop_self_loops: bool_t,
484        drop_multi_edges: bool_t,
485        symmetrize: bool_t,
486        do_expensive_check: bool_t,
487        graph: *mut *mut cugraph_graph_t,
488        error: *mut *mut cugraph_error_t,
489    ) -> cugraph_error_code_t;
490}
491unsafe extern "C" {
492    #[doc = " @brief     Destroy an graph\n\n @param [in]  graph  A pointer to the graph object to destroy"]
493    pub fn cugraph_graph_free(graph: *mut cugraph_graph_t);
494}
495unsafe extern "C" {
496    #[doc = " @brief     Create a data mask\n\n @param [in]  handle          Handle for accessing resources\n @param [in]  vertex_bit_mask Device array containing vertex bit mask\n @param [in]  edge_bit_mask   Device array containing edge bit mask\n @param [in]  complement      If true, a 0 in one of the bit masks implies\n                              the vertex/edge should be included and a 1 should\n                              be excluded.  If false a 1 in one of the bit masks\n                              implies the vertex/edge should be included and a 0\n                              should be excluded.\n @param [out] mask            An opaque pointer to the constructed mask object\n @param [out] error           Pointer to an error object storing details of any error.  Will\n                              be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
497    pub fn cugraph_data_mask_create(
498        handle: *const cugraph_resource_handle_t,
499        vertex_bit_mask: *const cugraph_type_erased_device_array_view_t,
500        edge_bit_mask: *const cugraph_type_erased_device_array_view_t,
501        complement: bool_t,
502        mask: *mut *mut cugraph_data_mask_t,
503        error: *mut *mut cugraph_error_t,
504    ) -> cugraph_error_code_t;
505}
506unsafe extern "C" {
507    #[doc = " @brief     Get the data mask currently associated with a graph\n\n @param [in]  graph       The input graph\n @param [out] mask        Opaque pointer where we should store the\n                          current mask.  Will be NULL if there is no mask\n                          currently assigned to the graph.\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
508    pub fn cugraph_graph_get_data_mask(
509        graph: *mut cugraph_graph_t,
510        mask: *mut *mut cugraph_data_mask_t,
511        error: *mut *mut cugraph_error_t,
512    ) -> cugraph_error_code_t;
513}
514unsafe extern "C" {
515    #[doc = " @brief     Associate a data mask with a graph\n\n NOTE: This function will fail if there is already a data mask associated with this graph\n\n @param [in]  graph       The input graph\n @param [out] mask        Opaque pointer of the new data mask\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
516    pub fn cugraph_graph_add_data_mask(
517        graph: *mut cugraph_graph_t,
518        mask: *mut cugraph_data_mask_t,
519        error: *mut *mut cugraph_error_t,
520    ) -> cugraph_error_code_t;
521}
522unsafe extern "C" {
523    #[doc = " @brief     Release the data mask currently associated with a graph\n\n This function will remove the associated of the current data mask\n with this graph.  The caller will be responsible for destroying the data\n mask using graph_data_mask_destroy.\n\n If this function is not called and the graph is destroyed, the act of destroying\n the graph will also destroy the data mask.\n\n If this function is called on a graph that is not currently associated with\n a graph, then the mask will be set to NULL.\n\n @param [in]  graph       The input graph\n @param [out] mask        Opaque pointer where we should store the\n                          current mask.\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
524    pub fn cugraph_graph_release_data_mask(
525        graph: *mut cugraph_graph_t,
526        mask: *mut *mut cugraph_data_mask_t,
527        error: *mut *mut cugraph_error_t,
528    ) -> cugraph_error_code_t;
529}
530unsafe extern "C" {
531    #[doc = " @brief     Destroy a data mask\n\n @param [in]  mask  A pointer to the data mask to destroy"]
532    pub fn cugraph_data_mask_destroy(mask: *mut cugraph_data_mask_t);
533}
534#[repr(C)]
535#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
536pub struct cugraph_rng_state_t {
537    pub align_: i32,
538}
539#[allow(clippy::unnecessary_operation, clippy::identity_op)]
540const _: () = {
541    ["Size of cugraph_rng_state_t"][::std::mem::size_of::<cugraph_rng_state_t>() - 4usize];
542    ["Alignment of cugraph_rng_state_t"][::std::mem::align_of::<cugraph_rng_state_t>() - 4usize];
543    ["Offset of field: cugraph_rng_state_t::align_"][::std::mem::offset_of!(cugraph_rng_state_t, align_) - 0usize];
544};
545unsafe extern "C" {
546    #[doc = " @brief     Create a Random Number Generator State\n\n @param [in]  seed        Initial value for seed.  In MG this should be different\n                          on each GPU\n @param [out] state       Pointer to the location to store the pointer to the RngState\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
547    pub fn cugraph_rng_state_create(
548        handle: *const cugraph_resource_handle_t,
549        seed: u64,
550        state: *mut *mut cugraph_rng_state_t,
551        error: *mut *mut cugraph_error_t,
552    ) -> cugraph_error_code_t;
553}
554unsafe extern "C" {
555    #[doc = " @brief    Destroy a Random Number Generator State\n\n @param [in]  p    Pointer to the Random Number Generator State"]
556    pub fn cugraph_rng_state_free(p: *mut cugraph_rng_state_t);
557}
558#[doc = " @brief     Opaque centrality result type"]
559#[repr(C)]
560#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
561pub struct cugraph_centrality_result_t {
562    pub align_: i32,
563}
564#[allow(clippy::unnecessary_operation, clippy::identity_op)]
565const _: () = {
566    ["Size of cugraph_centrality_result_t"][::std::mem::size_of::<cugraph_centrality_result_t>() - 4usize];
567    ["Alignment of cugraph_centrality_result_t"][::std::mem::align_of::<cugraph_centrality_result_t>() - 4usize];
568    ["Offset of field: cugraph_centrality_result_t::align_"]
569        [::std::mem::offset_of!(cugraph_centrality_result_t, align_) - 0usize];
570};
571unsafe extern "C" {
572    #[doc = " @ingroup centrality\n @brief   Get the vertex ids from the centrality result\n\n @param [in]   result   The result from a centrality algorithm\n @return type erased array of vertex ids"]
573    pub fn cugraph_centrality_result_get_vertices(
574        result: *mut cugraph_centrality_result_t,
575    ) -> *mut cugraph_type_erased_device_array_view_t;
576}
577unsafe extern "C" {
578    #[doc = " @ingroup centrality\n @brief   Get the centrality values from a centrality algorithm result\n\n @param [in]   result   The result from a centrality algorithm\n @return type erased array view of centrality values"]
579    pub fn cugraph_centrality_result_get_values(
580        result: *mut cugraph_centrality_result_t,
581    ) -> *mut cugraph_type_erased_device_array_view_t;
582}
583unsafe extern "C" {
584    #[doc = " @ingroup centrality\n @brief     Get the number of iterations executed from the algorithm metadata\n\n @param [in]   result   The result from a centrality algorithm\n @return the number of iterations"]
585    pub fn cugraph_centrality_result_get_num_iterations(result: *mut cugraph_centrality_result_t) -> usize;
586}
587unsafe extern "C" {
588    #[doc = " @ingroup centrality\n @brief     Returns true if the centrality algorithm converged\n\n @param [in]   result   The result from a centrality algorithm\n @return True if the centrality algorithm converged, false otherwise"]
589    pub fn cugraph_centrality_result_converged(result: *mut cugraph_centrality_result_t) -> bool_t;
590}
591unsafe extern "C" {
592    #[doc = " @ingroup centrality\n @brief     Free centrality result\n\n @param [in]   result   The result from a centrality algorithm"]
593    pub fn cugraph_centrality_result_free(result: *mut cugraph_centrality_result_t);
594}
595unsafe extern "C" {
596    #[doc = " @brief     Compute pagerank\n\n @param [in]  handle      Handle for accessing resources\n @param [in]  graph       Pointer to graph\n @param [in]  precomputed_vertex_out_weight_vertices\n                          Optionally send in precomputed sum of vertex out weights\n                          (a performance optimization).  This defines the vertices.\n                          Set to NULL if no value is passed.\n @param [in]  precomputed_vertex_out_weight_sums\n                          Optionally send in precomputed sum of vertex out weights\n                          (a performance optimization).  Set to NULL if\n                          no value is passed.\n @param [in]  initial_guess_vertices\n                          Optionally send in an initial guess of the pagerank values\n                          (a performance optimization).  This defines the vertices.\n                          Set to NULL if no value is passed. If NULL, initial PageRank\n                          values are set to 1.0 divided by the number of vertices in\n                          the graph.\n @param [in]  initial_guess_values\n                          Optionally send in an initial guess of the pagerank values\n                          (a performance optimization).  Set to NULL if\n                          no value is passed. If NULL, initial PageRank values are set\n                          to 1.0 divided by the number of vertices in the graph.\n @param [in]  alpha       PageRank damping factor.\n @param [in]  epsilon     Error tolerance to check convergence. Convergence is assumed\n                          if the sum of the differences in PageRank values between two\n                          consecutive iterations is less than the number of vertices\n                          in the graph multiplied by @p epsilon.\n @param [in]  max_iterations Maximum number of PageRank iterations.\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result      Opaque pointer to pagerank results\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
597    pub fn cugraph_pagerank(
598        handle: *const cugraph_resource_handle_t,
599        graph: *mut cugraph_graph_t,
600        precomputed_vertex_out_weight_vertices: *const cugraph_type_erased_device_array_view_t,
601        precomputed_vertex_out_weight_sums: *const cugraph_type_erased_device_array_view_t,
602        initial_guess_vertices: *const cugraph_type_erased_device_array_view_t,
603        initial_guess_values: *const cugraph_type_erased_device_array_view_t,
604        alpha: f64,
605        epsilon: f64,
606        max_iterations: usize,
607        do_expensive_check: bool_t,
608        result: *mut *mut cugraph_centrality_result_t,
609        error: *mut *mut cugraph_error_t,
610    ) -> cugraph_error_code_t;
611}
612unsafe extern "C" {
613    #[doc = " @brief     Compute pagerank\n\n @deprecated This version of pagerank should be dropped in favor\n             of the cugraph_pagerank_allow_nonconvergence version.\n             Eventually that version will be renamed to this version.\n\n @param [in]  handle      Handle for accessing resources\n @param [in]  graph       Pointer to graph\n @param [in]  precomputed_vertex_out_weight_vertices\n                          Optionally send in precomputed sum of vertex out weights\n                          (a performance optimization).  This defines the vertices.\n                          Set to NULL if no value is passed.\n @param [in]  precomputed_vertex_out_weight_sums\n                          Optionally send in precomputed sum of vertex out weights\n                          (a performance optimization).  Set to NULL if\n                          no value is passed.\n @param [in]  initial_guess_vertices\n                          Optionally send in an initial guess of the pagerank values\n                          (a performance optimization).  This defines the vertices.\n                          Set to NULL if no value is passed. If NULL, initial PageRank\n                          values are set to 1.0 divided by the number of vertices in\n                          the graph.\n @param [in]  initial_guess_values\n                          Optionally send in an initial guess of the pagerank values\n                          (a performance optimization).  Set to NULL if\n                          no value is passed. If NULL, initial PageRank values are set\n                          to 1.0 divided by the number of vertices in the graph.\n @param [in]  alpha       PageRank damping factor.\n @param [in]  epsilon     Error tolerance to check convergence. Convergence is assumed\n                          if the sum of the differences in PageRank values between two\n                          consecutive iterations is less than the number of vertices\n                          in the graph multiplied by @p epsilon.\n @param [in]  max_iterations Maximum number of PageRank iterations.\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result      Opaque pointer to pagerank results\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
614    pub fn cugraph_pagerank_allow_nonconvergence(
615        handle: *const cugraph_resource_handle_t,
616        graph: *mut cugraph_graph_t,
617        precomputed_vertex_out_weight_vertices: *const cugraph_type_erased_device_array_view_t,
618        precomputed_vertex_out_weight_sums: *const cugraph_type_erased_device_array_view_t,
619        initial_guess_vertices: *const cugraph_type_erased_device_array_view_t,
620        initial_guess_values: *const cugraph_type_erased_device_array_view_t,
621        alpha: f64,
622        epsilon: f64,
623        max_iterations: usize,
624        do_expensive_check: bool_t,
625        result: *mut *mut cugraph_centrality_result_t,
626        error: *mut *mut cugraph_error_t,
627    ) -> cugraph_error_code_t;
628}
629unsafe extern "C" {
630    #[doc = " @brief     Compute personalized pagerank\n\n @deprecated This version of personalized pagerank should be dropped in favor\n             of the cugraph_personalized_pagerank_allow_nonconvergence version.\n             Eventually that version will be renamed to this version.\n\n @param [in]  handle      Handle for accessing resources\n @param [in]  graph       Pointer to graph\n @param [in]  precomputed_vertex_out_weight_vertices\n                          Optionally send in precomputed sum of vertex out weights\n                          (a performance optimization).  This defines the vertices.\n                          Set to NULL if no value is passed.\n @param [in]  precomputed_vertex_out_weight_sums\n                          Optionally send in precomputed sum of vertex out weights\n                          (a performance optimization).  Set to NULL if\n                          no value is passed.\n @param [in]  initial_guess_vertices\n                          Optionally send in an initial guess of the pagerank values\n                          (a performance optimization).  This defines the vertices.\n                          Set to NULL if no value is passed. If NULL, initial PageRank\n                          values are set to 1.0 divided by the number of vertices in\n                          the graph.\n @param [in]  initial_guess_values\n                          Optionally send in an initial guess of the pagerank values\n                          (a performance optimization).  Set to NULL if\n                          no value is passed. If NULL, initial PageRank values are set\n                          to 1.0 divided by the number of vertices in the graph.\n @param [in]  personalization_vertices Pointer to an array storing personalization vertex\n identifiers (compute personalized PageRank).\n @param [in]  personalization_values Pointer to an array storing personalization values for the\n vertices in the personalization set.\n @param [in]  alpha       PageRank damping factor.\n @param [in]  epsilon     Error tolerance to check convergence. Convergence is assumed\n                          if the sum of the differences in PageRank values between two\n                          consecutive iterations is less than the number of vertices\n                          in the graph multiplied by @p epsilon.\n @param [in]  max_iterations Maximum number of PageRank iterations.\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result      Opaque pointer to pagerank results\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
631    pub fn cugraph_personalized_pagerank(
632        handle: *const cugraph_resource_handle_t,
633        graph: *mut cugraph_graph_t,
634        precomputed_vertex_out_weight_vertices: *const cugraph_type_erased_device_array_view_t,
635        precomputed_vertex_out_weight_sums: *const cugraph_type_erased_device_array_view_t,
636        initial_guess_vertices: *const cugraph_type_erased_device_array_view_t,
637        initial_guess_values: *const cugraph_type_erased_device_array_view_t,
638        personalization_vertices: *const cugraph_type_erased_device_array_view_t,
639        personalization_values: *const cugraph_type_erased_device_array_view_t,
640        alpha: f64,
641        epsilon: f64,
642        max_iterations: usize,
643        do_expensive_check: bool_t,
644        result: *mut *mut cugraph_centrality_result_t,
645        error: *mut *mut cugraph_error_t,
646    ) -> cugraph_error_code_t;
647}
648unsafe extern "C" {
649    #[doc = " @brief     Compute personalized pagerank\n\n @param [in]  handle      Handle for accessing resources\n @param [in]  graph       Pointer to graph\n @param [in]  precomputed_vertex_out_weight_vertices\n                          Optionally send in precomputed sum of vertex out weights\n                          (a performance optimization).  This defines the vertices.\n                          Set to NULL if no value is passed.\n @param [in]  precomputed_vertex_out_weight_sums\n                          Optionally send in precomputed sum of vertex out weights\n                          (a performance optimization).  Set to NULL if\n                          no value is passed.\n @param [in]  initial_guess_vertices\n                          Optionally send in an initial guess of the pagerank values\n                          (a performance optimization).  This defines the vertices.\n                          Set to NULL if no value is passed. If NULL, initial PageRank\n                          values are set to 1.0 divided by the number of vertices in\n                          the graph.\n @param [in]  initial_guess_values\n                          Optionally send in an initial guess of the pagerank values\n                          (a performance optimization).  Set to NULL if\n                          no value is passed. If NULL, initial PageRank values are set\n                          to 1.0 divided by the number of vertices in the graph.\n @param [in]  personalization_vertices Pointer to an array storing personalization vertex\n identifiers (compute personalized PageRank).\n @param [in]  personalization_values Pointer to an array storing personalization values for the\n vertices in the personalization set.\n @param [in]  alpha       PageRank damping factor.\n @param [in]  epsilon     Error tolerance to check convergence. Convergence is assumed\n                          if the sum of the differences in PageRank values between two\n                          consecutive iterations is less than the number of vertices\n                          in the graph multiplied by @p epsilon.\n @param [in]  max_iterations Maximum number of PageRank iterations.\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result      Opaque pointer to pagerank results\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
650    pub fn cugraph_personalized_pagerank_allow_nonconvergence(
651        handle: *const cugraph_resource_handle_t,
652        graph: *mut cugraph_graph_t,
653        precomputed_vertex_out_weight_vertices: *const cugraph_type_erased_device_array_view_t,
654        precomputed_vertex_out_weight_sums: *const cugraph_type_erased_device_array_view_t,
655        initial_guess_vertices: *const cugraph_type_erased_device_array_view_t,
656        initial_guess_values: *const cugraph_type_erased_device_array_view_t,
657        personalization_vertices: *const cugraph_type_erased_device_array_view_t,
658        personalization_values: *const cugraph_type_erased_device_array_view_t,
659        alpha: f64,
660        epsilon: f64,
661        max_iterations: usize,
662        do_expensive_check: bool_t,
663        result: *mut *mut cugraph_centrality_result_t,
664        error: *mut *mut cugraph_error_t,
665    ) -> cugraph_error_code_t;
666}
667unsafe extern "C" {
668    #[doc = " @brief     Compute eigenvector centrality\n\n Computed using the power method.\n\n @param [in]  handle      Handle for accessing resources\n @param [in]  graph       Pointer to graph\n @param [in]  epsilon     Error tolerance to check convergence. Convergence is measured\n                          comparing the L1 norm until it is less than epsilon\n @param [in]  max_iterations Maximum number of power iterations, will not exceed this number\n                          of iterations even if we haven't converged\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result      Opaque pointer to eigenvector centrality results\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
669    pub fn cugraph_eigenvector_centrality(
670        handle: *const cugraph_resource_handle_t,
671        graph: *mut cugraph_graph_t,
672        epsilon: f64,
673        max_iterations: usize,
674        do_expensive_check: bool_t,
675        result: *mut *mut cugraph_centrality_result_t,
676        error: *mut *mut cugraph_error_t,
677    ) -> cugraph_error_code_t;
678}
679unsafe extern "C" {
680    pub fn cugraph_eigenvector_centrality_allow_nonconvergence(
681        handle: *const cugraph_resource_handle_t,
682        graph: *mut cugraph_graph_t,
683        epsilon: f64,
684        max_iterations: usize,
685        do_expensive_check: bool_t,
686        result: *mut *mut cugraph_centrality_result_t,
687        error: *mut *mut cugraph_error_t,
688    ) -> cugraph_error_code_t;
689}
690unsafe extern "C" {
691    #[doc = " @brief     Compute katz centrality\n\n @param [in]  handle      Handle for accessing resources\n @param [in]  graph       Pointer to graph\n @param [in]  betas       Optionally send in a device array holding values to be added to\n                          each vertex's new Katz Centrality score in every iteration.\n                          If set to NULL then @p beta is used for all vertices.\n @param [in]  alpha       Katz centrality attenuation factor.  This should be smaller\n                          than the inverse of the maximum eigenvalue of this graph\n @param [in]  beta        Constant value to be added to each vertex's new Katz\n                          Centrality score in every iteration.  Relevant only when\n                          @p betas is NULL\n @param [in]  epsilon     Error tolerance to check convergence. Convergence is assumed\n                          if the sum of the differences in Katz Centrality values between\n                          two consecutive iterations is less than the number of vertices\n                          in the graph multiplied by @p epsilon. (L1-norm)\n @param [in]  max_iterations Maximum number of Katz Centrality iterations.\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result      Opaque pointer to katz centrality results\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
692    pub fn cugraph_katz_centrality(
693        handle: *const cugraph_resource_handle_t,
694        graph: *mut cugraph_graph_t,
695        betas: *const cugraph_type_erased_device_array_view_t,
696        alpha: f64,
697        beta: f64,
698        epsilon: f64,
699        max_iterations: usize,
700        do_expensive_check: bool_t,
701        result: *mut *mut cugraph_centrality_result_t,
702        error: *mut *mut cugraph_error_t,
703    ) -> cugraph_error_code_t;
704}
705unsafe extern "C" {
706    #[doc = " @brief     Compute katz centrality, reporting non-convergence in the result\n\n Takes the arguments of cugraph_katz_centrality. Instead of failing when the iteration does not\n converge within @p max_iterations, it returns a result whose\n cugraph_centrality_result_converged is false and whose values are the last iteration without\n normalization; a diverging iteration (an @p alpha above the inverse of the largest adjacency\n eigenvalue) can leave them non-finite."]
707    pub fn cugraph_katz_centrality_allow_nonconvergence(
708        handle: *const cugraph_resource_handle_t,
709        graph: *mut cugraph_graph_t,
710        betas: *const cugraph_type_erased_device_array_view_t,
711        alpha: f64,
712        beta: f64,
713        epsilon: f64,
714        max_iterations: usize,
715        do_expensive_check: bool_t,
716        result: *mut *mut cugraph_centrality_result_t,
717        error: *mut *mut cugraph_error_t,
718    ) -> cugraph_error_code_t;
719}
720unsafe extern "C" {
721    #[doc = " @brief     Compute betweenness centrality\n\n Betweenness can be computed exactly by specifying vertex_list as NULL.  This will compute\n betweenness centrality by doing a traversal from every source vertex.\n\n Approximate betweenness can be computed specifying a list of vertices that should be\n used as seeds for the traversals.  Note that the function cugraph_select_random_vertices can be\n used to create a list of seeds.\n\n @param [in]  handle             Handle for accessing resources\n @param [in]  graph              Pointer to graph\n @param [in]  vertex_list        Optionally specify a device array containing a list of vertices\n                                 to use as seeds for betweenness centrality approximation\n @param [in]  normalized         Normalize\n @param [in]  include_endpoints  The traditional formulation of betweenness centrality does not\n                                 include endpoints when considering a vertex to be on a shortest\n                                 path.  Setting this to true will consider the endpoints of a\n                                 path to be part of the path.\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result             Opaque pointer to betweenness centrality results\n @param [out] error              Pointer to an error object storing details of any error.  Will\n                                 be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
722    pub fn cugraph_betweenness_centrality(
723        handle: *const cugraph_resource_handle_t,
724        graph: *mut cugraph_graph_t,
725        vertex_list: *const cugraph_type_erased_device_array_view_t,
726        normalized: bool_t,
727        include_endpoints: bool_t,
728        do_expensive_check: bool_t,
729        result: *mut *mut cugraph_centrality_result_t,
730        error: *mut *mut cugraph_error_t,
731    ) -> cugraph_error_code_t;
732}
733#[doc = " @brief     Opaque edge centrality result type"]
734#[repr(C)]
735#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
736pub struct cugraph_edge_centrality_result_t {
737    pub align_: i32,
738}
739#[allow(clippy::unnecessary_operation, clippy::identity_op)]
740const _: () = {
741    ["Size of cugraph_edge_centrality_result_t"][::std::mem::size_of::<cugraph_edge_centrality_result_t>() - 4usize];
742    ["Alignment of cugraph_edge_centrality_result_t"]
743        [::std::mem::align_of::<cugraph_edge_centrality_result_t>() - 4usize];
744    ["Offset of field: cugraph_edge_centrality_result_t::align_"]
745        [::std::mem::offset_of!(cugraph_edge_centrality_result_t, align_) - 0usize];
746};
747unsafe extern "C" {
748    #[doc = " @ingroup centrality\n @brief     Get the src vertex ids from an edge centrality result\n\n @param [in]   result   The result from an edge centrality algorithm\n @return type erased array of src vertex ids"]
749    pub fn cugraph_edge_centrality_result_get_src_vertices(
750        result: *mut cugraph_edge_centrality_result_t,
751    ) -> *mut cugraph_type_erased_device_array_view_t;
752}
753unsafe extern "C" {
754    #[doc = " @ingroup centrality\n @brief     Get the dst vertex ids from an edge centrality result\n\n @param [in]   result   The result from an edge centrality algorithm\n @return type erased array of dst vertex ids"]
755    pub fn cugraph_edge_centrality_result_get_dst_vertices(
756        result: *mut cugraph_edge_centrality_result_t,
757    ) -> *mut cugraph_type_erased_device_array_view_t;
758}
759unsafe extern "C" {
760    #[doc = " @ingroup centrality\n @brief     Get the edge ids from an edge centrality result\n\n @param [in]   result   The result from an edge centrality algorithm\n @return type erased array of edge ids"]
761    pub fn cugraph_edge_centrality_result_get_edge_ids(
762        result: *mut cugraph_edge_centrality_result_t,
763    ) -> *mut cugraph_type_erased_device_array_view_t;
764}
765unsafe extern "C" {
766    #[doc = " @ingroup centrality\n @brief     Get the centrality values from an edge centrality algorithm result\n\n @param [in]   result   The result from an edge centrality algorithm\n @return type erased array view of centrality values"]
767    pub fn cugraph_edge_centrality_result_get_values(
768        result: *mut cugraph_edge_centrality_result_t,
769    ) -> *mut cugraph_type_erased_device_array_view_t;
770}
771unsafe extern "C" {
772    #[doc = " @ingroup centrality\n @brief     Free centrality result\n\n @param [in]   result   The result from a centrality algorithm"]
773    pub fn cugraph_edge_centrality_result_free(result: *mut cugraph_edge_centrality_result_t);
774}
775unsafe extern "C" {
776    #[doc = " @brief     Compute edge betweenness centrality\n\n Edge betweenness can be computed exactly by specifying vertex_list as NULL.  This will compute\n betweenness centrality by doing a traversal from every vertex and counting the frequency that a\n edge appears on a shortest path.\n\n Approximate betweenness can be computed specifying a list of vertices that should be\n used as seeds for the traversals.  Note that the function cugraph_select_random_vertices can be\n used to create a list of seeds.\n\n @param [in]  handle             Handle for accessing resources\n @param [in]  graph              Pointer to graph\n @param [in]  vertex_list        Optionally specify a device array containing a list of vertices\n                                 to use as seeds for betweenness centrality approximation\n @param [in]  normalized         Normalize\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result             Opaque pointer to edge betweenness centrality results\n @param [out] error              Pointer to an error object storing details of any error.  Will\n                                 be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
777    pub fn cugraph_edge_betweenness_centrality(
778        handle: *const cugraph_resource_handle_t,
779        graph: *mut cugraph_graph_t,
780        vertex_list: *const cugraph_type_erased_device_array_view_t,
781        normalized: bool_t,
782        do_expensive_check: bool_t,
783        result: *mut *mut cugraph_edge_centrality_result_t,
784        error: *mut *mut cugraph_error_t,
785    ) -> cugraph_error_code_t;
786}
787#[doc = " @brief     Opaque hits result type"]
788#[repr(C)]
789#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
790pub struct cugraph_hits_result_t {
791    pub align_: i32,
792}
793#[allow(clippy::unnecessary_operation, clippy::identity_op)]
794const _: () = {
795    ["Size of cugraph_hits_result_t"][::std::mem::size_of::<cugraph_hits_result_t>() - 4usize];
796    ["Alignment of cugraph_hits_result_t"][::std::mem::align_of::<cugraph_hits_result_t>() - 4usize];
797    ["Offset of field: cugraph_hits_result_t::align_"][::std::mem::offset_of!(cugraph_hits_result_t, align_) - 0usize];
798};
799unsafe extern "C" {
800    #[doc = " @ingroup centrality\n @brief     Get the vertex ids from the hits result\n\n @param [in]   result   The result from hits\n @return type erased array of vertex ids"]
801    pub fn cugraph_hits_result_get_vertices(
802        result: *mut cugraph_hits_result_t,
803    ) -> *mut cugraph_type_erased_device_array_view_t;
804}
805unsafe extern "C" {
806    #[doc = " @ingroup centrality\n @brief     Get the hubs values from the hits result\n\n @param [in]   result   The result from hits\n @return type erased array of hubs values"]
807    pub fn cugraph_hits_result_get_hubs(
808        result: *mut cugraph_hits_result_t,
809    ) -> *mut cugraph_type_erased_device_array_view_t;
810}
811unsafe extern "C" {
812    #[doc = " @ingroup centrality\n @brief     Get the authorities values from the hits result\n\n @param [in]   result   The result from hits\n @return type erased array of authorities values"]
813    pub fn cugraph_hits_result_get_authorities(
814        result: *mut cugraph_hits_result_t,
815    ) -> *mut cugraph_type_erased_device_array_view_t;
816}
817unsafe extern "C" {
818    #[doc = " @ingroup centrality\n @brief   Get the score differences between the last two iterations\n\n @param [in]   result   The result from hits\n @return score differences"]
819    pub fn cugraph_hits_result_get_hub_score_differences(result: *mut cugraph_hits_result_t) -> f64;
820}
821unsafe extern "C" {
822    #[doc = " @ingroup centrality\n @brief   Get the actual number of iterations\n\n @param [in]   result   The result from hits\n @return actual number of iterations"]
823    pub fn cugraph_hits_result_get_number_of_iterations(result: *mut cugraph_hits_result_t) -> usize;
824}
825unsafe extern "C" {
826    #[doc = " @ingroup centrality\n @brief     Returns true if hits converged\n\n @param [in]   result   The result from hits\n @return True if hits converged within its maximum iterations, false otherwise"]
827    pub fn cugraph_hits_result_converged(result: *mut cugraph_hits_result_t) -> bool_t;
828}
829unsafe extern "C" {
830    #[doc = " @ingroup centrality\n @brief     Free hits result\n\n @param [in]   result   The result from hits"]
831    pub fn cugraph_hits_result_free(result: *mut cugraph_hits_result_t);
832}
833unsafe extern "C" {
834    #[doc = " @brief     Compute hits\n\n @param [in]  handle      Handle for accessing resources\n @param [in]  graph       Pointer to graph\n @param [in]  epsilon     Error tolerance to check convergence. Convergence is assumed\n                          if the sum of the differences in Hits values between two\n                          consecutive iterations is less than the number of vertices\n                          in the graph multiplied by @p epsilon.\n @param [in]  max_iterations\n                          Maximum number of Hits iterations.\n @param [in]  initial_hubs_guess_vertices\n                          Pointer to optional type erased device array containing\n                          the vertex ids for an initial hubs guess.  If set to NULL\n                          there is no initial guess.\n @param [in]  initial_hubs_guess_values\n                          Pointer to optional type erased device array containing\n                          the values for an initial hubs guess.  If set to NULL\n                          there is no initial guess.  Note that both\n                          @p initial_hubs_guess_vertices and @p initial_hubs_guess_values\n                          have to be specified (or they both have to be NULL).  Otherwise\n                          this will be treated as an error.\n @param [in]  normalize   A flag to normalize the results (if set to `true`)\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result      Opaque pointer to hits results\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
835    pub fn cugraph_hits(
836        handle: *const cugraph_resource_handle_t,
837        graph: *mut cugraph_graph_t,
838        epsilon: f64,
839        max_iterations: usize,
840        initial_hubs_guess_vertices: *const cugraph_type_erased_device_array_view_t,
841        initial_hubs_guess_values: *const cugraph_type_erased_device_array_view_t,
842        normalize: bool_t,
843        do_expensive_check: bool_t,
844        result: *mut *mut cugraph_hits_result_t,
845        error: *mut *mut cugraph_error_t,
846    ) -> cugraph_error_code_t;
847}
848unsafe extern "C" {
849    #[doc = " @brief     Compute hits, reporting non-convergence in the result\n\n Takes the arguments of cugraph_hits. Instead of failing when the iteration does not converge\n within @p max_iterations, it returns a result whose cugraph_hits_result_converged is false and\n whose scores are those of the last iteration."]
850    pub fn cugraph_hits_allow_nonconvergence(
851        handle: *const cugraph_resource_handle_t,
852        graph: *mut cugraph_graph_t,
853        epsilon: f64,
854        max_iterations: usize,
855        initial_hubs_guess_vertices: *const cugraph_type_erased_device_array_view_t,
856        initial_hubs_guess_values: *const cugraph_type_erased_device_array_view_t,
857        normalize: bool_t,
858        do_expensive_check: bool_t,
859        result: *mut *mut cugraph_hits_result_t,
860        error: *mut *mut cugraph_error_t,
861    ) -> cugraph_error_code_t;
862}
863#[doc = " @brief       Opaque vertex pair type"]
864#[repr(C)]
865#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
866pub struct cugraph_vertex_pairs_t {
867    pub align_: i32,
868}
869#[allow(clippy::unnecessary_operation, clippy::identity_op)]
870const _: () = {
871    ["Size of cugraph_vertex_pairs_t"][::std::mem::size_of::<cugraph_vertex_pairs_t>() - 4usize];
872    ["Alignment of cugraph_vertex_pairs_t"][::std::mem::align_of::<cugraph_vertex_pairs_t>() - 4usize];
873    ["Offset of field: cugraph_vertex_pairs_t::align_"]
874        [::std::mem::offset_of!(cugraph_vertex_pairs_t, align_) - 0usize];
875};
876unsafe extern "C" {
877    #[doc = " @brief       Create vertex_pairs\n\n Input data will be shuffled to the proper GPU and stored in the\n output vertex_pairs.\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Graph to operate on\n @param [in]  first        Type erased array of vertex ids for the first vertex of the pair\n @param [in]  second       Type erased array of vertex ids for the second vertex of the pair\n @param [out] vertex_pairs Opaque pointer to vertex_pairs\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
878    pub fn cugraph_create_vertex_pairs(
879        handle: *const cugraph_resource_handle_t,
880        graph: *mut cugraph_graph_t,
881        first: *const cugraph_type_erased_device_array_view_t,
882        second: *const cugraph_type_erased_device_array_view_t,
883        vertex_pairs: *mut *mut cugraph_vertex_pairs_t,
884        error: *mut *mut cugraph_error_t,
885    ) -> cugraph_error_code_t;
886}
887unsafe extern "C" {
888    #[doc = " @brief       Get the first vertex id array\n\n @param [in]     vertex_pairs   A vertex_pairs\n @return type erased array of vertex ids"]
889    pub fn cugraph_vertex_pairs_get_first(
890        vertex_pairs: *mut cugraph_vertex_pairs_t,
891    ) -> *mut cugraph_type_erased_device_array_view_t;
892}
893unsafe extern "C" {
894    #[doc = " @brief       Get the second vertex id array\n\n @param [in]     vertex_pairs   A vertex_pairs\n @return type erased array of vertex ids"]
895    pub fn cugraph_vertex_pairs_get_second(
896        vertex_pairs: *mut cugraph_vertex_pairs_t,
897    ) -> *mut cugraph_type_erased_device_array_view_t;
898}
899unsafe extern "C" {
900    #[doc = " @brief     Free vertex pair\n\n @param [in]    vertex_pairs The vertex pairs"]
901    pub fn cugraph_vertex_pairs_free(vertex_pairs: *mut cugraph_vertex_pairs_t);
902}
903unsafe extern "C" {
904    #[doc = " @brief      Find all 2-hop neighbors in the graph\n\n @param [in]  handle         Handle for accessing resources\n @param [in]  graph          Pointer to graph\n @param [in]  start_vertices Optional type erased array of starting vertices\n                             If NULL use all, if specified compute two-hop\n                             neighbors for these starting vertices\n @param [in]  do_expensive_check\n                             A flag to run expensive checks for input arguments (if set to true)\n @param [out] result         Opaque pointer to resulting vertex pairs\n @param [out] error          Pointer to an error object storing details of any error.  Will\n                             be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
905    pub fn cugraph_two_hop_neighbors(
906        handle: *const cugraph_resource_handle_t,
907        graph: *mut cugraph_graph_t,
908        start_vertices: *const cugraph_type_erased_device_array_view_t,
909        do_expensive_check: bool_t,
910        result: *mut *mut cugraph_vertex_pairs_t,
911        error: *mut *mut cugraph_error_t,
912    ) -> cugraph_error_code_t;
913}
914unsafe extern "C" {
915    #[doc = " @brief      Verify if a vertex exists in the graph\n\n @param [in]  handle         Handle for accessing resources\n @param [in]  graph          Pointer to graph\n @param [in]  vertices       Vertices to be queried\n @param [in]  do_expensive_check\n                             A flag to run expensive checks for input arguments (if set to true)\n @param [out] result         Opaque pointer to resulting queried vertices\n @param [out] error          Pointer to an error object storing details of any error.  Will\n                             be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
916    pub fn cugraph_has_vertex(
917        handle: *const cugraph_resource_handle_t,
918        graph: *mut cugraph_graph_t,
919        vertices: *mut cugraph_type_erased_device_array_view_t,
920        do_expensive_check: bool_t,
921        result: *mut *mut cugraph_type_erased_device_array_t,
922        error: *mut *mut cugraph_error_t,
923    ) -> cugraph_error_code_t;
924}
925#[doc = " @brief       Opaque induced subgraph type\n\n @deprecated  This API will be deleted, use cugraph_edgelist_t"]
926#[repr(C)]
927#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
928pub struct cugraph_induced_subgraph_result_t {
929    pub align_: i32,
930}
931#[allow(clippy::unnecessary_operation, clippy::identity_op)]
932const _: () = {
933    ["Size of cugraph_induced_subgraph_result_t"][::std::mem::size_of::<cugraph_induced_subgraph_result_t>() - 4usize];
934    ["Alignment of cugraph_induced_subgraph_result_t"]
935        [::std::mem::align_of::<cugraph_induced_subgraph_result_t>() - 4usize];
936    ["Offset of field: cugraph_induced_subgraph_result_t::align_"]
937        [::std::mem::offset_of!(cugraph_induced_subgraph_result_t, align_) - 0usize];
938};
939unsafe extern "C" {
940    #[doc = " @brief       Get the source vertex ids\n\n @deprecated  This API will be deleted, use cugraph_edgelist_get_sources\n\n @param [in]     induced_subgraph   Opaque pointer to induced subgraph\n @return type erased array view of source vertex ids"]
941    pub fn cugraph_induced_subgraph_get_sources(
942        induced_subgraph: *mut cugraph_induced_subgraph_result_t,
943    ) -> *mut cugraph_type_erased_device_array_view_t;
944}
945unsafe extern "C" {
946    #[doc = " @brief       Get the destination vertex ids\n\n @deprecated  This API will be deleted, use cugraph_edgelist_get_destinations\n\n @param [in]     induced_subgraph   Opaque pointer to induced subgraph\n @return type erased array view of destination vertex ids"]
947    pub fn cugraph_induced_subgraph_get_destinations(
948        induced_subgraph: *mut cugraph_induced_subgraph_result_t,
949    ) -> *mut cugraph_type_erased_device_array_view_t;
950}
951unsafe extern "C" {
952    #[doc = " @brief       Get the edge weights\n\n @deprecated  This API will be deleted, use cugraph_edgelist_get_edge_weights\n\n @param [in]     induced_subgraph   Opaque pointer to induced subgraph\n @return type erased array view of edge weights"]
953    pub fn cugraph_induced_subgraph_get_edge_weights(
954        induced_subgraph: *mut cugraph_induced_subgraph_result_t,
955    ) -> *mut cugraph_type_erased_device_array_view_t;
956}
957unsafe extern "C" {
958    #[doc = " @brief       Get the edge ids\n\n @deprecated  This API will be deleted, use cugraph_edgelist_get_edge_ids\n\n @param [in]     induced_subgraph   Opaque pointer to induced subgraph\n @return type erased array view of edge ids"]
959    pub fn cugraph_induced_subgraph_get_edge_ids(
960        induced_subgraph: *mut cugraph_induced_subgraph_result_t,
961    ) -> *mut cugraph_type_erased_device_array_view_t;
962}
963unsafe extern "C" {
964    #[doc = " @brief       Get the edge types\n\n @deprecated  This API will be deleted, use cugraph_edgelist_get_edge_type_ids\n\n @param [in]     induced_subgraph   Opaque pointer to induced subgraph\n @return type erased array view of edge types"]
965    pub fn cugraph_induced_subgraph_get_edge_type_ids(
966        induced_subgraph: *mut cugraph_induced_subgraph_result_t,
967    ) -> *mut cugraph_type_erased_device_array_view_t;
968}
969unsafe extern "C" {
970    #[doc = " @brief       Get the subgraph offsets\n\n @deprecated  This API will be deleted, use cugraph_edgelist_get_edge_offsets\n\n @param [in]     induced_subgraph   Opaque pointer to induced subgraph\n @return type erased array view of subgraph identifiers"]
971    pub fn cugraph_induced_subgraph_get_subgraph_offsets(
972        induced_subgraph: *mut cugraph_induced_subgraph_result_t,
973    ) -> *mut cugraph_type_erased_device_array_view_t;
974}
975unsafe extern "C" {
976    #[doc = " @brief     Free induced subgraph\n\n @deprecated  This API will be deleted, use cugraph_edgelist_free\n\n @param [in]    induced subgraph   Opaque pointer to induced subgraph"]
977    pub fn cugraph_induced_subgraph_result_free(induced_subgraph: *mut cugraph_induced_subgraph_result_t);
978}
979unsafe extern "C" {
980    #[doc = " @brief      Extract induced subgraph(s)\n\n Given a list of vertex ids, extract a list of edges that represent the subgraph\n containing only the specified vertex ids.\n\n This function will do multiple subgraph extractions concurrently.  The vertex ids\n are specified in CSR-style, with @p subgraph_vertices being a list of vertex ids\n and @p subgraph_offsets[i] identifying the start offset for each extracted subgraph\n\n @param [in]  handle            Handle for accessing resources\n @param [in]  graph             Pointer to graph\n @param [in]  subgraph_offsets  Type erased array of subgraph offsets into\n                                @p subgraph_vertices\n @param [in]  subgraph_vertices Type erased array of vertices to include in\n                                extracted subgraph.\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result            Opaque pointer to induced subgraph result\n @param [out] error             Pointer to an error object storing details of any error.  Will\n                                be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
981    pub fn cugraph_extract_induced_subgraph(
982        handle: *const cugraph_resource_handle_t,
983        graph: *mut cugraph_graph_t,
984        subgraph_offsets: *const cugraph_type_erased_device_array_view_t,
985        subgraph_vertices: *const cugraph_type_erased_device_array_view_t,
986        do_expensive_check: bool_t,
987        result: *mut *mut cugraph_induced_subgraph_result_t,
988        error: *mut *mut cugraph_error_t,
989    ) -> cugraph_error_code_t;
990}
991unsafe extern "C" {
992    #[doc = " @brief      Gather edgelist\n\n This function collects the edgelist from all ranks and stores the combine edgelist\n in each rank\n\n @param [in]  handle            Handle for accessing resources.\n @param [in]  src               Device array containing the source vertex ids.\n @param [in]  dst               Device array containing the destination vertex ids\n @param [in]  weights           Optional device array containing the edge weights\n @param [in]  edge_ids          Optional device array containing the edge ids for each edge.\n @param [in]  edge_type_ids     Optional device array containing the edge types for each edge\n @param [out] result            Opaque pointer to gathered edgelist result\n @param [out] error             Pointer to an error object storing details of any error.  Will\n                                be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
993    pub fn cugraph_allgather(
994        handle: *const cugraph_resource_handle_t,
995        src: *const cugraph_type_erased_device_array_view_t,
996        dst: *const cugraph_type_erased_device_array_view_t,
997        weights: *const cugraph_type_erased_device_array_view_t,
998        edge_ids: *const cugraph_type_erased_device_array_view_t,
999        edge_type_ids: *const cugraph_type_erased_device_array_view_t,
1000        result: *mut *mut cugraph_induced_subgraph_result_t,
1001        error: *mut *mut cugraph_error_t,
1002    ) -> cugraph_error_code_t;
1003}
1004unsafe extern "C" {
1005    #[doc = " @brief      Count multi_edges\n\n Count the number of multi-edges in the graph\n\n @param [in]  handle              Handle for accessing resources.\n @param [in]  graph               Pointer to graph\n @param [in]  do_expensive_check  A flag to run expensive checks for input arguments (if set to\n true)\n @param [out] result              Where to store the count of multi-edges\n @param [out] error               Pointer to an error object storing details of any error.  Will\n                                  be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1006    pub fn cugraph_count_multi_edges(
1007        handle: *const cugraph_resource_handle_t,
1008        graph: *mut cugraph_graph_t,
1009        do_expensive_check: bool_t,
1010        result: *mut usize,
1011        error: *mut *mut cugraph_error_t,
1012    ) -> cugraph_error_code_t;
1013}
1014#[doc = " @brief       Opaque degree result type"]
1015#[repr(C)]
1016#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1017pub struct cugraph_degrees_result_t {
1018    pub align_: i32,
1019}
1020#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1021const _: () = {
1022    ["Size of cugraph_degrees_result_t"][::std::mem::size_of::<cugraph_degrees_result_t>() - 4usize];
1023    ["Alignment of cugraph_degrees_result_t"][::std::mem::align_of::<cugraph_degrees_result_t>() - 4usize];
1024    ["Offset of field: cugraph_degrees_result_t::align_"]
1025        [::std::mem::offset_of!(cugraph_degrees_result_t, align_) - 0usize];
1026};
1027unsafe extern "C" {
1028    #[doc = " @brief      Compute in degrees\n\n Compute the in degrees for the vertices in the graph.\n\n @param [in]  handle              Handle for accessing resources.\n @param [in]  graph               Pointer to graph\n @param [in]  source_vertices     Device array of vertices we want to compute in degrees for.\n @param [in]  do_expensive_check  A flag to run expensive checks for input arguments (if set to\n true)\n @param [out] result              Opaque pointer to degrees result\n @param [out] error               Pointer to an error object storing details of any error.  Will\n                                  be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1029    pub fn cugraph_in_degrees(
1030        handle: *const cugraph_resource_handle_t,
1031        graph: *mut cugraph_graph_t,
1032        source_vertices: *const cugraph_type_erased_device_array_view_t,
1033        do_expensive_check: bool_t,
1034        result: *mut *mut cugraph_degrees_result_t,
1035        error: *mut *mut cugraph_error_t,
1036    ) -> cugraph_error_code_t;
1037}
1038unsafe extern "C" {
1039    #[doc = " @brief      Compute out degrees\n\n Compute the out degrees for the vertices in the graph.\n\n @param [in]  handle              Handle for accessing resources.\n @param [in]  graph               Pointer to graph\n @param [in]  source_vertices     Device array of vertices we want to compute out degrees for.\n @param [in]  do_expensive_check  A flag to run expensive checks for input arguments (if set to\n true)\n @param [out] result              Opaque pointer to degrees result\n @param [out] error               Pointer to an error object storing details of any error.  Will\n                                  be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1040    pub fn cugraph_out_degrees(
1041        handle: *const cugraph_resource_handle_t,
1042        graph: *mut cugraph_graph_t,
1043        source_vertices: *const cugraph_type_erased_device_array_view_t,
1044        do_expensive_check: bool_t,
1045        result: *mut *mut cugraph_degrees_result_t,
1046        error: *mut *mut cugraph_error_t,
1047    ) -> cugraph_error_code_t;
1048}
1049unsafe extern "C" {
1050    #[doc = " @brief      Compute degrees\n\n Compute the degrees for the vertices in the graph.\n\n @param [in]  handle              Handle for accessing resources.\n @param [in]  graph               Pointer to graph\n @param [in]  source_vertices     Device array of vertices we want to compute degrees for.\n @param [in]  do_expensive_check  A flag to run expensive checks for input arguments (if set to\n true)\n @param [out] result              Opaque pointer to degrees result\n @param [out] error               Pointer to an error object storing details of any error.  Will\n                                  be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1051    pub fn cugraph_degrees(
1052        handle: *const cugraph_resource_handle_t,
1053        graph: *mut cugraph_graph_t,
1054        source_vertices: *const cugraph_type_erased_device_array_view_t,
1055        do_expensive_check: bool_t,
1056        result: *mut *mut cugraph_degrees_result_t,
1057        error: *mut *mut cugraph_error_t,
1058    ) -> cugraph_error_code_t;
1059}
1060unsafe extern "C" {
1061    #[doc = " @brief       Get the vertex ids\n\n @param [in]     degrees_result   Opaque pointer to degree result\n @return type erased array view of vertex ids"]
1062    pub fn cugraph_degrees_result_get_vertices(
1063        degrees_result: *mut cugraph_degrees_result_t,
1064    ) -> *mut cugraph_type_erased_device_array_view_t;
1065}
1066unsafe extern "C" {
1067    #[doc = " @brief       Get the in degrees\n\n @param [in]     degrees_result   Opaque pointer to degree result\n @return type erased array view of vertex ids"]
1068    pub fn cugraph_degrees_result_get_in_degrees(
1069        degrees_result: *mut cugraph_degrees_result_t,
1070    ) -> *mut cugraph_type_erased_device_array_view_t;
1071}
1072unsafe extern "C" {
1073    #[doc = " @brief       Get the out degrees\n\n If the graph is symmetric, in degrees and out degrees will be equal (and\n will be stored in the same memory).\n\n @param [in]     degrees_result   Opaque pointer to degree result\n @return type erased array view of vertex ids"]
1074    pub fn cugraph_degrees_result_get_out_degrees(
1075        degrees_result: *mut cugraph_degrees_result_t,
1076    ) -> *mut cugraph_type_erased_device_array_view_t;
1077}
1078unsafe extern "C" {
1079    #[doc = " @brief     Free degree result\n\n @param [in]    degrees_result   Opaque pointer to degree result"]
1080    pub fn cugraph_degrees_result_free(degrees_result: *mut cugraph_degrees_result_t);
1081}
1082#[doc = " @brief       Opaque edgelist type\n"]
1083#[repr(C)]
1084#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1085pub struct cugraph_edgelist_t {
1086    pub align_: i32,
1087}
1088#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1089const _: () = {
1090    ["Size of cugraph_edgelist_t"][::std::mem::size_of::<cugraph_edgelist_t>() - 4usize];
1091    ["Alignment of cugraph_edgelist_t"][::std::mem::align_of::<cugraph_edgelist_t>() - 4usize];
1092    ["Offset of field: cugraph_edgelist_t::align_"][::std::mem::offset_of!(cugraph_edgelist_t, align_) - 0usize];
1093};
1094unsafe extern "C" {
1095    #[doc = " @brief       Get the source vertex ids\n\n @param [in]     edgelist   Opaque pointer to edgelist\n @return type erased array view of source vertex ids"]
1096    pub fn cugraph_edgelist_get_sources(
1097        edgelist: *mut cugraph_edgelist_t,
1098    ) -> *mut cugraph_type_erased_device_array_view_t;
1099}
1100unsafe extern "C" {
1101    #[doc = " @brief       Get the destination vertex ids\n\n @param [in]     edgelist   Opaque pointer to edgelist\n @return type erased array view of destination vertex ids"]
1102    pub fn cugraph_edgelist_get_destinations(
1103        edgelist: *mut cugraph_edgelist_t,
1104    ) -> *mut cugraph_type_erased_device_array_view_t;
1105}
1106unsafe extern "C" {
1107    #[doc = " @brief       Get the edge weights\n\n @param [in]     edgelist   Opaque pointer to edgelist\n @return type erased array view of edge weights"]
1108    pub fn cugraph_edgelist_get_edge_weights(
1109        edgelist: *mut cugraph_edgelist_t,
1110    ) -> *mut cugraph_type_erased_device_array_view_t;
1111}
1112unsafe extern "C" {
1113    #[doc = " @brief       Get the edge ids\n\n @param [in]     edgelist   Opaque pointer to edgelist\n @return type erased array view of edge ids"]
1114    pub fn cugraph_edgelist_get_edge_ids(
1115        edgelist: *mut cugraph_edgelist_t,
1116    ) -> *mut cugraph_type_erased_device_array_view_t;
1117}
1118unsafe extern "C" {
1119    #[doc = " @brief       Get the edge types\n\n @param [in]     edgelist   Opaque pointer to edgelist\n @return type erased array view of edge types"]
1120    pub fn cugraph_edgelist_get_edge_type_ids(
1121        edgelist: *mut cugraph_edgelist_t,
1122    ) -> *mut cugraph_type_erased_device_array_view_t;
1123}
1124unsafe extern "C" {
1125    #[doc = " @brief       Get the edge offsets\n\n @param [in]     edgelist   Opaque pointer to edgelist\n @return type erased array view of subgraph identifiers"]
1126    pub fn cugraph_edgelist_get_edge_offsets(
1127        edgelist: *mut cugraph_edgelist_t,
1128    ) -> *mut cugraph_type_erased_device_array_view_t;
1129}
1130unsafe extern "C" {
1131    #[doc = " @brief     Free edgelist\n\n @param [in]    edgelist   Opaque pointer to edgelist"]
1132    pub fn cugraph_edgelist_free(edgelist: *mut cugraph_edgelist_t);
1133}
1134unsafe extern "C" {
1135    #[doc = " @brief       Construct the edge list from the graph view object.\n\n @param [in]  handle              Handle for accessing resources\n @param [in]  graph               Graph to operate on\n @param [in]  do_expensive_check  A flag to run expensive checks for input arguments (if set to\n true)\n @param [out] result              Opaque pointer to edgelist\n @param [out] error               Pointer to an error object storing details of any error.  Will\n                                  be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1136    pub fn cugraph_decompress_to_edgelist(
1137        handle: *const cugraph_resource_handle_t,
1138        graph: *mut cugraph_graph_t,
1139        do_expensive_check: bool_t,
1140        result: *mut *mut cugraph_edgelist_t,
1141        error: *mut *mut cugraph_error_t,
1142    ) -> cugraph_error_code_t;
1143}
1144unsafe extern "C" {
1145    #[doc = " @brief       Extract the vertex list from the graph view object.\n\n @param [in]  handle              Handle for accessing resources\n @param [in]  graph               Graph to operate on\n @param [in]  do_expensive_check  A flag to run expensive checks for input arguments (if set to\n true)\n @param [out] result              Opaque pointer to vertex list\n @param [out] error               Pointer to an error object storing details of any error.  Will\n                                  be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1146    pub fn cugraph_extract_vertex_list(
1147        handle: *const cugraph_resource_handle_t,
1148        graph: *mut cugraph_graph_t,
1149        do_expensive_check: bool_t,
1150        result: *mut *mut cugraph_type_erased_device_array_t,
1151        error: *mut *mut cugraph_error_t,
1152    ) -> cugraph_error_code_t;
1153}
1154unsafe extern "C" {
1155    #[doc = " @brief     Renumber arbitrary edgelist\n\n This function is designed to assist renumbering graph vertices in the case where the\n the global vertex id list exceeds the GPU memory.  Renumbering is done in-place in the\n supplied @p src and @p dst parameters.\n\n @param [in]     handle         Handle for accessing resources\n @param [in]     renumber_map   Host array with the renumber map\n @param [in/out] srcs           Device array of src vertices to renumber\n @param [in/out] dsts           Device array of dst vertices to renumber\n @param [out] error             Pointer to an error object storing details of any error.  Will\n                                be populated if error code is not CUGRAPH_SUCCESS"]
1156    pub fn cugraph_renumber_arbitrary_edgelist(
1157        handle: *const cugraph_resource_handle_t,
1158        renumber_map: *const cugraph_type_erased_host_array_view_t,
1159        srcs: *mut cugraph_type_erased_device_array_view_t,
1160        dsts: *mut cugraph_type_erased_device_array_view_t,
1161        error: *mut *mut cugraph_error_t,
1162    ) -> cugraph_error_code_t;
1163}
1164#[doc = " @brief     Opaque triangle counting result type"]
1165#[repr(C)]
1166#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1167pub struct cugraph_triangle_count_result_t {
1168    pub align_: i32,
1169}
1170#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1171const _: () = {
1172    ["Size of cugraph_triangle_count_result_t"][::std::mem::size_of::<cugraph_triangle_count_result_t>() - 4usize];
1173    ["Alignment of cugraph_triangle_count_result_t"]
1174        [::std::mem::align_of::<cugraph_triangle_count_result_t>() - 4usize];
1175    ["Offset of field: cugraph_triangle_count_result_t::align_"]
1176        [::std::mem::offset_of!(cugraph_triangle_count_result_t, align_) - 0usize];
1177};
1178unsafe extern "C" {
1179    #[doc = " @brief     Triangle Counting\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph.  NOTE: Graph might be modified if the storage\n                           needs to be transposed\n @param [in]  start        Device array of vertices we want to count triangles for.  If NULL\n                           the entire set of vertices in the graph is processed\n @param [in]  do_expensive_check\n                           A flag to run expensive checks for input arguments (if set to true)\n @param [out] result       Output from the triangle_count call\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1180    pub fn cugraph_triangle_count(
1181        handle: *const cugraph_resource_handle_t,
1182        graph: *mut cugraph_graph_t,
1183        start: *const cugraph_type_erased_device_array_view_t,
1184        do_expensive_check: bool_t,
1185        result: *mut *mut cugraph_triangle_count_result_t,
1186        error: *mut *mut cugraph_error_t,
1187    ) -> cugraph_error_code_t;
1188}
1189unsafe extern "C" {
1190    #[doc = " @ingroup community\n @brief     Get triangle counting vertices"]
1191    pub fn cugraph_triangle_count_result_get_vertices(
1192        result: *mut cugraph_triangle_count_result_t,
1193    ) -> *mut cugraph_type_erased_device_array_view_t;
1194}
1195unsafe extern "C" {
1196    #[doc = " @ingroup community\n @brief     Get triangle counting counts"]
1197    pub fn cugraph_triangle_count_result_get_counts(
1198        result: *mut cugraph_triangle_count_result_t,
1199    ) -> *mut cugraph_type_erased_device_array_view_t;
1200}
1201unsafe extern "C" {
1202    #[doc = " @ingroup community\n @brief     Free a triangle count result\n\n @param [in] result     The result from a sampling algorithm"]
1203    pub fn cugraph_triangle_count_result_free(result: *mut cugraph_triangle_count_result_t);
1204}
1205#[doc = " @brief     Opaque hierarchical clustering output"]
1206#[repr(C)]
1207#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1208pub struct cugraph_hierarchical_clustering_result_t {
1209    pub align_: i32,
1210}
1211#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1212const _: () = {
1213    ["Size of cugraph_hierarchical_clustering_result_t"]
1214        [::std::mem::size_of::<cugraph_hierarchical_clustering_result_t>() - 4usize];
1215    ["Alignment of cugraph_hierarchical_clustering_result_t"]
1216        [::std::mem::align_of::<cugraph_hierarchical_clustering_result_t>() - 4usize];
1217    ["Offset of field: cugraph_hierarchical_clustering_result_t::align_"]
1218        [::std::mem::offset_of!(cugraph_hierarchical_clustering_result_t, align_) - 0usize];
1219};
1220unsafe extern "C" {
1221    #[doc = " @brief     Compute Louvain\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph.  NOTE: Graph might be modified if the storage\n                           needs to be transposed\n @param [in]  max_level    Maximum level in hierarchy\n @param [in]  threshold    Threshold parameter, defines convergence at each level of hierarchy\n @param [in]  resolution   Resolution parameter (gamma) in modularity formula.\n                           This changes the size of the communities.  Higher resolutions\n                           lead to more smaller communities, lower resolutions lead to\n                           fewer larger communities.\n @param [in]  do_expensive_check\n                           A flag to run expensive checks for input arguments (if set to true)\n @param [out] result       Output from the Louvain call\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1222    pub fn cugraph_louvain(
1223        handle: *const cugraph_resource_handle_t,
1224        graph: *mut cugraph_graph_t,
1225        max_level: usize,
1226        threshold: f64,
1227        resolution: f64,
1228        do_expensive_check: bool_t,
1229        result: *mut *mut cugraph_hierarchical_clustering_result_t,
1230        error: *mut *mut cugraph_error_t,
1231    ) -> cugraph_error_code_t;
1232}
1233unsafe extern "C" {
1234    #[doc = " @brief     Compute Leiden\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph.  NOTE: Graph might be modified if the storage\n                           needs to be transposed\n @param [in,out] rng_state State of the random number generator, updated with each call\n @param [in]  max_level    Maximum level in hierarchy\n @param [in]  resolution   Resolution parameter (gamma) in modularity formula.\n                           This changes the size of the communities.  Higher resolutions\n                           lead to more smaller communities, lower resolutions lead to\n                           fewer larger communities.\n @param[in]  theta         (optional) The value of the parameter to scale modularity\n                           gain in Leiden refinement phase. It is used to compute\n                           the probability of joining a random leiden community.\n                           Called theta in the Leiden algorithm.\n @param [in]  do_expensive_check\n                           A flag to run expensive checks for input arguments (if set to true)\n @param [out] result       Output from the Leiden call\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1235    pub fn cugraph_leiden(
1236        handle: *const cugraph_resource_handle_t,
1237        rng_state: *mut cugraph_rng_state_t,
1238        graph: *mut cugraph_graph_t,
1239        max_level: usize,
1240        resolution: f64,
1241        theta: f64,
1242        do_expensive_check: bool_t,
1243        result: *mut *mut cugraph_hierarchical_clustering_result_t,
1244        error: *mut *mut cugraph_error_t,
1245    ) -> cugraph_error_code_t;
1246}
1247unsafe extern "C" {
1248    #[doc = " @ingroup community\n @brief     Get hierarchical clustering vertices"]
1249    pub fn cugraph_hierarchical_clustering_result_get_vertices(
1250        result: *mut cugraph_hierarchical_clustering_result_t,
1251    ) -> *mut cugraph_type_erased_device_array_view_t;
1252}
1253unsafe extern "C" {
1254    #[doc = " @ingroup community\n @brief     Get hierarchical clustering clusters"]
1255    pub fn cugraph_hierarchical_clustering_result_get_clusters(
1256        result: *mut cugraph_hierarchical_clustering_result_t,
1257    ) -> *mut cugraph_type_erased_device_array_view_t;
1258}
1259unsafe extern "C" {
1260    #[doc = " @ingroup community\n @brief     Get modularity"]
1261    pub fn cugraph_hierarchical_clustering_result_get_modularity(
1262        result: *mut cugraph_hierarchical_clustering_result_t,
1263    ) -> f64;
1264}
1265unsafe extern "C" {
1266    #[doc = " @ingroup community\n @brief     Free a hierarchical clustering result\n\n @param [in] result     The result from a sampling algorithm"]
1267    pub fn cugraph_hierarchical_clustering_result_free(result: *mut cugraph_hierarchical_clustering_result_t);
1268}
1269unsafe extern "C" {
1270    #[doc = " @brief     Compute ECG clustering\n\n @param [in]  handle        Handle for accessing resources\n @param [in,out] rng_state  State of the random number generator, updated with each call\n @param [in]  graph         Pointer to graph.  NOTE: Graph might be modified if the storage\n                            needs to be transposed\n @param [in]  min_weight    Minimum edge weight in final graph\n @param [in]  ensemble_size The number of Louvain iterations to run\n @param [in]  max_level     Maximum level in hierarchy for final Louvain\n @param [in]  threshold     Threshold parameter, defines convergence at each level of hierarchy\n                            for final Louvain\n @param [in]  resolution    Resolution parameter (gamma) in modularity formula.\n                            This changes the size of the communities.  Higher resolutions\n                            lead to more smaller communities, lower resolutions lead to\n                            fewer larger communities.\n @param [in]  do_expensive_check\n                            A flag to run expensive checks for input arguments (if set to true)\n @param [out] result        Output from the Louvain call\n @param [out] error         Pointer to an error object storing details of any error.  Will\n                            be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1271    pub fn cugraph_ecg(
1272        handle: *const cugraph_resource_handle_t,
1273        rng_state: *mut cugraph_rng_state_t,
1274        graph: *mut cugraph_graph_t,
1275        min_weight: f64,
1276        ensemble_size: usize,
1277        max_level: usize,
1278        threshold: f64,
1279        resolution: f64,
1280        do_expensive_check: bool_t,
1281        result: *mut *mut cugraph_hierarchical_clustering_result_t,
1282        error: *mut *mut cugraph_error_t,
1283    ) -> cugraph_error_code_t;
1284}
1285unsafe extern "C" {
1286    #[doc = " @brief   Extract ego graphs\n\n @param [in]  handle          Handle for accessing resources\n @param [in]  graph           Pointer to graph.  NOTE: Graph might be modified if the storage\n                              needs to be transposed\n @param [in]  source_vertices Device array of vertices we want to extract egonets for.\n @param [in]  radius          The number of hops to go out from each source vertex\n @param [in]  do_expensive_check\n                               A flag to run expensive checks for input arguments (if set to true)\n @param [out] result           Opaque object containing the extracted subgraph\n @param [out] error            Pointer to an error object storing details of any error.  Will\n                               be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1287    pub fn cugraph_extract_ego(
1288        handle: *const cugraph_resource_handle_t,
1289        graph: *mut cugraph_graph_t,
1290        source_vertices: *const cugraph_type_erased_device_array_view_t,
1291        radius: usize,
1292        do_expensive_check: bool_t,
1293        result: *mut *mut cugraph_induced_subgraph_result_t,
1294        error: *mut *mut cugraph_error_t,
1295    ) -> cugraph_error_code_t;
1296}
1297unsafe extern "C" {
1298    #[doc = " @brief   Extract k truss for a graph\n\n @param [in]  handle          Handle for accessing resources\n @param [in]  graph           Pointer to graph.  NOTE: Graph might be modified if the storage\n                              needs to be transposed\n @param [in]  k               The order of the truss\n @param [in]  do_expensive_check\n                              A flag to run expensive checks for input arguments (if set to true)\n @param [out] result          Opaque object containing the extracted subgraph\n @param [out] error           Pointer to an error object storing details of any error.  Will\n                              be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1299    pub fn cugraph_k_truss_subgraph(
1300        handle: *const cugraph_resource_handle_t,
1301        graph: *mut cugraph_graph_t,
1302        k: usize,
1303        do_expensive_check: bool_t,
1304        result: *mut *mut cugraph_induced_subgraph_result_t,
1305        error: *mut *mut cugraph_error_t,
1306    ) -> cugraph_error_code_t;
1307}
1308#[doc = " @brief     Opaque clustering output"]
1309#[repr(C)]
1310#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1311pub struct cugraph_clustering_result_t {
1312    pub align_: i32,
1313}
1314#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1315const _: () = {
1316    ["Size of cugraph_clustering_result_t"][::std::mem::size_of::<cugraph_clustering_result_t>() - 4usize];
1317    ["Alignment of cugraph_clustering_result_t"][::std::mem::align_of::<cugraph_clustering_result_t>() - 4usize];
1318    ["Offset of field: cugraph_clustering_result_t::align_"]
1319        [::std::mem::offset_of!(cugraph_clustering_result_t, align_) - 0usize];
1320};
1321unsafe extern "C" {
1322    #[doc = " @brief   Balanced cut clustering\n\n @deprecated This function is deprecated and will be removed in a future release.\n             Use cugraph_spectral_clustering (spectral modularity maximization) instead.\n\n NOTE: This currently wraps the legacy balanced cut clustering implementation and is only\n available in Single GPU implementation.\n\n @param [in]  handle          Handle for accessing resources\n @param [in,out] rng_state  State of the random number generator, updated with each call\n @param [in]  graph           Pointer to graph.  NOTE: Graph might be modified if the storage\n                              needs to be transposed\n @param [in]  n_clusters      The desired number of clusters\n @param [in]  n_eigenvectors  The number of eigenvectors to use\n @param [in]  evs_tolerance   The tolerance to use for the eigenvalue solver\n @param [in]  evs_max_iterations The maximum number of iterations of the eigenvalue solver\n @param [in]  k_means_tolerance  The tolerance to use for the k-means solver\n @param [in]  k_means_max_iterations The maximum number of iterations of the k-means solver\n @param [in]  do_expensive_check\n                               A flag to run expensive checks for input arguments (if set to true)\n @param [out] result           Opaque object containing the clustering result\n @param [out] error            Pointer to an error object storing details of any error.  Will\n                               be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1323    pub fn cugraph_balanced_cut_clustering(
1324        handle: *const cugraph_resource_handle_t,
1325        rng_state: *mut cugraph_rng_state_t,
1326        graph: *mut cugraph_graph_t,
1327        n_clusters: usize,
1328        n_eigenvectors: usize,
1329        evs_tolerance: f64,
1330        evs_max_iterations: ::std::os::raw::c_int,
1331        k_means_tolerance: f64,
1332        k_means_max_iterations: ::std::os::raw::c_int,
1333        do_expensive_check: bool_t,
1334        result: *mut *mut cugraph_clustering_result_t,
1335        error: *mut *mut cugraph_error_t,
1336    ) -> cugraph_error_code_t;
1337}
1338unsafe extern "C" {
1339    #[doc = " @brief   Spectral clustering\n\n NOTE: This currently wraps the legacy spectral clustering implementation and is only\n available in Single GPU implementation.\n\n @param [in]  handle          Handle for accessing resources\n @param [in,out] rng_state  State of the random number generator, updated with each call\n @param [in]  graph           Pointer to graph.  NOTE: Graph might be modified if the storage\n                              needs to be transposed\n @param [in]  n_clusters      The desired number of clusters\n @param [in]  n_eigenvectors  The number of eigenvectors to use\n @param [in]  evs_tolerance   The tolerance to use for the eigenvalue solver\n @param [in]  evs_max_iterations The maximum number of iterations of the eigenvalue solver\n @param [in]  k_means_tolerance  The tolerance to use for the k-means solver\n @param [in]  k_means_max_iterations The maximum number of iterations of the k-means solver\n @param [in]  do_expensive_check\n                               A flag to run expensive checks for input arguments (if set to true)\n @param [out] result           Opaque object containing the clustering result\n @param [out] error            Pointer to an error object storing details of any error.  Will\n                               be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1340    pub fn cugraph_spectral_modularity_maximization(
1341        handle: *const cugraph_resource_handle_t,
1342        rng_state: *mut cugraph_rng_state_t,
1343        graph: *mut cugraph_graph_t,
1344        n_clusters: usize,
1345        n_eigenvectors: usize,
1346        evs_tolerance: f64,
1347        evs_max_iterations: ::std::os::raw::c_int,
1348        k_means_tolerance: f64,
1349        k_means_max_iterations: ::std::os::raw::c_int,
1350        do_expensive_check: bool_t,
1351        result: *mut *mut cugraph_clustering_result_t,
1352        error: *mut *mut cugraph_error_t,
1353    ) -> cugraph_error_code_t;
1354}
1355unsafe extern "C" {
1356    #[doc = " @brief   Compute modularity of the specified clustering\n\n NOTE: This currently wraps the legacy spectral modularity implementation and is only\n available in Single GPU implementation.\n\n @param [in]  handle          Handle for accessing resources\n @param [in]  graph           Pointer to graph.  NOTE: Graph might be modified if the storage\n                              needs to be transposed\n @param [in]  n_clusters      The desired number of clusters\n @param [in]  vertices        Vertex ids from the clustering result\n @param [in]  clusters        Cluster ids from the clustering result\n @param [out] score           The modularity score for this clustering\n @param [out] error           Pointer to an error object storing details of any error.  Will\n                              be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1357    pub fn cugraph_analyze_clustering_modularity(
1358        handle: *const cugraph_resource_handle_t,
1359        graph: *mut cugraph_graph_t,
1360        n_clusters: usize,
1361        vertices: *const cugraph_type_erased_device_array_view_t,
1362        clusters: *const cugraph_type_erased_device_array_view_t,
1363        score: *mut f64,
1364        error: *mut *mut cugraph_error_t,
1365    ) -> cugraph_error_code_t;
1366}
1367unsafe extern "C" {
1368    #[doc = " @brief   Compute edge cut of the specified clustering\n\n NOTE: This currently wraps the legacy spectral edge cut implementation and is only\n available in Single GPU implementation.\n\n @param [in]  handle          Handle for accessing resources\n @param [in]  graph           Pointer to graph.  NOTE: Graph might be modified if the storage\n                              needs to be transposed\n @param [in]  n_clusters      The desired number of clusters\n @param [in]  vertices        Vertex ids from the clustering result\n @param [in]  clusters        Cluster ids from the clustering result\n @param [out] score           The edge cut score for this clustering\n @param [out] error           Pointer to an error object storing details of any error.  Will\n                              be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1369    pub fn cugraph_analyze_clustering_edge_cut(
1370        handle: *const cugraph_resource_handle_t,
1371        graph: *mut cugraph_graph_t,
1372        n_clusters: usize,
1373        vertices: *const cugraph_type_erased_device_array_view_t,
1374        clusters: *const cugraph_type_erased_device_array_view_t,
1375        score: *mut f64,
1376        error: *mut *mut cugraph_error_t,
1377    ) -> cugraph_error_code_t;
1378}
1379unsafe extern "C" {
1380    #[doc = " @brief   Compute ratio cut of the specified clustering\n\n NOTE: This currently wraps the legacy spectral ratio cut implementation and is only\n available in Single GPU implementation.\n\n @param [in]  handle          Handle for accessing resources\n @param [in]  graph           Pointer to graph.  NOTE: Graph might be modified if the storage\n                              needs to be transposed\n @param [in]  n_clusters      The desired number of clusters\n @param [in]  vertices        Vertex ids from the clustering result\n @param [in]  clusters        Cluster ids from the clustering result\n @param [out] score           The ratio cut score for this clustering\n @param [out] error           Pointer to an error object storing details of any error.  Will\n                              be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1381    pub fn cugraph_analyze_clustering_ratio_cut(
1382        handle: *const cugraph_resource_handle_t,
1383        graph: *mut cugraph_graph_t,
1384        n_clusters: usize,
1385        vertices: *const cugraph_type_erased_device_array_view_t,
1386        clusters: *const cugraph_type_erased_device_array_view_t,
1387        score: *mut f64,
1388        error: *mut *mut cugraph_error_t,
1389    ) -> cugraph_error_code_t;
1390}
1391unsafe extern "C" {
1392    #[doc = " @brief     Get clustering vertices"]
1393    pub fn cugraph_clustering_result_get_vertices(
1394        result: *mut cugraph_clustering_result_t,
1395    ) -> *mut cugraph_type_erased_device_array_view_t;
1396}
1397unsafe extern "C" {
1398    #[doc = " @brief     Get clustering clusters"]
1399    pub fn cugraph_clustering_result_get_clusters(
1400        result: *mut cugraph_clustering_result_t,
1401    ) -> *mut cugraph_type_erased_device_array_view_t;
1402}
1403unsafe extern "C" {
1404    #[doc = " @brief     Free a clustering result\n\n @param [in] result     The result from a sampling algorithm"]
1405    pub fn cugraph_clustering_result_free(result: *mut cugraph_clustering_result_t);
1406}
1407#[doc = " @brief       Opaque core number result type"]
1408#[repr(C)]
1409#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1410pub struct cugraph_core_result_t {
1411    pub align_: i32,
1412}
1413#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1414const _: () = {
1415    ["Size of cugraph_core_result_t"][::std::mem::size_of::<cugraph_core_result_t>() - 4usize];
1416    ["Alignment of cugraph_core_result_t"][::std::mem::align_of::<cugraph_core_result_t>() - 4usize];
1417    ["Offset of field: cugraph_core_result_t::align_"][::std::mem::offset_of!(cugraph_core_result_t, align_) - 0usize];
1418};
1419#[doc = " @brief       Opaque k-core result type"]
1420#[repr(C)]
1421#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1422pub struct cugraph_k_core_result_t {
1423    pub align_: i32,
1424}
1425#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1426const _: () = {
1427    ["Size of cugraph_k_core_result_t"][::std::mem::size_of::<cugraph_k_core_result_t>() - 4usize];
1428    ["Alignment of cugraph_k_core_result_t"][::std::mem::align_of::<cugraph_k_core_result_t>() - 4usize];
1429    ["Offset of field: cugraph_k_core_result_t::align_"]
1430        [::std::mem::offset_of!(cugraph_k_core_result_t, align_) - 0usize];
1431};
1432unsafe extern "C" {
1433    #[doc = " @ingroup core\n @brief       Create a core_number result (in case it was previously extracted)\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  vertices     The result from core number\n @param [in]  core_numbers The result from core number\n @param [out] result       Opaque pointer to core number results\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1434    pub fn cugraph_core_result_create(
1435        handle: *const cugraph_resource_handle_t,
1436        vertices: *mut cugraph_type_erased_device_array_view_t,
1437        core_numbers: *mut cugraph_type_erased_device_array_view_t,
1438        core_result: *mut *mut cugraph_core_result_t,
1439        error: *mut *mut cugraph_error_t,
1440    ) -> cugraph_error_code_t;
1441}
1442unsafe extern "C" {
1443    #[doc = " @ingroup core\n @brief       Get the vertex ids from the core result\n\n @param [in]     result   The result from core number\n @return type erased array of vertex ids"]
1444    pub fn cugraph_core_result_get_vertices(
1445        result: *mut cugraph_core_result_t,
1446    ) -> *mut cugraph_type_erased_device_array_view_t;
1447}
1448unsafe extern "C" {
1449    #[doc = " @ingroup core\n @brief       Get the core numbers from the core result\n\n @param [in]    result    The result from core number\n @return type erased array of core numbers"]
1450    pub fn cugraph_core_result_get_core_numbers(
1451        result: *mut cugraph_core_result_t,
1452    ) -> *mut cugraph_type_erased_device_array_view_t;
1453}
1454unsafe extern "C" {
1455    #[doc = " @ingroup core\n @brief     Free core result\n\n @param [in]    result    The result from core number"]
1456    pub fn cugraph_core_result_free(result: *mut cugraph_core_result_t);
1457}
1458unsafe extern "C" {
1459    #[doc = " @ingroup core\n @brief       Get the src vertex ids from the k-core result\n\n @param [in]     result   The result from k-core\n @return type erased array of src vertex ids"]
1460    pub fn cugraph_k_core_result_get_src_vertices(
1461        result: *mut cugraph_k_core_result_t,
1462    ) -> *mut cugraph_type_erased_device_array_view_t;
1463}
1464unsafe extern "C" {
1465    #[doc = " @ingroup core\n @brief       Get the dst vertex ids from the k-core result\n\n @param [in]     result   The result from k-core\n @return type erased array of dst vertex ids"]
1466    pub fn cugraph_k_core_result_get_dst_vertices(
1467        result: *mut cugraph_k_core_result_t,
1468    ) -> *mut cugraph_type_erased_device_array_view_t;
1469}
1470unsafe extern "C" {
1471    #[doc = " @ingroup core\n @brief       Get the weights from the k-core result\n\n Returns NULL if the graph is unweighted\n\n @param [in]     result   The result from k-core\n @return type erased array of weights"]
1472    pub fn cugraph_k_core_result_get_weights(
1473        result: *mut cugraph_k_core_result_t,
1474    ) -> *mut cugraph_type_erased_device_array_view_t;
1475}
1476unsafe extern "C" {
1477    #[doc = " @ingroup core\n @brief     Free k-core result\n\n @param [in]    result    The result from k-core"]
1478    pub fn cugraph_k_core_result_free(result: *mut cugraph_k_core_result_t);
1479}
1480pub const cugraph_k_core_degree_type_t_K_CORE_DEGREE_TYPE_IN: cugraph_k_core_degree_type_t = 0;
1481#[doc = " Compute core_number using incoming edges"]
1482pub const cugraph_k_core_degree_type_t_K_CORE_DEGREE_TYPE_OUT: cugraph_k_core_degree_type_t = 1;
1483#[doc = " Compute core_number using outgoing edges"]
1484pub const cugraph_k_core_degree_type_t_K_CORE_DEGREE_TYPE_INOUT: cugraph_k_core_degree_type_t = 2;
1485#[doc = " @ingroup core\n @brief     Enumeration for computing core number"]
1486pub type cugraph_k_core_degree_type_t = ::std::os::raw::c_uint;
1487unsafe extern "C" {
1488    #[doc = " @brief     Perform core number.\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph\n @param [in]  degree_type  Compute core_number using in, out or both in and out edges\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result       Opaque pointer to core number results\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1489    pub fn cugraph_core_number(
1490        handle: *const cugraph_resource_handle_t,
1491        graph: *mut cugraph_graph_t,
1492        degree_type: cugraph_k_core_degree_type_t,
1493        do_expensive_check: bool_t,
1494        result: *mut *mut cugraph_core_result_t,
1495        error: *mut *mut cugraph_error_t,
1496    ) -> cugraph_error_code_t;
1497}
1498unsafe extern "C" {
1499    #[doc = " @brief     Perform k_core using output from core_number\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph\n @param [in]  k            The value of k to use\n @param [in]  degree_type  Compute core_number using in, out or both in and out edges.\n                           Ignored if core_result is specified.\n @param [in]  core_result  Result from calling cugraph_core_number, if NULL then\n                           call core_number inside this function call.\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result       Opaque pointer to k_core results\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1500    pub fn cugraph_k_core(
1501        handle: *const cugraph_resource_handle_t,
1502        graph: *mut cugraph_graph_t,
1503        k: usize,
1504        degree_type: cugraph_k_core_degree_type_t,
1505        core_result: *const cugraph_core_result_t,
1506        do_expensive_check: bool_t,
1507        result: *mut *mut cugraph_k_core_result_t,
1508        error: *mut *mut cugraph_error_t,
1509    ) -> cugraph_error_code_t;
1510}
1511#[doc = " @brief     Opaque labeling result type"]
1512#[repr(C)]
1513#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1514pub struct cugraph_labeling_result_t {
1515    pub align_: i32,
1516}
1517#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1518const _: () = {
1519    ["Size of cugraph_labeling_result_t"][::std::mem::size_of::<cugraph_labeling_result_t>() - 4usize];
1520    ["Alignment of cugraph_labeling_result_t"][::std::mem::align_of::<cugraph_labeling_result_t>() - 4usize];
1521    ["Offset of field: cugraph_labeling_result_t::align_"]
1522        [::std::mem::offset_of!(cugraph_labeling_result_t, align_) - 0usize];
1523};
1524unsafe extern "C" {
1525    #[doc = " @ingroup labeling\n @brief     Get the vertex ids from the labeling result\n\n @param [in]   result   The result from a labeling algorithm\n @return type erased array of vertex ids"]
1526    pub fn cugraph_labeling_result_get_vertices(
1527        result: *mut cugraph_labeling_result_t,
1528    ) -> *mut cugraph_type_erased_device_array_view_t;
1529}
1530unsafe extern "C" {
1531    #[doc = " @ingroup labeling\n @brief     Get the label values from the labeling result\n\n @param [in]   result   The result from a labeling algorithm\n @return type erased array of label values"]
1532    pub fn cugraph_labeling_result_get_labels(
1533        result: *mut cugraph_labeling_result_t,
1534    ) -> *mut cugraph_type_erased_device_array_view_t;
1535}
1536unsafe extern "C" {
1537    #[doc = " @ingroup labeling\n @brief     Free labeling result\n\n @param [in]   result   The result from a labeling algorithm"]
1538    pub fn cugraph_labeling_result_free(result: *mut cugraph_labeling_result_t);
1539}
1540unsafe extern "C" {
1541    #[doc = " @brief Labels each vertex in the input graph with its (weakly-connected-)component ID\n\n The input graph must be symmetric. Component IDs can be arbitrary integers (they can be\n non-consecutive and are not ordered by component size or any other criterion).\n\n @param [in]  handle      Handle for accessing resources\n @param [in]  graph       Pointer to graph\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result      Opaque pointer to labeling results\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS"]
1542    pub fn cugraph_weakly_connected_components(
1543        handle: *const cugraph_resource_handle_t,
1544        graph: *mut cugraph_graph_t,
1545        do_expensive_check: bool_t,
1546        result: *mut *mut cugraph_labeling_result_t,
1547        error: *mut *mut cugraph_error_t,
1548    ) -> cugraph_error_code_t;
1549}
1550unsafe extern "C" {
1551    #[doc = " @brief Labels each vertex in the input graph with its (strongly-connected-)component ID\n\n The input graph may be asymmetric. Component IDs can be arbitrary integers (they can be\n non-consecutive and are not ordered by component size or any other criterion).\n\n @param [in]  handle      Handle for accessing resources\n @param [in]  graph       Pointer to graph\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result      Opaque pointer to labeling results\n @param [out] error       Pointer to an error object storing details of any error.  Will\n                          be populated if error code is not CUGRAPH_SUCCESS"]
1552    pub fn cugraph_strongly_connected_components(
1553        handle: *const cugraph_resource_handle_t,
1554        graph: *mut cugraph_graph_t,
1555        do_expensive_check: bool_t,
1556        result: *mut *mut cugraph_labeling_result_t,
1557        error: *mut *mut cugraph_error_t,
1558    ) -> cugraph_error_code_t;
1559}
1560#[doc = " @brief Opaque src-dst lookup container type"]
1561#[repr(C)]
1562#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1563pub struct cugraph_lookup_container_t {
1564    pub align_: i32,
1565}
1566#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1567const _: () = {
1568    ["Size of cugraph_lookup_container_t"][::std::mem::size_of::<cugraph_lookup_container_t>() - 4usize];
1569    ["Alignment of cugraph_lookup_container_t"][::std::mem::align_of::<cugraph_lookup_container_t>() - 4usize];
1570    ["Offset of field: cugraph_lookup_container_t::align_"]
1571        [::std::mem::offset_of!(cugraph_lookup_container_t, align_) - 0usize];
1572};
1573#[doc = " @brief Opaque src-dst lookup result type"]
1574#[repr(C)]
1575#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1576pub struct cugraph_lookup_result_t {
1577    pub align_: i32,
1578}
1579#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1580const _: () = {
1581    ["Size of cugraph_lookup_result_t"][::std::mem::size_of::<cugraph_lookup_result_t>() - 4usize];
1582    ["Alignment of cugraph_lookup_result_t"][::std::mem::align_of::<cugraph_lookup_result_t>() - 4usize];
1583    ["Offset of field: cugraph_lookup_result_t::align_"]
1584        [::std::mem::offset_of!(cugraph_lookup_result_t, align_) - 0usize];
1585};
1586unsafe extern "C" {
1587    #[doc = " @brief Build map to lookup source and destination using edge id and type\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph.  NOTE: Graph might be modified if the storage\n                           needs to be transposed\n @param [out]  lookup_container Lookup map\n @param [out]  error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1588    pub fn cugraph_build_edge_id_and_type_to_src_dst_lookup_map(
1589        handle: *const cugraph_resource_handle_t,
1590        graph: *mut cugraph_graph_t,
1591        lookup_container: *mut *mut cugraph_lookup_container_t,
1592        error: *mut *mut cugraph_error_t,
1593    ) -> cugraph_error_code_t;
1594}
1595unsafe extern "C" {
1596    #[doc = " @brief Lookup edge sources and destinations using edge ids and a single edge type.\n\n Use this function to lookup endpoints of edges belonging to the same edge type.\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph.  NOTE: Graph might be modified if the storage\n                           needs to be transposed\n @param [in]  lookup_container Lookup map\n @param[in]  edge_ids_to_lookup Edge ids to lookup\n @param[in]  edge_type_to_lookup Edge types corresponding to edge ids in @p edge_ids_to_lookup\n @param [out]  result      Output from the lookup call\n @param [out]  error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1597    pub fn cugraph_lookup_endpoints_from_edge_ids_and_single_type(
1598        handle: *const cugraph_resource_handle_t,
1599        graph: *mut cugraph_graph_t,
1600        lookup_container: *const cugraph_lookup_container_t,
1601        edge_ids_to_lookup: *const cugraph_type_erased_device_array_view_t,
1602        edge_type_to_lookup: ::std::os::raw::c_int,
1603        result: *mut *mut cugraph_lookup_result_t,
1604        error: *mut *mut cugraph_error_t,
1605    ) -> cugraph_error_code_t;
1606}
1607unsafe extern "C" {
1608    #[doc = " @brief Lookup edge sources and destinations using edge ids and edge types.\n\n Use this function to lookup endpoints of edges belonging to different edge types.\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph.  NOTE: Graph might be modified if the storage\n                           needs to be transposed\n @param [in]  lookup_container Lookup map\n @param[in]  edge_ids_to_lookup Edge ids to lookup\n @param[in]  edge_types_to_lookup Edge types corresponding to the edge ids in @p\n edge_ids_to_lookup\n @param [out]  result      Output from the lookup call\n @param [out]  error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1609    pub fn cugraph_lookup_endpoints_from_edge_ids_and_types(
1610        handle: *const cugraph_resource_handle_t,
1611        graph: *mut cugraph_graph_t,
1612        lookup_container: *const cugraph_lookup_container_t,
1613        edge_ids_to_lookup: *const cugraph_type_erased_device_array_view_t,
1614        edge_types_to_lookup: *const cugraph_type_erased_device_array_view_t,
1615        result: *mut *mut cugraph_lookup_result_t,
1616        error: *mut *mut cugraph_error_t,
1617    ) -> cugraph_error_code_t;
1618}
1619unsafe extern "C" {
1620    #[doc = " @ingroup samplingC\n @brief  Get the edge sources from the lookup result\n\n @param [in]  result  The result from src-dst lookup using edge ids and type(s)\n @return type erased array pointing to the edge sources"]
1621    pub fn cugraph_lookup_result_get_srcs(
1622        result: *const cugraph_lookup_result_t,
1623    ) -> *mut cugraph_type_erased_device_array_view_t;
1624}
1625unsafe extern "C" {
1626    #[doc = " @ingroup samplingC\n @brief  Get the edge destinations from the lookup result\n\n @param [in]  result  The result from src-dst lookup using edge ids and type(s)\n @return type erased array pointing to the edge destinations"]
1627    pub fn cugraph_lookup_result_get_dsts(
1628        result: *const cugraph_lookup_result_t,
1629    ) -> *mut cugraph_type_erased_device_array_view_t;
1630}
1631unsafe extern "C" {
1632    #[doc = " @ingroup samplingC\n @brief     Free a src-dst lookup result\n\n @param [in] result     The result from src-dst lookup using edge ids and type(s)"]
1633    pub fn cugraph_lookup_result_free(result: *mut cugraph_lookup_result_t);
1634}
1635unsafe extern "C" {
1636    #[doc = " @ingroup samplingC\n @brief     Free a sampling lookup map\n\n @param [in] container     The sampling lookup map (a.k.a. container)."]
1637    pub fn cugraph_lookup_container_free(container: *mut cugraph_lookup_container_t);
1638}
1639#[doc = " @brief       Opaque COO definition"]
1640#[repr(C)]
1641#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1642pub struct cugraph_coo_t {
1643    pub align_: i32,
1644}
1645#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1646const _: () = {
1647    ["Size of cugraph_coo_t"][::std::mem::size_of::<cugraph_coo_t>() - 4usize];
1648    ["Alignment of cugraph_coo_t"][::std::mem::align_of::<cugraph_coo_t>() - 4usize];
1649    ["Offset of field: cugraph_coo_t::align_"][::std::mem::offset_of!(cugraph_coo_t, align_) - 0usize];
1650};
1651#[doc = " @brief       Opaque COO list definition"]
1652#[repr(C)]
1653#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1654pub struct cugraph_coo_list_t {
1655    pub align_: i32,
1656}
1657#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1658const _: () = {
1659    ["Size of cugraph_coo_list_t"][::std::mem::size_of::<cugraph_coo_list_t>() - 4usize];
1660    ["Alignment of cugraph_coo_list_t"][::std::mem::align_of::<cugraph_coo_list_t>() - 4usize];
1661    ["Offset of field: cugraph_coo_list_t::align_"][::std::mem::offset_of!(cugraph_coo_list_t, align_) - 0usize];
1662};
1663unsafe extern "C" {
1664    #[doc = " @brief       Get the source vertex ids\n\n @param [in]     coo   Opaque pointer to COO\n @return type erased array view of source vertex ids"]
1665    pub fn cugraph_coo_get_sources(coo: *mut cugraph_coo_t) -> *mut cugraph_type_erased_device_array_view_t;
1666}
1667unsafe extern "C" {
1668    #[doc = " @brief       Get the destination vertex ids\n\n @param [in]     coo   Opaque pointer to COO\n @return type erased array view of destination vertex ids"]
1669    pub fn cugraph_coo_get_destinations(coo: *mut cugraph_coo_t) -> *mut cugraph_type_erased_device_array_view_t;
1670}
1671unsafe extern "C" {
1672    #[doc = " @brief       Get the edge weights\n\n @param [in]     coo   Opaque pointer to COO\n @return type erased array view of edge weights, NULL if no edge weights in COO"]
1673    pub fn cugraph_coo_get_edge_weights(coo: *mut cugraph_coo_t) -> *mut cugraph_type_erased_device_array_view_t;
1674}
1675unsafe extern "C" {
1676    #[doc = " @brief       Get the edge id\n\n @param [in]     coo   Opaque pointer to COO\n @return type erased array view of edge id, NULL if no edge ids in COO"]
1677    pub fn cugraph_coo_get_edge_id(coo: *mut cugraph_coo_t) -> *mut cugraph_type_erased_device_array_view_t;
1678}
1679unsafe extern "C" {
1680    #[doc = " @brief       Get the edge type\n\n @param [in]     coo   Opaque pointer to COO\n @return type erased array view of edge type, NULL if no edge types in COO"]
1681    pub fn cugraph_coo_get_edge_type(coo: *mut cugraph_coo_t) -> *mut cugraph_type_erased_device_array_view_t;
1682}
1683unsafe extern "C" {
1684    #[doc = " @brief       Get the number of coo object in the list\n\n @param [in]     coo_list   Opaque pointer to COO list\n @return number of elements"]
1685    pub fn cugraph_coo_list_size(coo_list: *const cugraph_coo_list_t) -> usize;
1686}
1687unsafe extern "C" {
1688    #[doc = " @brief       Get a COO from the list\n\n @param [in]     coo_list   Opaque pointer to COO list\n @param [in]     index      Index of desired COO from list\n @return a cugraph_coo_t* object from the list"]
1689    pub fn cugraph_coo_list_element(coo_list: *mut cugraph_coo_list_t, index: usize) -> *mut cugraph_coo_t;
1690}
1691unsafe extern "C" {
1692    #[doc = " @brief     Free coo object\n\n @param [in]    coo Opaque pointer to COO"]
1693    pub fn cugraph_coo_free(coo: *mut cugraph_coo_t);
1694}
1695unsafe extern "C" {
1696    #[doc = " @brief     Free coo list\n\n @param [in]    coo_list Opaque pointer to list of COO objects"]
1697    pub fn cugraph_coo_list_free(coo_list: *mut cugraph_coo_list_t);
1698}
1699#[repr(C)]
1700#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1701pub struct cugraph_vertex_property_t {
1702    pub align_: i32,
1703}
1704#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1705const _: () = {
1706    ["Size of cugraph_vertex_property_t"][::std::mem::size_of::<cugraph_vertex_property_t>() - 4usize];
1707    ["Alignment of cugraph_vertex_property_t"][::std::mem::align_of::<cugraph_vertex_property_t>() - 4usize];
1708    ["Offset of field: cugraph_vertex_property_t::align_"]
1709        [::std::mem::offset_of!(cugraph_vertex_property_t, align_) - 0usize];
1710};
1711#[repr(C)]
1712#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1713pub struct cugraph_edge_property_t {
1714    pub align_: i32,
1715}
1716#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1717const _: () = {
1718    ["Size of cugraph_edge_property_t"][::std::mem::size_of::<cugraph_edge_property_t>() - 4usize];
1719    ["Alignment of cugraph_edge_property_t"][::std::mem::align_of::<cugraph_edge_property_t>() - 4usize];
1720    ["Offset of field: cugraph_edge_property_t::align_"]
1721        [::std::mem::offset_of!(cugraph_edge_property_t, align_) - 0usize];
1722};
1723#[repr(C)]
1724#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1725pub struct cugraph_vertex_property_view_t {
1726    pub align_: i32,
1727}
1728#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1729const _: () = {
1730    ["Size of cugraph_vertex_property_view_t"][::std::mem::size_of::<cugraph_vertex_property_view_t>() - 4usize];
1731    ["Alignment of cugraph_vertex_property_view_t"][::std::mem::align_of::<cugraph_vertex_property_view_t>() - 4usize];
1732    ["Offset of field: cugraph_vertex_property_view_t::align_"]
1733        [::std::mem::offset_of!(cugraph_vertex_property_view_t, align_) - 0usize];
1734};
1735#[repr(C)]
1736#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1737pub struct cugraph_edge_property_view_t {
1738    pub align_: i32,
1739}
1740#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1741const _: () = {
1742    ["Size of cugraph_edge_property_view_t"][::std::mem::size_of::<cugraph_edge_property_view_t>() - 4usize];
1743    ["Alignment of cugraph_edge_property_view_t"][::std::mem::align_of::<cugraph_edge_property_view_t>() - 4usize];
1744    ["Offset of field: cugraph_edge_property_view_t::align_"]
1745        [::std::mem::offset_of!(cugraph_edge_property_view_t, align_) - 0usize];
1746};
1747#[doc = " @brief     Opaque random walk result type"]
1748#[repr(C)]
1749#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1750pub struct cugraph_random_walk_result_t {
1751    pub align_: i32,
1752}
1753#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1754const _: () = {
1755    ["Size of cugraph_random_walk_result_t"][::std::mem::size_of::<cugraph_random_walk_result_t>() - 4usize];
1756    ["Alignment of cugraph_random_walk_result_t"][::std::mem::align_of::<cugraph_random_walk_result_t>() - 4usize];
1757    ["Offset of field: cugraph_random_walk_result_t::align_"]
1758        [::std::mem::offset_of!(cugraph_random_walk_result_t, align_) - 0usize];
1759};
1760unsafe extern "C" {
1761    #[doc = " @brief  Compute uniform random walks\n\n @param [in]  handle          Handle for accessing resources\n @param [in,out] rng_state    State of the random number generator, updated with each call\n @param [in]  graph           Pointer to graph.  NOTE: Graph might be modified if the storage\n                              needs to be transposed\n @param [in]  start_vertices  Array of source vertices\n @param [in]  max_length      Maximum length of the generated path\n @param [out]  result         Output from the node2vec call\n @param [out] error           Pointer to an error object storing details of any error.  Will\n                              be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1762    pub fn cugraph_uniform_random_walks(
1763        handle: *const cugraph_resource_handle_t,
1764        rng_state: *mut cugraph_rng_state_t,
1765        graph: *mut cugraph_graph_t,
1766        start_vertices: *const cugraph_type_erased_device_array_view_t,
1767        max_length: usize,
1768        result: *mut *mut cugraph_random_walk_result_t,
1769        error: *mut *mut cugraph_error_t,
1770    ) -> cugraph_error_code_t;
1771}
1772unsafe extern "C" {
1773    #[doc = " @brief  Compute biased random walks\n\n @param [in]  handle          Handle for accessing resources\n @param [in,out] rng_state    State of the random number generator, updated with each call\n @param [in]  graph           Pointer to graph.  NOTE: Graph might be modified if the storage\n                              needs to be transposed\n @param [in]  start_vertices  Array of source vertices\n @param [in]  max_length      Maximum length of the generated path\n @param [out]  result         Output from the node2vec call\n @param [out] error           Pointer to an error object storing details of any error.  Will\n                              be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1774    pub fn cugraph_biased_random_walks(
1775        handle: *const cugraph_resource_handle_t,
1776        rng_state: *mut cugraph_rng_state_t,
1777        graph: *mut cugraph_graph_t,
1778        start_vertices: *const cugraph_type_erased_device_array_view_t,
1779        max_length: usize,
1780        result: *mut *mut cugraph_random_walk_result_t,
1781        error: *mut *mut cugraph_error_t,
1782    ) -> cugraph_error_code_t;
1783}
1784unsafe extern "C" {
1785    #[doc = " @brief  Compute random walks using the node2vec framework.\n\n @param [in]  handle          Handle for accessing resources\n @param [in,out] rng_state    State of the random number generator, updated with each call\n @param [in]  graph           Pointer to graph.  NOTE: Graph might be modified if the storage\n                              needs to be transposed\n @param [in]  start_vertices  Array of source vertices\n @param [in]  max_length      Maximum length of the generated path\n @param [in]  compress_result If true, return the paths as a compressed sparse row matrix,\n                              otherwise return as a dense matrix\n @param [in]  p               The return parameter\n @param [in]  q               The in/out parameter\n @param [out]  result         Output from the node2vec call\n @param [out] error           Pointer to an error object storing details of any error.  Will\n                              be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1786    pub fn cugraph_node2vec_random_walks(
1787        handle: *const cugraph_resource_handle_t,
1788        rng_state: *mut cugraph_rng_state_t,
1789        graph: *mut cugraph_graph_t,
1790        start_vertices: *const cugraph_type_erased_device_array_view_t,
1791        max_length: usize,
1792        p: f64,
1793        q: f64,
1794        result: *mut *mut cugraph_random_walk_result_t,
1795        error: *mut *mut cugraph_error_t,
1796    ) -> cugraph_error_code_t;
1797}
1798unsafe extern "C" {
1799    #[doc = " @ingroup samplingC\n @brief     Get the max path length from random walk result\n\n @param [in]   result   The result from random walks\n @return maximum path length"]
1800    pub fn cugraph_random_walk_result_get_max_path_length(result: *mut cugraph_random_walk_result_t) -> usize;
1801}
1802unsafe extern "C" {
1803    #[doc = " @ingroup samplingC\n @brief     Get the matrix (row major order) of vertices in the paths\n\n @param [in]   result   The result from a random walk algorithm\n @return type erased array pointing to the path matrix in device memory"]
1804    pub fn cugraph_random_walk_result_get_paths(
1805        result: *mut cugraph_random_walk_result_t,
1806    ) -> *mut cugraph_type_erased_device_array_view_t;
1807}
1808unsafe extern "C" {
1809    #[doc = " @ingroup samplingC\n @brief     Get the matrix (row major order) of edge weights in the paths\n\n @param [in]   result   The result from a random walk algorithm\n @return type erased array pointing to the path edge weights in device memory"]
1810    pub fn cugraph_random_walk_result_get_weights(
1811        result: *mut cugraph_random_walk_result_t,
1812    ) -> *mut cugraph_type_erased_device_array_view_t;
1813}
1814unsafe extern "C" {
1815    #[doc = " @ingroup samplingC\n @brief     If the random walk result is compressed, get the path sizes\n @deprecated This call will no longer be relevant once the new node2vec are called\n\n @param [in]   result   The result from a random walk algorithm\n @return type erased array pointing to the path sizes in device memory"]
1816    pub fn cugraph_random_walk_result_get_path_sizes(
1817        result: *mut cugraph_random_walk_result_t,
1818    ) -> *mut cugraph_type_erased_device_array_view_t;
1819}
1820unsafe extern "C" {
1821    #[doc = " @ingroup samplingC\n @brief     Free random walks result\n\n @param [in]   result   The result from random walks"]
1822    pub fn cugraph_random_walk_result_free(result: *mut cugraph_random_walk_result_t);
1823}
1824#[doc = " @brief     Opaque neighborhood sampling result type"]
1825#[repr(C)]
1826#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1827pub struct cugraph_sample_result_t {
1828    pub align_: i32,
1829}
1830#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1831const _: () = {
1832    ["Size of cugraph_sample_result_t"][::std::mem::size_of::<cugraph_sample_result_t>() - 4usize];
1833    ["Alignment of cugraph_sample_result_t"][::std::mem::align_of::<cugraph_sample_result_t>() - 4usize];
1834    ["Offset of field: cugraph_sample_result_t::align_"]
1835        [::std::mem::offset_of!(cugraph_sample_result_t, align_) - 0usize];
1836};
1837#[doc = " @brief     Opaque sampling options type"]
1838#[repr(C)]
1839#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1840pub struct cugraph_sampling_options_t {
1841    pub align_: i32,
1842}
1843#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1844const _: () = {
1845    ["Size of cugraph_sampling_options_t"][::std::mem::size_of::<cugraph_sampling_options_t>() - 4usize];
1846    ["Alignment of cugraph_sampling_options_t"][::std::mem::align_of::<cugraph_sampling_options_t>() - 4usize];
1847    ["Offset of field: cugraph_sampling_options_t::align_"]
1848        [::std::mem::offset_of!(cugraph_sampling_options_t, align_) - 0usize];
1849};
1850pub const cugraph_prior_sources_behavior_t_DEFAULT: cugraph_prior_sources_behavior_t = 0;
1851#[doc = " Construct sources for hop k from destination vertices from hop k-1"]
1852pub const cugraph_prior_sources_behavior_t_CARRY_OVER: cugraph_prior_sources_behavior_t = 1;
1853#[doc = " Construct sources for hop k from destination vertices from hop k-1\nand sources from hop k-1"]
1854pub const cugraph_prior_sources_behavior_t_EXCLUDE: cugraph_prior_sources_behavior_t = 2;
1855#[doc = " @brief     Enumeration for prior sources behavior"]
1856pub type cugraph_prior_sources_behavior_t = ::std::os::raw::c_uint;
1857pub const cugraph_temporal_sampling_comparison_t_STRICTLY_INCREASING: cugraph_temporal_sampling_comparison_t = 0;
1858#[doc = " Time strictly increasing (each time is after the previous one)"]
1859pub const cugraph_temporal_sampling_comparison_t_MONOTONICALLY_INCREASING: cugraph_temporal_sampling_comparison_t = 1;
1860#[doc = " Time monotonically increasing (could have multiple edges with same\ntime)"]
1861pub const cugraph_temporal_sampling_comparison_t_STRICTLY_DECREASING: cugraph_temporal_sampling_comparison_t = 2;
1862#[doc = " Time strictly decreasing (each time is before the previous one)"]
1863pub const cugraph_temporal_sampling_comparison_t_MONOTONICALLY_DECREASING: cugraph_temporal_sampling_comparison_t = 3;
1864#[doc = " Time monotonically decreasing (could have multiple edges with same\ntime)"]
1865pub const cugraph_temporal_sampling_comparison_t_LAST: cugraph_temporal_sampling_comparison_t = 4;
1866#[doc = " @brief   Enumeration for temporal comparison options"]
1867pub type cugraph_temporal_sampling_comparison_t = ::std::os::raw::c_uint;
1868pub const cugraph_compression_type_t_COO: cugraph_compression_type_t = 0;
1869#[doc = " Outputs in COO format.  Default."]
1870pub const cugraph_compression_type_t_CSR: cugraph_compression_type_t = 1;
1871#[doc = " Compresses in CSR format.  This means the row (src) column\nis compressed into a row pointer."]
1872pub const cugraph_compression_type_t_CSC: cugraph_compression_type_t = 2;
1873#[doc = " Compresses in CSC format.  This means the col (dst) column\nis compressed into a column pointer."]
1874pub const cugraph_compression_type_t_DCSR: cugraph_compression_type_t = 3;
1875#[doc = " Compresses in DCSR format.  This outputs an additional index\nthat avoids empty entries in the row pointer."]
1876pub const cugraph_compression_type_t_DCSC: cugraph_compression_type_t = 4;
1877#[doc = " @brief Selects the type of compression to use for the output samples."]
1878pub type cugraph_compression_type_t = ::std::os::raw::c_uint;
1879unsafe extern "C" {
1880    #[doc = " @ingroup samplingC\n @brief   Create sampling options object\n\n All sampling options set to FALSE\n\n @param [out] options Opaque pointer to the sampling options\n @param [out] error   Pointer to an error object storing details of any error.  Will\n                      be populated if error code is not CUGRAPH_SUCCESS"]
1881    pub fn cugraph_sampling_options_create(
1882        options: *mut *mut cugraph_sampling_options_t,
1883        error: *mut *mut cugraph_error_t,
1884    ) -> cugraph_error_code_t;
1885}
1886unsafe extern "C" {
1887    #[doc = " @ingroup samplingC\n @brief   Set flag to retain seeds (original sources)\n\n @param options - opaque pointer to the sampling options\n @param value - Boolean value to assign to the option"]
1888    pub fn cugraph_sampling_set_retain_seeds(options: *mut cugraph_sampling_options_t, value: bool_t);
1889}
1890unsafe extern "C" {
1891    #[doc = " @ingroup samplingC\n @brief   Set flag to renumber results\n\n @param options - opaque pointer to the sampling options\n @param value - Boolean value to assign to the option"]
1892    pub fn cugraph_sampling_set_renumber_results(options: *mut cugraph_sampling_options_t, value: bool_t);
1893}
1894unsafe extern "C" {
1895    #[doc = " @ingroup samplingC\n @brief   Set whether to compress per-hop (True) or globally (False)\n\n @param options - opaque pointer to the sampling options\n @param value - Boolean value to assign to the option"]
1896    pub fn cugraph_sampling_set_compress_per_hop(options: *mut cugraph_sampling_options_t, value: bool_t);
1897}
1898unsafe extern "C" {
1899    #[doc = " @ingroup samplingC\n @brief   Set flag to sample with_replacement\n\n @param options - opaque pointer to the sampling options\n @param value - Boolean value to assign to the option"]
1900    pub fn cugraph_sampling_set_with_replacement(options: *mut cugraph_sampling_options_t, value: bool_t);
1901}
1902unsafe extern "C" {
1903    #[doc = " @ingroup samplingC\n @brief   Set flag to sample return_hops\n\n @param options - opaque pointer to the sampling options\n @param value - Boolean value to assign to the option"]
1904    pub fn cugraph_sampling_set_return_hops(options: *mut cugraph_sampling_options_t, value: bool_t);
1905}
1906unsafe extern "C" {
1907    #[doc = " @ingroup samplingC\n @brief   Set compression type\n\n @param options - opaque pointer to the sampling options\n @param value - Enum defining the compresion type"]
1908    pub fn cugraph_sampling_set_compression_type(
1909        options: *mut cugraph_sampling_options_t,
1910        value: cugraph_compression_type_t,
1911    );
1912}
1913unsafe extern "C" {
1914    #[doc = " @ingroup samplingC\n @brief   Set prior sources behavior\n\n @param options - opaque pointer to the sampling options\n @param value - Enum defining prior sources behavior"]
1915    pub fn cugraph_sampling_set_prior_sources_behavior(
1916        options: *mut cugraph_sampling_options_t,
1917        value: cugraph_prior_sources_behavior_t,
1918    );
1919}
1920unsafe extern "C" {
1921    #[doc = " @ingroup samplingC\n @brief   Set flag to sample dedupe_sources prior to sampling\n\n @param options - opaque pointer to the sampling options\n @param value - Boolean value to assign to the option"]
1922    pub fn cugraph_sampling_set_dedupe_sources(options: *mut cugraph_sampling_options_t, value: bool_t);
1923}
1924unsafe extern "C" {
1925    #[doc = " @ingroup samplingC\n @brief Set temporal sampling to use associated comparision.\n\n @param options - opaque pointer to the sampling options\n @param comparison - Comparison value to assign to the option"]
1926    pub fn cugraph_sampling_set_temporal_sampling_comparison(
1927        options: *mut cugraph_sampling_options_t,
1928        comparison: cugraph_temporal_sampling_comparison_t,
1929    );
1930}
1931unsafe extern "C" {
1932    #[doc = " @ingroup samplingC\n @brief   Set flag to perform disjoint sampling\n\n Note: This flag is not supported in the current implementation.\n\n @param options - opaque pointer to the sampling options\n @param value - Boolean value to assign to the option"]
1933    pub fn cugraph_sampling_set_disjoint_sampling(options: *mut cugraph_sampling_options_t, value: bool_t);
1934}
1935unsafe extern "C" {
1936    #[doc = " @ingroup samplingC\n @brief     Free sampling options object\n\n @param [in]   options   Opaque pointer to sampling object"]
1937    pub fn cugraph_sampling_options_free(options: *mut cugraph_sampling_options_t);
1938}
1939unsafe extern "C" {
1940    #[doc = " @brief     Homogeneous Uniform Neighborhood Sampling\n\n Returns a sample of the neighborhood around specified start vertices and fan_out.\n The neighborhood is sampled uniformly.\n Optionally, each start vertex can be associated with a label, allowing the caller to specify\n multiple batches of sampling requests in the same function call - which should improve GPU\n utilization.\n\n If label is NULL then all start vertices will be considered part of the same batch and the\n return value will not have a label column.\n\n @param [in]  handle       Handle for accessing resources\n  * @param [in,out] rng_state State of the random number generator, updated with each call\n @param [in]  graph        Pointer to graph.  NOTE: Graph might be modified if the storage\n                           needs to be transposed\n @param [in]  start_vertices Device array of start vertices for the sampling\n @param [in]  starting_vertex_label_offsets Device array of the offsets for each label in\n the seed list. This parameter is only used with the retain_seeds option.\n @param [in]  fan_out       Host array defining the fan out at each step in the sampling\n algorithm. We only support fan_out values of type INT32\n @param [in]  sampling_options\n                           Opaque pointer defining the sampling options.\n @param [in]  do_expensive_check\n                           A flag to run expensive checks for input arguments (if set to true)\n @param [out]  result      Output from the uniform_neighbor_sample call\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1941    pub fn cugraph_homogeneous_uniform_neighbor_sample(
1942        handle: *const cugraph_resource_handle_t,
1943        rng_state: *mut cugraph_rng_state_t,
1944        graph: *mut cugraph_graph_t,
1945        start_vertices: *const cugraph_type_erased_device_array_view_t,
1946        starting_vertex_label_offsets: *const cugraph_type_erased_device_array_view_t,
1947        fan_out: *const cugraph_type_erased_host_array_view_t,
1948        options: *const cugraph_sampling_options_t,
1949        do_expensive_check: bool_t,
1950        result: *mut *mut cugraph_sample_result_t,
1951        error: *mut *mut cugraph_error_t,
1952    ) -> cugraph_error_code_t;
1953}
1954unsafe extern "C" {
1955    #[doc = " @brief     Homogeneous Biased Neighborhood Sampling\n\n Returns a sample of the neighborhood around specified start vertices and fan_out.\n The neighborhood is sampled uniformly.\n Optionally, each start vertex can be associated with a label, allowing the caller to specify\n multiple batches of sampling requests in the same function call - which should improve GPU\n utilization.\n\n If label is NULL then all start vertices will be considered part of the same batch and the\n return value will not have a label column.\n\n @param [in]  handle       Handle for accessing resources\n  * @param [in,out] rng_state State of the random number generator, updated with each call\n @param [in]  graph        Pointer to graph.  NOTE: Graph might be modified if the storage\n                           needs to be transposed\n @param [in]  edge_biases  Device array of edge biases to use for sampling.  If NULL\n use the edge weight as the bias. If set to NULL, edges will be sampled uniformly.\n @param [in]  start_vertices Device array of start vertices for the sampling\n @param [in]  starting_vertex_label_offsets Device array of the offsets for each label in\n the seed list. This parameter is only used with the retain_seeds option.\n @param [in]  fan_out       Host array defining the fan out at each step in the sampling\n algorithm. We only support fan_out values of type INT32\n @param [in]  sampling_options\n                           Opaque pointer defining the sampling options.\n @param [in]  do_expensive_check\n                           A flag to run expensive checks for input arguments (if set to true)\n @param [out]  result      Output from the uniform_neighbor_sample call\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1956    pub fn cugraph_homogeneous_biased_neighbor_sample(
1957        handle: *const cugraph_resource_handle_t,
1958        rng_state: *mut cugraph_rng_state_t,
1959        graph: *mut cugraph_graph_t,
1960        edge_biases: *const cugraph_edge_property_view_t,
1961        start_vertices: *const cugraph_type_erased_device_array_view_t,
1962        starting_vertex_label_offsets: *const cugraph_type_erased_device_array_view_t,
1963        fan_out: *const cugraph_type_erased_host_array_view_t,
1964        options: *const cugraph_sampling_options_t,
1965        do_expensive_check: bool_t,
1966        result: *mut *mut cugraph_sample_result_t,
1967        error: *mut *mut cugraph_error_t,
1968    ) -> cugraph_error_code_t;
1969}
1970unsafe extern "C" {
1971    #[doc = " @brief     Heterogeneous Uniform Neighborhood Sampling\n\n Returns a sample of the neighborhood around specified start vertices and fan_out.\n The neighborhood is sampled uniformly.\n Optionally, each start vertex can be associated with a label, allowing the caller to specify\n multiple batches of sampling requests in the same function call - which should improve GPU\n utilization.\n\n If label is NULL then all start vertices will be considered part of the same batch and the\n return value will not have a label column.\n\n @param [in]  handle       Handle for accessing resources\n  * @param [in,out] rng_state State of the random number generator, updated with each call\n @param [in]  graph        Pointer to graph.  NOTE: Graph might be modified if the storage\n                           needs to be transposed\n @param [in]  start_vertices Device array of start vertices for the sampling\n @param [in]  starting_vertex_label_offsets Device array of the offsets for each label in\n the seed list. This parameter is only used with the retain_seeds option.\n @param [in]  vertex_type_offsets Device array of the offsets for each vertex type in the\n graph.\n @param [in]  fan_out       Host array defining the fan out at each step in the sampling\n algorithm. We only support fan_out values of type INT32\n @param [in]  num_edge_types Number of edge types where a value of 1 translates to homogeneous\n neighbor sample whereas a value greater than 1 translates to heterogeneous neighbor sample.\n @param [in]  sampling_options\n                           Opaque pointer defining the sampling options.\n @param [in]  do_expensive_check\n                           A flag to run expensive checks for input arguments (if set to true)\n @param [out]  result      Output from the uniform_neighbor_sample call\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1972    pub fn cugraph_heterogeneous_uniform_neighbor_sample(
1973        handle: *const cugraph_resource_handle_t,
1974        rng_state: *mut cugraph_rng_state_t,
1975        graph: *mut cugraph_graph_t,
1976        start_vertices: *const cugraph_type_erased_device_array_view_t,
1977        starting_vertex_label_offsets: *const cugraph_type_erased_device_array_view_t,
1978        vertex_type_offsets: *const cugraph_type_erased_device_array_view_t,
1979        fan_out: *const cugraph_type_erased_host_array_view_t,
1980        num_edge_types: ::std::os::raw::c_int,
1981        options: *const cugraph_sampling_options_t,
1982        do_expensive_check: bool_t,
1983        result: *mut *mut cugraph_sample_result_t,
1984        error: *mut *mut cugraph_error_t,
1985    ) -> cugraph_error_code_t;
1986}
1987unsafe extern "C" {
1988    #[doc = " @brief     Heterogeneous Biased Neighborhood Sampling\n\n Returns a sample of the neighborhood around specified start vertices and fan_out.\n The neighborhood is sampled uniformly.\n Optionally, each start vertex can be associated with a label, allowing the caller to specify\n multiple batches of sampling requests in the same function call - which should improve GPU\n utilization.\n\n If label is NULL then all start vertices will be considered part of the same batch and the\n return value will not have a label column.\n\n @param [in]  handle       Handle for accessing resources\n  * @param [in,out] rng_state State of the random number generator, updated with each call\n @param [in]  graph        Pointer to graph.  NOTE: Graph might be modified if the storage\n                           needs to be transposed\n @param [in]  edge_biases  Device array of edge biases to use for sampling.  If NULL\n use the edge weight as the bias. If set to NULL, edges will be sampled uniformly.\n @param [in]  start_vertices Device array of start vertices for the sampling\n @param [in]  starting_vertex_label_offsets Device array of the offsets for each label in\n the seed list. This parameter is only used with the retain_seeds option.\n @param [in]  vertex_type_offsets Device array of the offsets for each vertex type in the\n graph.\n @param [in]  fan_out       Host array defining the fan out at each step in the sampling\n algorithm. We only support fan_out values of type INT32\n @param [in]  num_edge_types Number of edge types where a value of 1 translates to homogeneous\n neighbor sample whereas a value greater than 1 translates to heterogeneous neighbor sample.\n @param [in]  sampling_options\n                           Opaque pointer defining the sampling options.\n @param [in]  do_expensive_check\n                           A flag to run expensive checks for input arguments (if set to true)\n @param [out]  result      Output from the uniform_neighbor_sample call\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
1989    pub fn cugraph_heterogeneous_biased_neighbor_sample(
1990        handle: *const cugraph_resource_handle_t,
1991        rng_state: *mut cugraph_rng_state_t,
1992        graph: *mut cugraph_graph_t,
1993        edge_biases: *const cugraph_edge_property_view_t,
1994        start_vertices: *const cugraph_type_erased_device_array_view_t,
1995        starting_vertex_label_offsets: *const cugraph_type_erased_device_array_view_t,
1996        vertex_type_offsets: *const cugraph_type_erased_device_array_view_t,
1997        fan_out: *const cugraph_type_erased_host_array_view_t,
1998        num_edge_types: ::std::os::raw::c_int,
1999        options: *const cugraph_sampling_options_t,
2000        do_expensive_check: bool_t,
2001        result: *mut *mut cugraph_sample_result_t,
2002        error: *mut *mut cugraph_error_t,
2003    ) -> cugraph_error_code_t;
2004}
2005unsafe extern "C" {
2006    #[doc = " @brief     Homogeneous Uniform Temporal Neighborhood Sampling\n\n Returns a sample of the neighborhood around specified start vertices and fan_out.\n The neighborhood is sampled uniformly.\n\n Temporal sampling considers the time associated with the edges.  For example, if we start at\n vertex v1 and sample an edge that takes us to vertex v2 at time t1, when we sample in the next\n hop from vertex v2, we want to consider only edges that occur after time t1.\n\n Optionally, each start vertex can be associated with a label, allowing the caller to specify\n multiple batches of sampling requests in the same function call - which should improve GPU\n utilization.\n\n If label is NULL then all start vertices will be considered part of the same batch and the\n return value will not have a label column.\n\n @param [in]  handle       Handle for accessing resources\n @param [in,out] rng_state State of the random number generator, updated with each call\n @param [in]  graph        Pointer to graph.  NOTE: Graph might be modified if the storage\n                           needs to be transposed\n @param [in]  temporal_property_name Name associated with the edge property in the graph that\n should be used as the time.  Currently unused.\n @param [in]  start_vertices Device array of start vertices for the sampling\n @param [in]  starting_vertex_times Optional device span of times associated with each starting\n vertex for the sampling.\n @param [in]  starting_vertex_label_offsets Device array of the offsets for each label in\n the seed list. This parameter is only used with the retain_seeds option.\n @param [in]  fan_out       Host array defining the fan out at each step in the sampling\n algorithm. We only support fan_out values of type INT32\n @param [in]  sampling_options\n                           Opaque pointer defining the sampling options.\n @param [in]  do_expensive_check\n                           A flag to run expensive checks for input arguments (if set to true)\n @param [out]  result      Output from the uniform_neighbor_sample call\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2007    pub fn cugraph_homogeneous_uniform_temporal_neighbor_sample(
2008        handle: *const cugraph_resource_handle_t,
2009        rng_state: *mut cugraph_rng_state_t,
2010        graph: *mut cugraph_graph_t,
2011        temporal_property_name: *const ::std::os::raw::c_char,
2012        start_vertices: *const cugraph_type_erased_device_array_view_t,
2013        starting_vertex_times: *const cugraph_type_erased_device_array_view_t,
2014        starting_vertex_label_offsets: *const cugraph_type_erased_device_array_view_t,
2015        fan_out: *const cugraph_type_erased_host_array_view_t,
2016        sampling_options: *const cugraph_sampling_options_t,
2017        do_expensive_check: bool_t,
2018        result: *mut *mut cugraph_sample_result_t,
2019        error: *mut *mut cugraph_error_t,
2020    ) -> cugraph_error_code_t;
2021}
2022unsafe extern "C" {
2023    #[doc = " @brief     Homogeneous Biased Temporal Neighborhood Sampling\n\n Returns a sample of the neighborhood around specified start vertices and fan_out.\n The neighborhood is sampled uniformly.\n\n Temporal sampling considers the time associated with the edges.  For example, if we start at\n vertex v1 and sample an edge that takes us to vertex v2 at time t1, when we sample in the next\n hop from vertex v2, we want to consider only edges that occur after time t1.\n\n Optionally, each start vertex can be associated with a label, allowing the caller to specify\n multiple batches of sampling requests in the same function call - which should improve GPU\n utilization.\n\n If label is NULL then all start vertices will be considered part of the same batch and the\n return value will not have a label column.\n\n @param [in]  handle       Handle for accessing resources\n @param [in,out] rng_state State of the random number generator, updated with each call\n @param [in]  graph        Pointer to graph.  NOTE: Graph might be modified if the storage\n                           needs to be transposed\n @param [in]  temporal_property_name Name associated with the edge property in the graph that\n should be used as the time.  Currently unused.\n @param [in]  edge_biases  Device array of edge biases to use for sampling.  If NULL\n use the edge weight as the bias. If set to NULL, edges will be sampled uniformly.\n @param [in]  start_vertices Device array of start vertices for the sampling\n @param [in]  starting_vertex_times Optional device span of times associated with each starting\n vertex for the sampling.\n @param [in]  starting_vertex_label_offsets Device array of the offsets for each label in\n the seed list. This parameter is only used with the retain_seeds option.\n @param [in]  fan_out       Host array defining the fan out at each step in the sampling\n algorithm. We only support fan_out values of type INT32\n @param [in]  sampling_options\n                           Opaque pointer defining the sampling options.\n @param [in]  do_expensive_check\n                           A flag to run expensive checks for input arguments (if set to true)\n @param [out]  result      Output from the uniform_neighbor_sample call\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2024    pub fn cugraph_homogeneous_biased_temporal_neighbor_sample(
2025        handle: *const cugraph_resource_handle_t,
2026        rng_state: *mut cugraph_rng_state_t,
2027        graph: *mut cugraph_graph_t,
2028        temporal_property_name: *const ::std::os::raw::c_char,
2029        edge_biases: *const cugraph_edge_property_view_t,
2030        start_vertices: *const cugraph_type_erased_device_array_view_t,
2031        starting_vertex_times: *const cugraph_type_erased_device_array_view_t,
2032        starting_vertex_label_offsets: *const cugraph_type_erased_device_array_view_t,
2033        fan_out: *const cugraph_type_erased_host_array_view_t,
2034        sampling_options: *const cugraph_sampling_options_t,
2035        do_expensive_check: bool_t,
2036        result: *mut *mut cugraph_sample_result_t,
2037        error: *mut *mut cugraph_error_t,
2038    ) -> cugraph_error_code_t;
2039}
2040unsafe extern "C" {
2041    #[doc = " @brief     Heterogeneous Uniform Temporal Neighborhood Sampling\n\n Returns a sample of the neighborhood around specified start vertices and fan_out.\n The neighborhood is sampled uniformly.\n\n Temporal sampling considers the time associated with the edges.  For example, if we start at\n vertex v1 and sample an edge that takes us to vertex v2 at time t1, when we sample in the next\n hop from vertex v2, we want to consider only edges that occur after time t1.\n\n Optionally, each start vertex can be associated with a label, allowing the caller to specify\n multiple batches of sampling requests in the same function call - which should improve GPU\n utilization.\n\n If label is NULL then all start vertices will be considered part of the same batch and the\n return value will not have a label column.\n\n @param [in]  handle       Handle for accessing resources\n @param [in,out] rng_state State of the random number generator, updated with each call\n @param [in]  graph        Pointer to graph.  NOTE: Graph might be modified if the storage\n                           needs to be transposed\n @param [in]  temporal_property_name Name associated with the edge property in the graph that\n should be used as the time.  Currently unused.\n @param [in]  start_vertices Device array of start vertices for the sampling\n @param [in]  starting_vertex_times Optional device span of times associated with each starting\n vertex for the sampling.\n @param [in]  starting_vertex_label_offsets Device array of the offsets for each label in\n the seed list. This parameter is only used with the retain_seeds option.\n @param [in]  vertex_type_offsets Device array of the offsets for each vertex type in the\n graph.\n @param [in]  fan_out       Host array defining the fan out at each step in the sampling\n algorithm. We only support fan_out values of type INT32\n @param [in]  num_edge_types Number of edge types where a value of 1 translates to homogeneous\n neighbor sample whereas a value greater than 1 translates to heterogeneous neighbor sample.\n @param [in]  sampling_options\n                           Opaque pointer defining the sampling options.\n @param [in]  do_expensive_check\n                           A flag to run expensive checks for input arguments (if set to true)\n @param [out]  result      Output from the uniform_neighbor_sample call\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2042    pub fn cugraph_heterogeneous_uniform_temporal_neighbor_sample(
2043        handle: *const cugraph_resource_handle_t,
2044        rng_state: *mut cugraph_rng_state_t,
2045        graph: *mut cugraph_graph_t,
2046        temporal_property_name: *const ::std::os::raw::c_char,
2047        start_vertices: *const cugraph_type_erased_device_array_view_t,
2048        starting_vertex_times: *const cugraph_type_erased_device_array_view_t,
2049        starting_vertex_label_offsets: *const cugraph_type_erased_device_array_view_t,
2050        vertex_type_offsets: *const cugraph_type_erased_device_array_view_t,
2051        fan_out: *const cugraph_type_erased_host_array_view_t,
2052        num_edge_types: ::std::os::raw::c_int,
2053        sampling_options: *const cugraph_sampling_options_t,
2054        do_expensive_check: bool_t,
2055        result: *mut *mut cugraph_sample_result_t,
2056        error: *mut *mut cugraph_error_t,
2057    ) -> cugraph_error_code_t;
2058}
2059unsafe extern "C" {
2060    #[doc = " @brief     Heterogeneous Biased Temporal Neighborhood Sampling\n\n Returns a sample of the neighborhood around specified start vertices and fan_out.\n The neighborhood is sampled uniformly.\n\n Temporal sampling considers the time associated with the edges.  For example, if we start at\n vertex v1 and sample an edge that takes us to vertex v2 at time t1, when we sample in the next\n hop from vertex v2, we want to consider only edges that occur after time t1.\n\n Optionally, each start vertex can be associated with a label, allowing the caller to specify\n multiple batches of sampling requests in the same function call - which should improve GPU\n utilization.\n\n If label is NULL then all start vertices will be considered part of the same batch and the\n return value will not have a label column.\n\n @param [in]  handle       Handle for accessing resources\n @param [in,out] rng_state State of the random number generator, updated with each call\n @param [in]  graph        Pointer to graph.  NOTE: Graph might be modified if the storage\n                           needs to be transposed\n @param [in]  temporal_property_name Name associated with the edge property in the graph that\n should be used as the time.  Currently unused.\n @param [in]  edge_biases  Device array of edge biases to use for sampling.  If NULL\n use the edge weight as the bias. If set to NULL, edges will be sampled uniformly.\n @param [in]  start_vertices Device array of start vertices for the sampling\n @param [in]  starting_vertex_times Optional device span of times associated with each starting\n vertex for the sampling.\n @param [in]  starting_vertex_label_offsets Device array of the offsets for each label in\n the seed list. This parameter is only used with the retain_seeds option.\n @param [in]  vertex_type_offsets Device array of the offsets for each vertex type in the\n graph.\n @param [in]  fan_out       Host array defining the fan out at each step in the sampling\n algorithm. We only support fan_out values of type INT32\n @param [in]  num_edge_types Number of edge types where a value of 1 translates to homogeneous\n neighbor sample whereas a value greater than 1 translates to heterogeneous neighbor sample.\n @param [in]  sampling_options\n                           Opaque pointer defining the sampling options.\n @param [in]  do_expensive_check\n                           A flag to run expensive checks for input arguments (if set to true)\n @param [out]  result      Output from the uniform_neighbor_sample call\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2061    pub fn cugraph_heterogeneous_biased_temporal_neighbor_sample(
2062        handle: *const cugraph_resource_handle_t,
2063        rng_state: *mut cugraph_rng_state_t,
2064        graph: *mut cugraph_graph_t,
2065        temporal_property_name: *const ::std::os::raw::c_char,
2066        edge_biases: *const cugraph_edge_property_view_t,
2067        start_vertices: *const cugraph_type_erased_device_array_view_t,
2068        starting_vertex_times: *const cugraph_type_erased_device_array_view_t,
2069        starting_vertex_label_offsets: *const cugraph_type_erased_device_array_view_t,
2070        vertex_type_offsets: *const cugraph_type_erased_device_array_view_t,
2071        fan_out: *const cugraph_type_erased_host_array_view_t,
2072        num_edge_types: ::std::os::raw::c_int,
2073        sampling_options: *const cugraph_sampling_options_t,
2074        do_expensive_check: bool_t,
2075        result: *mut *mut cugraph_sample_result_t,
2076        error: *mut *mut cugraph_error_t,
2077    ) -> cugraph_error_code_t;
2078}
2079unsafe extern "C" {
2080    #[doc = " @deprecated This call should be replaced with cugraph_sample_result_get_majors\n @brief     Get the source vertices from the sampling algorithm result\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the source vertices in device memory"]
2081    pub fn cugraph_sample_result_get_sources(
2082        result: *const cugraph_sample_result_t,
2083    ) -> *mut cugraph_type_erased_device_array_view_t;
2084}
2085unsafe extern "C" {
2086    #[doc = " @deprecated This call should be replaced with cugraph_sample_result_get_minors\n @brief     Get the destination vertices from the sampling algorithm result\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the destination vertices in device memory"]
2087    pub fn cugraph_sample_result_get_destinations(
2088        result: *const cugraph_sample_result_t,
2089    ) -> *mut cugraph_type_erased_device_array_view_t;
2090}
2091unsafe extern "C" {
2092    #[doc = " @ingroup samplingC\n @brief     Get the major vertices from the sampling algorithm result\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the major vertices in device memory"]
2093    pub fn cugraph_sample_result_get_majors(
2094        result: *const cugraph_sample_result_t,
2095    ) -> *mut cugraph_type_erased_device_array_view_t;
2096}
2097unsafe extern "C" {
2098    #[doc = " @ingroup samplingC\n @brief     Get the minor vertices from the sampling algorithm result\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the minor vertices in device memory"]
2099    pub fn cugraph_sample_result_get_minors(
2100        result: *const cugraph_sample_result_t,
2101    ) -> *mut cugraph_type_erased_device_array_view_t;
2102}
2103unsafe extern "C" {
2104    #[doc = " @ingroup samplingC\n @brief     Get the major offsets from the sampling algorithm result\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the major offsets in device memory"]
2105    pub fn cugraph_sample_result_get_major_offsets(
2106        result: *const cugraph_sample_result_t,
2107    ) -> *mut cugraph_type_erased_device_array_view_t;
2108}
2109unsafe extern "C" {
2110    #[doc = " @ingroup samplingC\n @brief     Get the start labels from the sampling algorithm result\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the start labels"]
2111    pub fn cugraph_sample_result_get_start_labels(
2112        result: *const cugraph_sample_result_t,
2113    ) -> *mut cugraph_type_erased_device_array_view_t;
2114}
2115unsafe extern "C" {
2116    #[doc = " @ingroup samplingC\n @brief     Get the edge_id from the sampling algorithm result\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the edge_id"]
2117    pub fn cugraph_sample_result_get_edge_id(
2118        result: *const cugraph_sample_result_t,
2119    ) -> *mut cugraph_type_erased_device_array_view_t;
2120}
2121unsafe extern "C" {
2122    #[doc = " @ingroup samplingC\n @brief     Get the edge_type from the sampling algorithm result\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the edge_type"]
2123    pub fn cugraph_sample_result_get_edge_type(
2124        result: *const cugraph_sample_result_t,
2125    ) -> *mut cugraph_type_erased_device_array_view_t;
2126}
2127unsafe extern "C" {
2128    #[doc = " @ingroup samplingC\n @brief     Get the edge_weight from the sampling algorithm result\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the edge_weight"]
2129    pub fn cugraph_sample_result_get_edge_weight(
2130        result: *const cugraph_sample_result_t,
2131    ) -> *mut cugraph_type_erased_device_array_view_t;
2132}
2133unsafe extern "C" {
2134    #[doc = " @ingroup samplingC\n @brief     Get the edge_start_time from the sampling algorithm result\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the edge_start_time"]
2135    pub fn cugraph_sample_result_get_edge_start_time(
2136        result: *const cugraph_sample_result_t,
2137    ) -> *mut cugraph_type_erased_device_array_view_t;
2138}
2139unsafe extern "C" {
2140    #[doc = " @ingroup samplingC\n @brief     Get the edge_end_time from the sampling algorithm result\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the edge_end_time"]
2141    pub fn cugraph_sample_result_get_edge_end_time(
2142        result: *const cugraph_sample_result_t,
2143    ) -> *mut cugraph_type_erased_device_array_view_t;
2144}
2145unsafe extern "C" {
2146    #[doc = " @ingroup samplingC\n @brief     Get the hop from the sampling algorithm result\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the hop"]
2147    pub fn cugraph_sample_result_get_hop(
2148        result: *const cugraph_sample_result_t,
2149    ) -> *mut cugraph_type_erased_device_array_view_t;
2150}
2151unsafe extern "C" {
2152    #[doc = " @ingroup samplingC\n @brief     Get the label-hop offsets from the sampling algorithm result\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the label-hop offsets"]
2153    pub fn cugraph_sample_result_get_label_hop_offsets(
2154        result: *const cugraph_sample_result_t,
2155    ) -> *mut cugraph_type_erased_device_array_view_t;
2156}
2157unsafe extern "C" {
2158    #[doc = " @ingroup samplingC\n @brief     Get the label-type-hop offsets from the sampling algorithm result\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the label-type-hop offsets"]
2159    pub fn cugraph_sample_result_get_label_type_hop_offsets(
2160        result: *const cugraph_sample_result_t,
2161    ) -> *mut cugraph_type_erased_device_array_view_t;
2162}
2163unsafe extern "C" {
2164    #[doc = " @ingroup samplingC\n @brief     Get the index from the sampling algorithm result\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the index"]
2165    pub fn cugraph_sample_result_get_index(
2166        result: *const cugraph_sample_result_t,
2167    ) -> *mut cugraph_type_erased_device_array_view_t;
2168}
2169unsafe extern "C" {
2170    #[doc = " @deprecated This call should be replaced with cugraph_sample_get_get_label_hop_offsets\n @brief     Get the result offsets from the sampling algorithm result\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the result offsets"]
2171    pub fn cugraph_sample_result_get_offsets(
2172        result: *const cugraph_sample_result_t,
2173    ) -> *mut cugraph_type_erased_device_array_view_t;
2174}
2175unsafe extern "C" {
2176    #[doc = " @ingroup samplingC\n @brief     Get the renumber map\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the renumber map"]
2177    pub fn cugraph_sample_result_get_renumber_map(
2178        result: *const cugraph_sample_result_t,
2179    ) -> *mut cugraph_type_erased_device_array_view_t;
2180}
2181unsafe extern "C" {
2182    #[doc = " @ingroup samplingC\n @brief     Get the renumber map offsets\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the renumber map offsets"]
2183    pub fn cugraph_sample_result_get_renumber_map_offsets(
2184        result: *const cugraph_sample_result_t,
2185    ) -> *mut cugraph_type_erased_device_array_view_t;
2186}
2187unsafe extern "C" {
2188    #[doc = " @ingroup samplingC\n @brief     Get the edge renumber map\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the renumber map"]
2189    pub fn cugraph_sample_result_get_edge_renumber_map(
2190        result: *const cugraph_sample_result_t,
2191    ) -> *mut cugraph_type_erased_device_array_view_t;
2192}
2193unsafe extern "C" {
2194    #[doc = " @ingroup samplingC\n @brief     Get the edge renumber map offets\n\n @param [in]   result   The result from a sampling algorithm\n @return type erased array pointing to the renumber map"]
2195    pub fn cugraph_sample_result_get_edge_renumber_map_offsets(
2196        result: *const cugraph_sample_result_t,
2197    ) -> *mut cugraph_type_erased_device_array_view_t;
2198}
2199unsafe extern "C" {
2200    #[doc = " @ingroup samplingC\n @brief     Free a sampling result\n\n @param [in]   result   The result from a sampling algorithm"]
2201    pub fn cugraph_sample_result_free(result: *mut cugraph_sample_result_t);
2202}
2203unsafe extern "C" {
2204    #[doc = " @ingroup samplingC\n @brief     Create a sampling result (testing API)\n\n @param [in]   handle         Handle for accessing resources\n @param [in]   srcs           Device array view to populate srcs\n @param [in]   dsts           Device array view to populate dsts\n @param [in]   edge_id        Device array view to populate edge_id (can be NULL)\n @param [in]   edge_type      Device array view to populate edge_type (can be NULL)\n @param [in]   wgt            Device array view to populate wgt (can be NULL)\n @param [in]   hop            Device array view to populate hop\n @param [in]   label          Device array view to populate label (can be NULL)\n @param [out]  result         Pointer to the location to store the\n                              cugraph_sample_result_t*\n @param [out]  error          Pointer to an error object storing details of\n                              any error.  Will be populated if error code is\n                              not CUGRAPH_SUCCESS\n @return error code"]
2205    pub fn cugraph_test_sample_result_create(
2206        handle: *const cugraph_resource_handle_t,
2207        srcs: *const cugraph_type_erased_device_array_view_t,
2208        dsts: *const cugraph_type_erased_device_array_view_t,
2209        edge_id: *const cugraph_type_erased_device_array_view_t,
2210        edge_type: *const cugraph_type_erased_device_array_view_t,
2211        wgt: *const cugraph_type_erased_device_array_view_t,
2212        hop: *const cugraph_type_erased_device_array_view_t,
2213        label: *const cugraph_type_erased_device_array_view_t,
2214        result: *mut *mut cugraph_sample_result_t,
2215        error: *mut *mut cugraph_error_t,
2216    ) -> cugraph_error_code_t;
2217}
2218unsafe extern "C" {
2219    #[doc = " @ingroup samplingC\n @brief     Create a sampling result (testing API)\n\n @param [in]   handle         Handle for accessing resources\n @param [in]   srcs           Device array view to populate srcs\n @param [in]   dsts           Device array view to populate dsts\n @param [in]   edge_id        Device array view to populate edge_id\n @param [in]   edge_type      Device array view to populate edge_type\n @param [in]   weight         Device array view to populate weight\n @param [in]   hop            Device array view to populate hop\n @param [in]   label          Device array view to populate label\n @param [out]  result         Pointer to the location to store the\n                              cugraph_sample_result_t*\n @param [out]  error          Pointer to an error object storing details of\n                              any error.  Will be populated if error code is\n                              not CUGRAPH_SUCCESS\n @return error code"]
2220    pub fn cugraph_test_uniform_neighborhood_sample_result_create(
2221        handle: *const cugraph_resource_handle_t,
2222        srcs: *const cugraph_type_erased_device_array_view_t,
2223        dsts: *const cugraph_type_erased_device_array_view_t,
2224        edge_id: *const cugraph_type_erased_device_array_view_t,
2225        edge_type: *const cugraph_type_erased_device_array_view_t,
2226        weight: *const cugraph_type_erased_device_array_view_t,
2227        hop: *const cugraph_type_erased_device_array_view_t,
2228        label: *const cugraph_type_erased_device_array_view_t,
2229        result: *mut *mut cugraph_sample_result_t,
2230        error: *mut *mut cugraph_error_t,
2231    ) -> cugraph_error_code_t;
2232}
2233unsafe extern "C" {
2234    #[doc = " @ingroup samplingC\n @brief Select random vertices from the graph\n\n @param [in]      handle        Handle for accessing resources\n @param [in]      graph         Pointer to graph\n @param [in,out]  rng_state     State of the random number generator, updated with each call\n @param [in]      num_vertices  Number of vertices to sample\n @param [out]     vertices      Device array view to populate label\n @param [out]     error         Pointer to an error object storing details of\n                                any error.  Will be populated if error code is\n                                not CUGRAPH_SUCCESS\n @return error code"]
2235    pub fn cugraph_select_random_vertices(
2236        handle: *const cugraph_resource_handle_t,
2237        graph: *const cugraph_graph_t,
2238        rng_state: *mut cugraph_rng_state_t,
2239        num_vertices: usize,
2240        vertices: *mut *mut cugraph_type_erased_device_array_t,
2241        error: *mut *mut cugraph_error_t,
2242    ) -> cugraph_error_code_t;
2243}
2244unsafe extern "C" {
2245    #[doc = " @ingroup samplingC\n @brief Perform negative sampling\n\n Negative sampling generates a COO structure defining edges according to the specified parameters\n\n @param [in]     handle                  Handle for accessing resources\n @param [in,out] rng_state               State of the random number generator, updated with each\n                                         call\n @param [in]     graph                   Pointer to graph\n @param [in]     vertices                Vertex ids for the source biases.  If @p src_bias and\n                                         @p dst_bias are not specified this is ignored.  If\n                                         @p vertices is specified then vertices[i] is the vertex\n                                         id of src_biases[i] and dst_biases[i].  If @p vertices\n                                         is not specified then i is the vertex id if src_biases[i]\n                                         and dst_biases[i]\n @param [in]     src_biases              Bias for selecting source vertices.  If NULL, do uniform\n                                         sampling, if provided probability of vertex i will be\n                                         src_bias[i] / (sum of all source biases)\n @param [in]     dst_biases              Bias for selecting destination vertices.  If NULL, do\n                                         uniform sampling, if provided probability of vertex i\n                                         will be dst_bias[i] / (sum of all destination biases)\n @param [in]     num_samples             Number of negative samples to generate\n @param [in]     remove_duplicates       If true, remove duplicates from sampled edges\n @param [in]     remove_existing_edges   If true, remove sampled edges that actually exist in\n                                         the graph\n @param [in]     exact_number_of_samples If true, result should contain exactly @p num_samples. If\n                                         false the code will generate @p num_samples and then do\n                                         any filtering as specified\n @param [in]     do_expensive_check      A flag to run expensive checks for input arguments (if\n                                         set to true)\n @param [out]    result                  Opaque pointer to generated coo list\n @param [out]    error                   Pointer to an error object storing details of any error.\n                                         Will be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2246    pub fn cugraph_negative_sampling(
2247        handle: *const cugraph_resource_handle_t,
2248        rng_state: *mut cugraph_rng_state_t,
2249        graph: *mut cugraph_graph_t,
2250        vertices: *const cugraph_type_erased_device_array_view_t,
2251        src_biases: *const cugraph_type_erased_device_array_view_t,
2252        dst_biases: *const cugraph_type_erased_device_array_view_t,
2253        num_samples: usize,
2254        remove_duplicates: bool_t,
2255        remove_existing_edges: bool_t,
2256        exact_number_of_samples: bool_t,
2257        do_expensive_check: bool_t,
2258        result: *mut *mut cugraph_coo_t,
2259        error: *mut *mut cugraph_error_t,
2260    ) -> cugraph_error_code_t;
2261}
2262#[doc = " @brief       Opaque similarity result type"]
2263#[repr(C)]
2264#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2265pub struct cugraph_similarity_result_t {
2266    pub align_: i32,
2267}
2268#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2269const _: () = {
2270    ["Size of cugraph_similarity_result_t"][::std::mem::size_of::<cugraph_similarity_result_t>() - 4usize];
2271    ["Alignment of cugraph_similarity_result_t"][::std::mem::align_of::<cugraph_similarity_result_t>() - 4usize];
2272    ["Offset of field: cugraph_similarity_result_t::align_"]
2273        [::std::mem::offset_of!(cugraph_similarity_result_t, align_) - 0usize];
2274};
2275unsafe extern "C" {
2276    #[doc = " @ingroup similarity\n @brief       Get vertex pair from the similarity result.\n\n @param [in]     result   The result from a similarity algorithm\n @return vertex pairs"]
2277    pub fn cugraph_similarity_result_get_vertex_pairs(
2278        result: *mut cugraph_similarity_result_t,
2279    ) -> *mut cugraph_vertex_pairs_t;
2280}
2281unsafe extern "C" {
2282    #[doc = " @ingroup similarity\n @brief       Get the similarity coefficient array\n\n @param [in]     result   The result from a similarity algorithm\n @return type erased array of similarity coefficients"]
2283    pub fn cugraph_similarity_result_get_similarity(
2284        result: *mut cugraph_similarity_result_t,
2285    ) -> *mut cugraph_type_erased_device_array_view_t;
2286}
2287unsafe extern "C" {
2288    #[doc = " @ingroup similarity\n @brief     Free similarity result\n\n @param [in]    result    The result from a similarity algorithm"]
2289    pub fn cugraph_similarity_result_free(result: *mut cugraph_similarity_result_t);
2290}
2291unsafe extern "C" {
2292    #[doc = " @brief     Perform Jaccard similarity computation\n\n Compute the similarity for the specified vertex_pairs\n\n Note that Jaccard similarity must run on a symmetric graph.\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph\n @param [in]  vertex_pairs Vertex pair for input\n @param [in]  use_weight   If true consider the edge weight in the graph, if false use an\n                           edge weight of 1\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result       Opaque pointer to similarity results\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2293    pub fn cugraph_jaccard_coefficients(
2294        handle: *const cugraph_resource_handle_t,
2295        graph: *mut cugraph_graph_t,
2296        vertex_pairs: *const cugraph_vertex_pairs_t,
2297        use_weight: bool_t,
2298        do_expensive_check: bool_t,
2299        result: *mut *mut cugraph_similarity_result_t,
2300        error: *mut *mut cugraph_error_t,
2301    ) -> cugraph_error_code_t;
2302}
2303unsafe extern "C" {
2304    #[doc = " @brief     Perform Sorensen similarity computation\n\n Compute the similarity for the specified vertex_pairs\n\n Note that Sorensen similarity must run on a symmetric graph.\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph\n @param [in]  vertex_pairs Vertex pair for input\n @param [in]  use_weight   If true consider the edge weight in the graph, if false use an\n                           edge weight of 1\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result       Opaque pointer to similarity results\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2305    pub fn cugraph_sorensen_coefficients(
2306        handle: *const cugraph_resource_handle_t,
2307        graph: *mut cugraph_graph_t,
2308        vertex_pairs: *const cugraph_vertex_pairs_t,
2309        use_weight: bool_t,
2310        do_expensive_check: bool_t,
2311        result: *mut *mut cugraph_similarity_result_t,
2312        error: *mut *mut cugraph_error_t,
2313    ) -> cugraph_error_code_t;
2314}
2315unsafe extern "C" {
2316    #[doc = " @brief     Perform overlap similarity computation\n\n Compute the similarity for the specified vertex_pairs\n\n Note that overlap similarity must run on a symmetric graph.\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph\n @param [in]  vertex_pairs Vertex pair for input\n @param [in]  use_weight   If true consider the edge weight in the graph, if false use an\n                           edge weight of 1\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result       Opaque pointer to similarity results\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2317    pub fn cugraph_overlap_coefficients(
2318        handle: *const cugraph_resource_handle_t,
2319        graph: *mut cugraph_graph_t,
2320        vertex_pairs: *const cugraph_vertex_pairs_t,
2321        use_weight: bool_t,
2322        do_expensive_check: bool_t,
2323        result: *mut *mut cugraph_similarity_result_t,
2324        error: *mut *mut cugraph_error_t,
2325    ) -> cugraph_error_code_t;
2326}
2327unsafe extern "C" {
2328    #[doc = " @brief     Perform cosine similarity computation\n\n Compute the similarity for the specified vertex_pairs\n\n Note that cosine similarity must run on a symmetric graph.\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph\n @param [in]  vertex_pairs Vertex pair for input\n @param [in]  use_weight   If true consider the edge weight in the graph, if false use an\n                           edge weight of 1\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result       Opaque pointer to similarity results\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2329    pub fn cugraph_cosine_similarity_coefficients(
2330        handle: *const cugraph_resource_handle_t,
2331        graph: *mut cugraph_graph_t,
2332        vertex_pairs: *const cugraph_vertex_pairs_t,
2333        use_weight: bool_t,
2334        do_expensive_check: bool_t,
2335        result: *mut *mut cugraph_similarity_result_t,
2336        error: *mut *mut cugraph_error_t,
2337    ) -> cugraph_error_code_t;
2338}
2339unsafe extern "C" {
2340    #[doc = " @brief     Perform All-Pairs Jaccard similarity computation\n\n Compute the similarity for all vertex pairs derived from the two-hop neighbors\n of an optional specified vertex list.  This function will identify the two-hop\n neighbors of the specified vertices (all vertices in the graph if not specified)\n and compute similarity for those vertices.\n\n If the topk parameter is specified then the result will only contain the top k\n highest scoring results.\n\n Note that Jaccard similarity must run on a symmetric graph.\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph\n @param [in]  vertices     Vertex list for input.  If null then compute based on\n                           all vertices in the graph.\n @param [in]  use_weight   If true consider the edge weight in the graph, if false use an\n                           edge weight of 1\n @param [in]  topk         Specify how many answers to return.  Specifying SIZE_MAX\n                           will return all values.\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result       Opaque pointer to similarity results\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2341    pub fn cugraph_all_pairs_jaccard_coefficients(
2342        handle: *const cugraph_resource_handle_t,
2343        graph: *mut cugraph_graph_t,
2344        vertices: *const cugraph_type_erased_device_array_view_t,
2345        use_weight: bool_t,
2346        topk: usize,
2347        do_expensive_check: bool_t,
2348        result: *mut *mut cugraph_similarity_result_t,
2349        error: *mut *mut cugraph_error_t,
2350    ) -> cugraph_error_code_t;
2351}
2352unsafe extern "C" {
2353    #[doc = " @brief     Perform All Pairs Sorensen similarity computation\n\n Compute the similarity for all vertex pairs derived from the two-hop neighbors\n of an optional specified vertex list.  This function will identify the two-hop\n neighbors of the specified vertices (all vertices in the graph if not specified)\n and compute similarity for those vertices.\n\n If the topk parameter is specified then the result will only contain the top k\n highest scoring results.\n\n Note that Sorensen similarity must run on a symmetric graph.\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph\n @param [in]  vertices     Vertex list for input.  If null then compute based on\n                           all vertices in the graph.\n @param [in]  use_weight   If true consider the edge weight in the graph, if false use an\n                           edge weight of 1\n @param [in]  topk         Specify how many answers to return.  Specifying SIZE_MAX\n                           will return all values.\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result       Opaque pointer to similarity results\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2354    pub fn cugraph_all_pairs_sorensen_coefficients(
2355        handle: *const cugraph_resource_handle_t,
2356        graph: *mut cugraph_graph_t,
2357        vertices: *const cugraph_type_erased_device_array_view_t,
2358        use_weight: bool_t,
2359        topk: usize,
2360        do_expensive_check: bool_t,
2361        result: *mut *mut cugraph_similarity_result_t,
2362        error: *mut *mut cugraph_error_t,
2363    ) -> cugraph_error_code_t;
2364}
2365unsafe extern "C" {
2366    #[doc = " @brief     Perform All Pairs overlap similarity computation\n\n Compute the similarity for all vertex pairs derived from the two-hop neighbors\n of an optional specified vertex list.  This function will identify the two-hop\n neighbors of the specified vertices (all vertices in the graph if not specified)\n and compute similarity for those vertices.\n\n If the topk parameter is specified then the result will only contain the top k\n highest scoring results.\n\n Note that overlap similarity must run on a symmetric graph.\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph\n @param [in]  vertices     Vertex list for input.  If null then compute based on\n                           all vertices in the graph.\n @param [in]  use_weight   If true consider the edge weight in the graph, if false use an\n                           edge weight of 1\n @param [in]  topk         Specify how many answers to return.  Specifying SIZE_MAX\n                           will return all values.\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result       Opaque pointer to similarity results\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2367    pub fn cugraph_all_pairs_overlap_coefficients(
2368        handle: *const cugraph_resource_handle_t,
2369        graph: *mut cugraph_graph_t,
2370        vertices: *const cugraph_type_erased_device_array_view_t,
2371        use_weight: bool_t,
2372        topk: usize,
2373        do_expensive_check: bool_t,
2374        result: *mut *mut cugraph_similarity_result_t,
2375        error: *mut *mut cugraph_error_t,
2376    ) -> cugraph_error_code_t;
2377}
2378unsafe extern "C" {
2379    #[doc = " @brief     Perform All Pairs cosine similarity computation\n\n Compute the similarity for all vertex pairs derived from the two-hop neighbors\n of an optional specified vertex list.  This function will identify the two-hop\n neighbors of the specified vertices (all vertices in the graph if not specified)\n and compute similarity for those vertices.\n\n If the topk parameter is specified then the result will only contain the top k\n highest scoring results.\n\n Note that cosine similarity must run on a symmetric graph.\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph\n @param [in]  vertices     Vertex list for input.  If null then compute based on\n                           all vertices in the graph.\n @param [in]  use_weight   If true consider the edge weight in the graph, if false use an\n                           edge weight of 1\n @param [in]  topk         Specify how many answers to return.  Specifying SIZE_MAX\n                           will return all values.\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result       Opaque pointer to similarity results\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2380    pub fn cugraph_all_pairs_cosine_similarity_coefficients(
2381        handle: *const cugraph_resource_handle_t,
2382        graph: *mut cugraph_graph_t,
2383        vertices: *const cugraph_type_erased_device_array_view_t,
2384        use_weight: bool_t,
2385        topk: usize,
2386        do_expensive_check: bool_t,
2387        result: *mut *mut cugraph_similarity_result_t,
2388        error: *mut *mut cugraph_error_t,
2389    ) -> cugraph_error_code_t;
2390}
2391#[doc = " @brief     Opaque paths result type\n\n Store the output of BFS or SSSP, computing predecessors and distances\n from a seed."]
2392#[repr(C)]
2393#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2394pub struct cugraph_paths_result_t {
2395    pub align_: i32,
2396}
2397#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2398const _: () = {
2399    ["Size of cugraph_paths_result_t"][::std::mem::size_of::<cugraph_paths_result_t>() - 4usize];
2400    ["Alignment of cugraph_paths_result_t"][::std::mem::align_of::<cugraph_paths_result_t>() - 4usize];
2401    ["Offset of field: cugraph_paths_result_t::align_"]
2402        [::std::mem::offset_of!(cugraph_paths_result_t, align_) - 0usize];
2403};
2404#[doc = " @brief     Opaque BFS predicate result type\n\n Store target-discovery metadata for cugraph_bfs_with_predicates."]
2405#[repr(C)]
2406#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2407pub struct cugraph_bfs_predicate_result_t {
2408    pub align_: i32,
2409}
2410#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2411const _: () = {
2412    ["Size of cugraph_bfs_predicate_result_t"][::std::mem::size_of::<cugraph_bfs_predicate_result_t>() - 4usize];
2413    ["Alignment of cugraph_bfs_predicate_result_t"][::std::mem::align_of::<cugraph_bfs_predicate_result_t>() - 4usize];
2414    ["Offset of field: cugraph_bfs_predicate_result_t::align_"]
2415        [::std::mem::offset_of!(cugraph_bfs_predicate_result_t, align_) - 0usize];
2416};
2417unsafe extern "C" {
2418    #[doc = " @ingroup traversal\n @brief     Get the vertex ids from the paths result\n\n @param [in]   result   The result from bfs or sssp\n @return type erased array of vertex ids"]
2419    pub fn cugraph_paths_result_get_vertices(
2420        result: *mut cugraph_paths_result_t,
2421    ) -> *mut cugraph_type_erased_device_array_view_t;
2422}
2423unsafe extern "C" {
2424    #[doc = " @ingroup traversal\n @brief     Get the distances from the paths result\n\n @param [in]   result   The result from bfs or sssp\n @return type erased array of distances"]
2425    pub fn cugraph_paths_result_get_distances(
2426        result: *mut cugraph_paths_result_t,
2427    ) -> *mut cugraph_type_erased_device_array_view_t;
2428}
2429unsafe extern "C" {
2430    #[doc = " @ingroup traversal\n @brief     Get the predecessors from the paths result\n\n @param [in]   result   The result from bfs or sssp\n @return type erased array of predecessors.  Value will be NULL if\n         compute_predecessors was FALSE in the call to bfs or sssp that\n         produced this result."]
2431    pub fn cugraph_paths_result_get_predecessors(
2432        result: *mut cugraph_paths_result_t,
2433    ) -> *mut cugraph_type_erased_device_array_view_t;
2434}
2435unsafe extern "C" {
2436    #[doc = " @ingroup traversal\n @brief     Free paths result\n\n @param [in]   result   The result from bfs or sssp"]
2437    pub fn cugraph_paths_result_free(result: *mut cugraph_paths_result_t);
2438}
2439unsafe extern "C" {
2440    #[doc = " @ingroup traversal\n @brief     Return whether a target was discovered.\n\n @param [in]   result   The predicate result from cugraph_bfs_with_predicates\n @return TRUE if a target was discovered, FALSE otherwise"]
2441    pub fn cugraph_bfs_predicate_result_get_target_found(result: *mut cugraph_bfs_predicate_result_t) -> bool_t;
2442}
2443unsafe extern "C" {
2444    #[doc = " @ingroup traversal\n @brief     Return the BFS depth where a target was first discovered.\n\n The value is meaningful only when\n cugraph_bfs_predicate_result_get_target_found returns TRUE.\n\n @param [in]   result   The predicate result from cugraph_bfs_with_predicates\n @return target discovery distance"]
2445    pub fn cugraph_bfs_predicate_result_get_target_distance(result: *mut cugraph_bfs_predicate_result_t) -> usize;
2446}
2447unsafe extern "C" {
2448    #[doc = " @ingroup traversal\n @brief     Free BFS predicate result\n\n @param [in]   result   The predicate result from cugraph_bfs_with_predicates"]
2449    pub fn cugraph_bfs_predicate_result_free(result: *mut cugraph_bfs_predicate_result_t);
2450}
2451unsafe extern "C" {
2452    #[doc = " @brief     Perform a breadth first search from a set of seed vertices.\n\n This function computes the distances (minimum number of hops to reach the vertex) from the source\n vertex. If @p predecessors is not NULL, this function calculates the predecessor of each\n vertex (parent vertex in the breadth-first search tree) as well.\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph\n FIXME:  Make this just [in], copy it if I need to temporarily modify internally\n @param [in,out]  sources  Array of source vertices.  NOTE: Array might be modified if\n                           renumbering is enabled for the graph\n @param [in]  direction_optimizing If set to true, this algorithm switches between the push based\n breadth-first search and pull based breadth-first search depending on the size of the\n breadth-first search frontier (currently unsupported). This option is valid only for symmetric\n input graphs.\n @param depth_limit Sets the maximum number of breadth-first search iterations. Any vertices\n farther than @p depth_limit hops from @p source_vertex will be marked as unreachable.\n @param [in] compute_predecessors A flag to indicate whether to compute the predecessors in the\n result\n @param [in] do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result       Opaque pointer to paths results\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2453    pub fn cugraph_bfs(
2454        handle: *const cugraph_resource_handle_t,
2455        graph: *mut cugraph_graph_t,
2456        sources: *mut cugraph_type_erased_device_array_view_t,
2457        direction_optimizing: bool_t,
2458        depth_limit: usize,
2459        compute_predecessors: bool_t,
2460        do_expensive_check: bool_t,
2461        result: *mut *mut cugraph_paths_result_t,
2462        error: *mut *mut cugraph_error_t,
2463    ) -> cugraph_error_code_t;
2464}
2465unsafe extern "C" {
2466    #[doc = " @brief     Perform a breadth first search with optional edge, vertex, and target predicates.\n\n Vertex and target predicate inputs use external vertex IDs. Edge predicate input uses external\n edge IDs and requires the graph to have edge IDs. Passing both @p include_vertices and\n @p exclude_vertices is invalid. Source vertices rejected by the vertex predicate are invalid\n input. Target discovery is level-synchronous: when @p stop_on_first_target is TRUE, traversal\n stops after the first depth where a target is discovered.\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph\n @param [in]  sources      Array of source vertices\n @param [in]  include_vertices Optional array of vertices allowed to be reached\n @param [in]  exclude_vertices Optional array of vertices not allowed to be reached\n @param [in]  target_vertices Optional array of target vertices for early termination metadata\n @param [in]  include_edge_ids Optional array of edge IDs allowed to be traversed\n @param [in]  direction_optimizing If set to true, enable direction-optimizing BFS\n @param depth_limit Sets the maximum number of breadth-first search iterations\n @param [in] compute_predecessors A flag to indicate whether to compute predecessors\n @param [in] stop_on_first_target A flag to stop after discovering a target depth\n @param [in] do_expensive_check A flag to run expensive checks for input arguments\n @param [out] result       Opaque pointer to paths results\n @param [out] predicate_result Opaque pointer to target predicate metadata. May be NULL\n @param [out] error        Pointer to an error object storing details of any error\n @return error code"]
2467    pub fn cugraph_bfs_with_predicates(
2468        handle: *const cugraph_resource_handle_t,
2469        graph: *mut cugraph_graph_t,
2470        sources: *mut cugraph_type_erased_device_array_view_t,
2471        include_vertices: *const cugraph_type_erased_device_array_view_t,
2472        exclude_vertices: *const cugraph_type_erased_device_array_view_t,
2473        target_vertices: *const cugraph_type_erased_device_array_view_t,
2474        include_edge_ids: *const cugraph_type_erased_device_array_view_t,
2475        direction_optimizing: bool_t,
2476        depth_limit: usize,
2477        compute_predecessors: bool_t,
2478        stop_on_first_target: bool_t,
2479        do_expensive_check: bool_t,
2480        result: *mut *mut cugraph_paths_result_t,
2481        predicate_result: *mut *mut cugraph_bfs_predicate_result_t,
2482        error: *mut *mut cugraph_error_t,
2483    ) -> cugraph_error_code_t;
2484}
2485unsafe extern "C" {
2486    #[doc = " @brief     Perform single-source shortest-path to compute the minimum distances\n            (and predecessors) from the source vertex.\n\n This function computes the distances (minimum edge weight sums) from the source\n vertex. If @p predecessors is not NULL, this function calculates the predecessor of each\n vertex (parent vertex in the breadth-first search tree) as well.\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph\n @param [in]  source       Source vertex id\n @param [in]  cutoff       Maximum edge weight sum to consider\n @param [in]  compute_predecessors A flag to indicate whether to compute the predecessors in the\n result\n @param [in]  do_expensive_check A flag to run expensive checks for input arguments (if set to\n `true`).\n @param [out] result       Opaque pointer to paths results\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2487    pub fn cugraph_sssp(
2488        handle: *const cugraph_resource_handle_t,
2489        graph: *mut cugraph_graph_t,
2490        source: usize,
2491        cutoff: f64,
2492        compute_predecessors: bool_t,
2493        do_expensive_check: bool_t,
2494        result: *mut *mut cugraph_paths_result_t,
2495        error: *mut *mut cugraph_error_t,
2496    ) -> cugraph_error_code_t;
2497}
2498#[doc = " @brief     Opaque extract_paths result type"]
2499#[repr(C)]
2500#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2501pub struct cugraph_extract_paths_result_t {
2502    pub align_: i32,
2503}
2504#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2505const _: () = {
2506    ["Size of cugraph_extract_paths_result_t"][::std::mem::size_of::<cugraph_extract_paths_result_t>() - 4usize];
2507    ["Alignment of cugraph_extract_paths_result_t"][::std::mem::align_of::<cugraph_extract_paths_result_t>() - 4usize];
2508    ["Offset of field: cugraph_extract_paths_result_t::align_"]
2509        [::std::mem::offset_of!(cugraph_extract_paths_result_t, align_) - 0usize];
2510};
2511unsafe extern "C" {
2512    #[doc = " @brief     Extract BFS or SSSP paths from a cugraph_paths_result_t\n\n This function extracts paths from the BFS or SSSP output.  BFS and SSSP output\n distances and predecessors.  The path from a vertex v back to the original\n source vertex can be extracted by recursively looking up the predecessor\n vertex until you arrive back at the original source vertex.\n\n @param [in]  handle       Handle for accessing resources\n @param [in]  graph        Pointer to graph.  NOTE: Graph might be modified if the storage\n                           needs to be transposed\n @param [in]  sources      Array of source vertices\n @param [in]  result       Output from the BFS call\n @param [in]  destinations Array of destination vertices.\n @param [out] result       Opaque pointer to extract_paths results\n @param [out] error        Pointer to an error object storing details of any error.  Will\n                           be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2513    pub fn cugraph_extract_paths(
2514        handle: *const cugraph_resource_handle_t,
2515        graph: *mut cugraph_graph_t,
2516        sources: *const cugraph_type_erased_device_array_view_t,
2517        paths_result: *const cugraph_paths_result_t,
2518        destinations: *const cugraph_type_erased_device_array_view_t,
2519        result: *mut *mut cugraph_extract_paths_result_t,
2520        error: *mut *mut cugraph_error_t,
2521    ) -> cugraph_error_code_t;
2522}
2523unsafe extern "C" {
2524    #[doc = " @brief     Get the max path length from extract_paths result\n\n @param [in]   result   The result from extract_paths\n @return maximum path length"]
2525    pub fn cugraph_extract_paths_result_get_max_path_length(result: *mut cugraph_extract_paths_result_t) -> usize;
2526}
2527unsafe extern "C" {
2528    #[doc = " @ingroup traversal\n @brief     Get the matrix (row major order) of paths\n\n @param [in]   result   The result from extract_paths\n @return type erased array pointing to the matrix in device memory"]
2529    pub fn cugraph_extract_paths_result_get_paths(
2530        result: *mut cugraph_extract_paths_result_t,
2531    ) -> *mut cugraph_type_erased_device_array_view_t;
2532}
2533unsafe extern "C" {
2534    #[doc = " @ingroup traversal\n @brief     Free extract_paths result\n\n @param [in]   result   The result from extract_paths"]
2535    pub fn cugraph_extract_paths_result_free(result: *mut cugraph_extract_paths_result_t);
2536}
2537#[doc = " @brief     Opaque layout output"]
2538#[repr(C)]
2539#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2540pub struct cugraph_layout_result_t {
2541    pub align_: i32,
2542}
2543#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2544const _: () = {
2545    ["Size of cugraph_layout_result_t"][::std::mem::size_of::<cugraph_layout_result_t>() - 4usize];
2546    ["Alignment of cugraph_layout_result_t"][::std::mem::align_of::<cugraph_layout_result_t>() - 4usize];
2547    ["Offset of field: cugraph_layout_result_t::align_"]
2548        [::std::mem::offset_of!(cugraph_layout_result_t, align_) - 0usize];
2549};
2550unsafe extern "C" {
2551    #[doc = " @brief   Minimum Spanning Tree\n\n NOTE: This currently wraps the legacy minimum implementation and is only\n available in Single GPU implementation.\n\n @param [in]   handle          Handle for accessing resources\n @param [in]   graph           Pointer to graph.  NOTE: Graph might be modified if the storage\n                               needs to be transposed\n @param [in]   do_expensive_check\n                               A flag to run expensive checks for input arguments (if set to true)\n @param [out]  result          Opaque object containing the extracted subgraph\n @param [out]  error           Pointer to an error object storing details of any error.  Will\n                               be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2552    pub fn cugraph_minimum_spanning_tree(
2553        handle: *const cugraph_resource_handle_t,
2554        graph: *mut cugraph_graph_t,
2555        do_expensive_check: bool_t,
2556        result: *mut *mut cugraph_induced_subgraph_result_t,
2557        error: *mut *mut cugraph_error_t,
2558    ) -> cugraph_error_code_t;
2559}
2560pub const cugraph_generator_distribution_t_POWER_LAW: cugraph_generator_distribution_t = 0;
2561pub const cugraph_generator_distribution_t_UNIFORM: cugraph_generator_distribution_t = 1;
2562pub type cugraph_generator_distribution_t = ::std::os::raw::c_uint;
2563unsafe extern "C" {
2564    #[doc = " @brief      Generate RMAT edge list\n\n Returns a COO containing edges generated from the RMAT generator.\n\n Vertex types will be int32 if scale < 32 and int64 if scale >= 32\n\n @param [in]     handle             Handle for accessing resources\n @param [in,out] rng_state          State of the random number generator, updated with each call\n @param [in]     scale Scale factor to set the number of vertices in the graph. Vertex IDs have\n values in [0, V), where V = 1 << @p scale.\n @param [in]     num_edges          Number of edges to generate.\n @param [in]     a                  a, b, c, d (= 1.0 - (a + b + c)) in the R-mat graph generator\n (vist https://graph500.org for additional details). a, b, c, d should be non-negative and a + b +\n c should be no larger than 1.0.\n @param [in]     b                  a, b, c, d (= 1.0 - (a + b + c)) in the R-mat graph generator\n (vist https://graph500.org for additional details). a, b, c, d should be non-negative and a + b +\n c should be no larger than 1.0.\n @param [in]     c                  a, b, c, d (= 1.0 - (a + b + c)) in the R-mat graph generator\n (vist https://graph500.org for additional details). a, b, c, d should be non-negative and a + b +\n c should be no larger than 1.0.\n @param [in]     clip_and_flip      Flag controlling whether to generate edges only in the lower\n triangular part (including the diagonal) of the graph adjacency matrix (if set to `true`) or not\n (if set to `false`).\n @param [in]     scramble_vertex_ids Flag controlling whether to scramble vertex ID bits\n (if set to `true`) or not (if set to `false`); scrambling vertex ID bits breaks correlation\n between vertex ID values and vertex degrees.\n @param [out]    result             Opaque pointer to generated coo\n @param [out]    error              Pointer to an error object storing details of any error.  Will\n                                    be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2565    pub fn cugraph_generate_rmat_edgelist(
2566        handle: *const cugraph_resource_handle_t,
2567        rng_state: *mut cugraph_rng_state_t,
2568        scale: usize,
2569        num_edges: usize,
2570        a: f64,
2571        b: f64,
2572        c: f64,
2573        clip_and_flip: bool_t,
2574        scramble_vertex_ids: bool_t,
2575        result: *mut *mut cugraph_coo_t,
2576        error: *mut *mut cugraph_error_t,
2577    ) -> cugraph_error_code_t;
2578}
2579unsafe extern "C" {
2580    #[doc = " @brief      Generate RMAT edge lists\n\n Returns a COO list containing edges generated from the RMAT generator.\n\n Vertex types will be int32 if scale < 32 and int64 if scale >= 32\n\n @param [in]     handle             Handle for accessing resources\n @param [in,out] rng_state          State of the random number generator, updated with each call\n @param [in]     n_edgelists Number of edge lists (graphs) to generate\n @param [in]     min_scale Scale factor to set the minimum number of verties in the graph.\n @param [in]     max_scale Scale factor to set the maximum number of verties in the graph.\n @param [in]     edge_factor Average number of edges per vertex to generate.\n @param [in]     size_distribution Distribution of the graph sizes, impacts the scale parameter of\n the R-MAT generator\n @param [in]     edge_distribution Edges distribution for each graph, impacts how R-MAT parameters\n a,b,c,d, are set.\n @param [in]     clip_and_flip      Flag controlling whether to generate edges only in the lower\n triangular part (including the diagonal) of the graph adjacency matrix (if set to `true`) or not\n (if set to `false`).\n @param [in]     scramble_vertex_ids Flag controlling whether to scramble vertex ID bits\n (if set to `true`) or not (if set to `false`); scrambling vertex ID bits breaks correlation\n between vertex ID values and vertex degrees.\n @param [out]    result             Opaque pointer to generated coo list\n @param [out]    error              Pointer to an error object storing details of any error.  Will\n                                    be populated if error code is not CUGRAPH_SUCCESS\n @return error code"]
2581    pub fn cugraph_generate_rmat_edgelists(
2582        handle: *const cugraph_resource_handle_t,
2583        rng_state: *mut cugraph_rng_state_t,
2584        n_edgelists: usize,
2585        min_scale: usize,
2586        max_scale: usize,
2587        edge_factor: usize,
2588        size_distribution: cugraph_generator_distribution_t,
2589        edge_distribution: cugraph_generator_distribution_t,
2590        clip_and_flip: bool_t,
2591        scramble_vertex_ids: bool_t,
2592        result: *mut *mut cugraph_coo_list_t,
2593        error: *mut *mut cugraph_error_t,
2594    ) -> cugraph_error_code_t;
2595}
2596unsafe extern "C" {
2597    #[doc = " @brief      Generate edge weights and add to an rmat edge list\n\n Updates a COO to contain random edge weights\n\n @param [in]     handle             Handle for accessing resources\n @param [in,out] rng_state          State of the random number generator, updated with each call\n @param [in,out] coo                Opaque pointer to the coo, weights will be added (overwriting\n any existing weights)\n @param [in]     dtype              The type of weight to generate (FLOAT32 or FLOAT64), ignored\n unless include_weights is true\n @param [in]     minimum_weight     Minimum weight value to generate\n @param [in]     maximum_weight     Maximum weight value to generate\n @param [out]    error              Pointer to an error object storing details of any error.  Will\n                                    be populated if error code is not CUGRAPH_SUCCESS"]
2598    pub fn cugraph_generate_edge_weights(
2599        handle: *const cugraph_resource_handle_t,
2600        rng_state: *mut cugraph_rng_state_t,
2601        coo: *mut cugraph_coo_t,
2602        dtype: cugraph_data_type_id_t,
2603        minimum_weight: f64,
2604        maximum_weight: f64,
2605        error: *mut *mut cugraph_error_t,
2606    ) -> cugraph_error_code_t;
2607}
2608unsafe extern "C" {
2609    #[doc = " @brief      Add edge ids to an COO\n\n Updates a COO to contain edge ids.  Edges will be numbered from 0 to n-1 where n is the number of\n edges\n\n @param [in]     handle             Handle for accessing resources\n @param [in,out] coo                Opaque pointer to the coo, weights will be added (overwriting\n any existing weights)\n @param [in]     multi_gpu          Flag if the COO is being created on multiple GPUs\n @param [out]    error              Pointer to an error object storing details of any error.  Will\n                                    be populated if error code is not CUGRAPH_SUCCESS"]
2610    pub fn cugraph_generate_edge_ids(
2611        handle: *const cugraph_resource_handle_t,
2612        coo: *mut cugraph_coo_t,
2613        multi_gpu: bool_t,
2614        error: *mut *mut cugraph_error_t,
2615    ) -> cugraph_error_code_t;
2616}
2617unsafe extern "C" {
2618    #[doc = " @brief      Generate random edge types, add them to an COO\n\n Updates a COO to contain edge types.  Edges types will be randomly generated.\n\n @param [in]     handle             Handle for accessing resources\n @param [in,out] rng_state          State of the random number generator, updated with each call\n @param [in,out] coo                Opaque pointer to the coo, weights will be added (overwriting\n any existing weights)\n @param [in]     max_edge_type      Edge types will be randomly generated between min_edge_type\n and max_edge_type\n @param [out]    error              Pointer to an error object storing details of any error.  Will\n                                    be populated if error code is not CUGRAPH_SUCCESS"]
2619    pub fn cugraph_generate_edge_types(
2620        handle: *const cugraph_resource_handle_t,
2621        rng_state: *mut cugraph_rng_state_t,
2622        coo: *mut cugraph_coo_t,
2623        min_edge_type: i32,
2624        max_edge_type: i32,
2625        error: *mut *mut cugraph_error_t,
2626    ) -> cugraph_error_code_t;
2627}
2628unsafe extern "C" {
2629    pub fn cugraph_force_atlas2(
2630        handle: *const cugraph_resource_handle_t,
2631        rng_state: *mut cugraph_rng_state_t,
2632        graph: *mut cugraph_graph_t,
2633        max_iter: ::std::os::raw::c_int,
2634        start_vertices: *mut cugraph_type_erased_device_array_view_t,
2635        x_start: *mut cugraph_type_erased_device_array_view_t,
2636        y_start: *mut cugraph_type_erased_device_array_view_t,
2637        outbound_attraction_distribution: bool_t,
2638        lin_log_mode: bool_t,
2639        prevent_overlapping: bool_t,
2640        vertex_radius_vertices: *mut cugraph_type_erased_device_array_view_t,
2641        vertex_radius_values: *mut cugraph_type_erased_device_array_view_t,
2642        overlap_scaling_ratio: f64,
2643        edge_weight_influence: f64,
2644        jitter_tolerance: f64,
2645        barnes_hut_optimize: bool_t,
2646        barnes_hut_theta: f64,
2647        scaling_ratio: f64,
2648        strong_gravity_mode: bool_t,
2649        gravity: f64,
2650        vertex_mobility_vertices: *mut cugraph_type_erased_device_array_view_t,
2651        vertex_mobility_values: *mut cugraph_type_erased_device_array_view_t,
2652        vertex_mass_vertices: *mut cugraph_type_erased_device_array_view_t,
2653        vertex_mass_values: *mut cugraph_type_erased_device_array_view_t,
2654        verbose: bool_t,
2655        do_expensive_check: bool_t,
2656        result: *mut *mut cugraph_layout_result_t,
2657        error: *mut *mut cugraph_error_t,
2658    ) -> cugraph_error_code_t;
2659}
2660unsafe extern "C" {
2661    pub fn cugraph_layout_result_get_vertices(
2662        result: *mut cugraph_layout_result_t,
2663    ) -> *mut cugraph_type_erased_device_array_view_t;
2664}
2665unsafe extern "C" {
2666    pub fn cugraph_layout_result_get_x_axis(
2667        result: *mut cugraph_layout_result_t,
2668    ) -> *mut cugraph_type_erased_device_array_view_t;
2669}
2670unsafe extern "C" {
2671    pub fn cugraph_layout_result_get_y_axis(
2672        result: *mut cugraph_layout_result_t,
2673    ) -> *mut cugraph_type_erased_device_array_view_t;
2674}
2675unsafe extern "C" {
2676    pub fn cugraph_layout_result_free(result: *mut cugraph_layout_result_t);
2677}