1pub const LAGRAPH_MSG_LEN: u32 = 256;
4pub type __off_t = ::std::os::raw::c_long;
5pub type __off64_t = ::std::os::raw::c_long;
6pub type FILE = _IO_FILE;
7#[repr(C)]
8#[derive(Debug, Copy, Clone)]
9pub struct _IO_marker {
10 _unused: [u8; 0],
11}
12#[repr(C)]
13#[derive(Debug, Copy, Clone)]
14pub struct _IO_codecvt {
15 _unused: [u8; 0],
16}
17#[repr(C)]
18#[derive(Debug, Copy, Clone)]
19pub struct _IO_wide_data {
20 _unused: [u8; 0],
21}
22pub type _IO_lock_t = ::std::os::raw::c_void;
23#[repr(C)]
24#[derive(Debug, Copy, Clone)]
25pub struct _IO_FILE {
26 pub _flags: ::std::os::raw::c_int,
27 pub _IO_read_ptr: *mut ::std::os::raw::c_char,
28 pub _IO_read_end: *mut ::std::os::raw::c_char,
29 pub _IO_read_base: *mut ::std::os::raw::c_char,
30 pub _IO_write_base: *mut ::std::os::raw::c_char,
31 pub _IO_write_ptr: *mut ::std::os::raw::c_char,
32 pub _IO_write_end: *mut ::std::os::raw::c_char,
33 pub _IO_buf_base: *mut ::std::os::raw::c_char,
34 pub _IO_buf_end: *mut ::std::os::raw::c_char,
35 pub _IO_save_base: *mut ::std::os::raw::c_char,
36 pub _IO_backup_base: *mut ::std::os::raw::c_char,
37 pub _IO_save_end: *mut ::std::os::raw::c_char,
38 pub _markers: *mut _IO_marker,
39 pub _chain: *mut _IO_FILE,
40 pub _fileno: ::std::os::raw::c_int,
41 pub _flags2: ::std::os::raw::c_int,
42 pub _old_offset: __off_t,
43 pub _cur_column: ::std::os::raw::c_ushort,
44 pub _vtable_offset: ::std::os::raw::c_schar,
45 pub _shortbuf: [::std::os::raw::c_char; 1usize],
46 pub _lock: *mut _IO_lock_t,
47 pub _offset: __off64_t,
48 pub _codecvt: *mut _IO_codecvt,
49 pub _wide_data: *mut _IO_wide_data,
50 pub _freeres_list: *mut _IO_FILE,
51 pub _freeres_buf: *mut ::std::os::raw::c_void,
52 pub __pad5: usize,
53 pub _mode: ::std::os::raw::c_int,
54 pub _unused2: [::std::os::raw::c_char; 20usize],
55}
56pub type GrB_Index = u64;
57#[repr(i32)]
58#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
59pub enum GrB_Info {
60 GrB_SUCCESS = 0,
61 GrB_NO_VALUE = 1,
62 GxB_EXHAUSTED = 7089,
63 GrB_UNINITIALIZED_OBJECT = -1,
64 GrB_NULL_POINTER = -2,
65 GrB_INVALID_VALUE = -3,
66 GrB_INVALID_INDEX = -4,
67 GrB_DOMAIN_MISMATCH = -5,
68 GrB_DIMENSION_MISMATCH = -6,
69 GrB_OUTPUT_NOT_EMPTY = -7,
70 GrB_NOT_IMPLEMENTED = -8,
71 GrB_ALREADY_SET = -9,
72 GrB_PANIC = -101,
73 GrB_OUT_OF_MEMORY = -102,
74 GrB_INSUFFICIENT_SPACE = -103,
75 GrB_INVALID_OBJECT = -104,
76 GrB_INDEX_OUT_OF_BOUNDS = -105,
77 GrB_EMPTY_OBJECT = -106,
78 GxB_JIT_ERROR = -7001,
79 GxB_GPU_ERROR = -7002,
80 GxB_OUTPUT_IS_READONLY = -7003,
81}
82#[repr(C)]
83#[derive(Debug, Copy, Clone)]
84pub struct GB_Descriptor_opaque {
85 _unused: [u8; 0],
86}
87pub type GrB_Descriptor = *mut GB_Descriptor_opaque;
88#[repr(C)]
89#[derive(Debug, Copy, Clone)]
90pub struct GB_Type_opaque {
91 _unused: [u8; 0],
92}
93pub type GrB_Type = *mut GB_Type_opaque;
94#[repr(C)]
95#[derive(Debug, Copy, Clone)]
96pub struct GB_BinaryOp_opaque {
97 _unused: [u8; 0],
98}
99pub type GrB_BinaryOp = *mut GB_BinaryOp_opaque;
100#[repr(C)]
101#[derive(Debug, Copy, Clone)]
102pub struct GB_Semiring_opaque {
103 _unused: [u8; 0],
104}
105pub type GrB_Semiring = *mut GB_Semiring_opaque;
106#[repr(C)]
107#[derive(Debug, Copy, Clone)]
108pub struct GB_Scalar_opaque {
109 _unused: [u8; 0],
110}
111pub type GrB_Scalar = *mut GB_Scalar_opaque;
112#[repr(C)]
113#[derive(Debug, Copy, Clone)]
114pub struct GB_Vector_opaque {
115 _unused: [u8; 0],
116}
117pub type GrB_Vector = *mut GB_Vector_opaque;
118#[repr(C)]
119#[derive(Debug, Copy, Clone)]
120pub struct GB_Matrix_opaque {
121 _unused: [u8; 0],
122}
123pub type GrB_Matrix = *mut GB_Matrix_opaque;
124unsafe extern "C" {
125 pub static mut GrB_BOOL: GrB_Type;
126}
127unsafe extern "C" {
128 pub static mut GrB_LOR: GrB_BinaryOp;
129}
130unsafe extern "C" {
131 pub static mut GrB_LOR_LAND_SEMIRING_BOOL: GrB_Semiring;
132}
133unsafe extern "C" {
134 pub fn GrB_Vector_new(v: *mut GrB_Vector, type_: GrB_Type, n: GrB_Index) -> GrB_Info;
135}
136unsafe extern "C" {
137 pub fn GrB_Vector_nvals(nvals: *mut GrB_Index, v: GrB_Vector) -> GrB_Info;
138}
139unsafe extern "C" {
140 pub fn GrB_Vector_setElement_BOOL(w: GrB_Vector, x: bool, i: GrB_Index) -> GrB_Info;
141}
142unsafe extern "C" {
143 pub fn GrB_Vector_extractTuples_BOOL(
144 I_: *mut GrB_Index,
145 X: *mut bool,
146 nvals: *mut GrB_Index,
147 V: GrB_Vector,
148 ) -> GrB_Info;
149}
150unsafe extern "C" {
151 pub fn GrB_Matrix_new(
152 A: *mut GrB_Matrix,
153 type_: GrB_Type,
154 nrows: GrB_Index,
155 ncols: GrB_Index,
156 ) -> GrB_Info;
157}
158unsafe extern "C" {
159 pub fn GrB_Matrix_dup(C: *mut GrB_Matrix, A: GrB_Matrix) -> GrB_Info;
160}
161unsafe extern "C" {
162 pub fn GrB_Matrix_nvals(nvals: *mut GrB_Index, A: GrB_Matrix) -> GrB_Info;
163}
164unsafe extern "C" {
165 pub fn GrB_Matrix_build_BOOL(
166 C: GrB_Matrix,
167 I_: *const GrB_Index,
168 J: *const GrB_Index,
169 X: *const bool,
170 nvals: GrB_Index,
171 dup: GrB_BinaryOp,
172 ) -> GrB_Info;
173}
174unsafe extern "C" {
175 pub fn GrB_Matrix_extractElement_BOOL(
176 x: *mut bool,
177 A: GrB_Matrix,
178 i: GrB_Index,
179 j: GrB_Index,
180 ) -> GrB_Info;
181}
182unsafe extern "C" {
183 pub fn GrB_vxm(
184 w: GrB_Vector,
185 mask: GrB_Vector,
186 accum: GrB_BinaryOp,
187 semiring: GrB_Semiring,
188 u: GrB_Vector,
189 A: GrB_Matrix,
190 desc: GrB_Descriptor,
191 ) -> GrB_Info;
192}
193unsafe extern "C" {
194 pub fn GrB_Vector_free(object: *mut GrB_Vector) -> GrB_Info;
195}
196unsafe extern "C" {
197 pub fn GrB_Matrix_free(object: *mut GrB_Matrix) -> GrB_Info;
198}
199#[repr(i32)]
200#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
201pub enum LAGraph_Kind {
202 LAGraph_ADJACENCY_UNDIRECTED = 0,
203 LAGraph_ADJACENCY_DIRECTED = 1,
204 LAGraph_KIND_UNKNOWN = -1,
205}
206#[repr(i32)]
207#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
208pub enum LAGraph_Boolean {
209 LAGraph_FALSE = 0,
210 LAGraph_TRUE = 1,
211 LAGraph_BOOLEAN_UNKNOWN = -1,
212}
213#[repr(i32)]
214#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
215pub enum LAGraph_State {
216 LAGraph_VALUE = 0,
217 LAGraph_BOUND = 1,
218 LAGraph_STATE_UNKNOWN = -1,
219}
220#[repr(C)]
221#[derive(Debug, Copy, Clone)]
222pub struct LAGraph_Graph_struct {
223 pub A: GrB_Matrix,
224 pub kind: LAGraph_Kind,
225 pub AT: GrB_Matrix,
226 pub out_degree: GrB_Vector,
227 pub in_degree: GrB_Vector,
228 pub is_symmetric_structure: LAGraph_Boolean,
229 pub nself_edges: i64,
230 pub emin: GrB_Scalar,
231 pub emin_state: LAGraph_State,
232 pub emax: GrB_Scalar,
233 pub emax_state: LAGraph_State,
234}
235pub type LAGraph_Graph = *mut LAGraph_Graph_struct;
236unsafe extern "C" {
237 pub fn LAGraph_Init(msg: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
238}
239unsafe extern "C" {
240 pub fn LAGraph_Finalize(msg: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
241}
242unsafe extern "C" {
243 pub fn LAGraph_New(
244 G: *mut LAGraph_Graph,
245 A: *mut GrB_Matrix,
246 kind: LAGraph_Kind,
247 msg: *mut ::std::os::raw::c_char,
248 ) -> ::std::os::raw::c_int;
249}
250unsafe extern "C" {
251 pub fn LAGraph_Delete(
252 G: *mut LAGraph_Graph,
253 msg: *mut ::std::os::raw::c_char,
254 ) -> ::std::os::raw::c_int;
255}
256unsafe extern "C" {
257 pub fn LAGraph_Cached_AT(
258 G: LAGraph_Graph,
259 msg: *mut ::std::os::raw::c_char,
260 ) -> ::std::os::raw::c_int;
261}
262unsafe extern "C" {
263 pub fn LAGraph_CheckGraph(
264 G: LAGraph_Graph,
265 msg: *mut ::std::os::raw::c_char,
266 ) -> ::std::os::raw::c_int;
267}
268unsafe extern "C" {
269 pub fn LAGraph_GetNumThreads(
270 nthreads_outer: *mut ::std::os::raw::c_int,
271 nthreads_inner: *mut ::std::os::raw::c_int,
272 msg: *mut ::std::os::raw::c_char,
273 ) -> ::std::os::raw::c_int;
274}
275unsafe extern "C" {
276 pub fn LAGraph_SetNumThreads(
277 nthreads_outer: ::std::os::raw::c_int,
278 nthreads_inner: ::std::os::raw::c_int,
279 msg: *mut ::std::os::raw::c_char,
280 ) -> ::std::os::raw::c_int;
281}
282unsafe extern "C" {
283 pub fn LAGraph_MMRead(
284 A: *mut GrB_Matrix,
285 f: *mut FILE,
286 msg: *mut ::std::os::raw::c_char,
287 ) -> ::std::os::raw::c_int;
288}
289unsafe extern "C" {
290 pub fn LAGraph_RegularPathQuery(
291 reachable: *mut GrB_Vector,
292 R: *mut LAGraph_Graph,
293 nl: usize,
294 QS: *const GrB_Index,
295 nqs: usize,
296 QF: *const GrB_Index,
297 nqf: usize,
298 G: *mut LAGraph_Graph,
299 S: *const GrB_Index,
300 ns: usize,
301 msg: *mut ::std::os::raw::c_char,
302 ) -> ::std::os::raw::c_int;
303}
304#[repr(u32)]
305#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
306pub enum RPQMatrixOp {
307 RPQ_MATRIX_OP_LABEL = 0,
308 RPQ_MATRIX_OP_LOR = 1,
309 RPQ_MATRIX_OP_CONCAT = 2,
310 RPQ_MATRIX_OP_KLEENE = 3,
311 RPQ_MATRIX_OP_KLEENE_L = 4,
312 RPQ_MATRIX_OP_KLEENE_R = 5,
313}
314#[repr(C)]
315#[derive(Debug, Copy, Clone)]
316pub struct RPQMatrixPlan {
317 pub op: RPQMatrixOp,
318 pub lhs: *mut RPQMatrixPlan,
319 pub rhs: *mut RPQMatrixPlan,
320 pub mat: GrB_Matrix,
321 pub res_mat: GrB_Matrix,
322}
323unsafe extern "C" {
324 pub fn LAGraph_RPQMatrix(
325 nnz: *mut GrB_Index,
326 plan: *mut RPQMatrixPlan,
327 msg: *mut ::std::os::raw::c_char,
328 ) -> GrB_Info;
329}
330unsafe extern "C" {
331 pub fn LAGraph_RPQMatrix_label(
332 mat: *mut GrB_Matrix,
333 x: GrB_Index,
334 i: GrB_Index,
335 j: GrB_Index,
336 ) -> GrB_Info;
337}
338unsafe extern "C" {
339 pub fn LAGraph_DestroyRpqMatrixPlan(plan: *mut RPQMatrixPlan) -> GrB_Info;
340}
341unsafe extern "C" {
342 pub fn LAGraph_RPQMatrix_Free(mat: *mut GrB_Matrix) -> GrB_Info;
343}
344unsafe extern "C" {
345 pub fn LAGraph_RPQMatrix_reduce(
346 res: *mut GrB_Index,
347 mat: GrB_Matrix,
348 reduce_type: u8,
349 ) -> GrB_Info;
350}