@@ -102,21 +102,23 @@ end
102
102
const valid_vec = [Bool, Int8, UInt8, Int16, UInt16, Int32, UInt32,
103
103
Int64, UInt64, Float32, Float64, ComplexF32, ComplexF64]
104
104
105
- @enum GrB_Info:: UInt32 begin
105
+ @enum GrB_Info:: Int32 begin
106
106
GrB_SUCCESS = 0
107
107
GrB_NO_VALUE = 1
108
- GrB_UNINITIALIZED_OBJECT = 2
109
- GrB_INVALID_OBJECT = 3
110
- GrB_NULL_POINTER = 4
111
- GrB_INVALID_VALUE = 5
112
- GrB_INVALID_INDEX = 6
113
- GrB_DOMAIN_MISMATCH = 7
114
- GrB_DIMENSION_MISMATCH = 8
115
- GrB_OUTPUT_NOT_EMPTY = 9
116
- GrB_OUT_OF_MEMORY = 10
117
- GrB_INSUFFICIENT_SPACE = 11
118
- GrB_INDEX_OUT_OF_BOUNDS = 12
119
- GrB_PANIC = 13
108
+ GrB_UNINITIALIZED_OBJECT = - 1
109
+ GrB_NULL_POINTER = - 2
110
+ GrB_INVALID_VALUE = - 3
111
+ GrB_INVALID_INDEX = - 4
112
+ GrB_DOMAIN_MISMATCH = - 5
113
+ GrB_DIMENSION_MISMATCH = - 6
114
+ GrB_OUTPUT_NOT_EMPTY = - 7
115
+ GrB_NOT_IMPLEMENTED = - 8
116
+ GrB_PANIC = - 101
117
+ GrB_OUT_OF_MEMORY = - 102
118
+ GrB_INSUFFICIENT_SPACE = - 103
119
+ GrB_INVALID_OBJECT = - 104
120
+ GrB_INDEX_OUT_OF_BOUNDS = - 105
121
+ GrB_EMPTY_OBJECT = - 106
120
122
end
121
123
122
124
@enum GrB_Mode:: UInt32 begin
@@ -128,8 +130,8 @@ function GrB_init(mode)
128
130
@wraperror ccall ((:GrB_init , libgraphblas), GrB_Info, (GrB_Mode,), mode)
129
131
end
130
132
131
- function GxB_init (mode, user_malloc_function, user_calloc_function, user_realloc_function, user_free_function, user_malloc_is_thread_safe )
132
- @wraperror ccall ((:GxB_init , libgraphblas), GrB_Info, (GrB_Mode, Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}, Bool ), mode, user_malloc_function, user_calloc_function, user_realloc_function, user_free_function, user_malloc_is_thread_safe )
133
+ function GxB_init (mode, user_malloc_function, user_calloc_function, user_realloc_function, user_free_function)
134
+ @wraperror ccall ((:GxB_init , libgraphblas), GrB_Info, (GrB_Mode, Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}), mode, user_malloc_function, user_calloc_function, user_realloc_function, user_free_function)
133
135
end
134
136
135
137
function GxB_cuda_init (mode)
@@ -308,6 +310,17 @@ function GB_SelectOp_new(selectop, _function, xtype, ttype, name)
308
310
@wraperror ccall ((:GB_SelectOp_new , libgraphblas), GrB_Info, (Ptr{GxB_SelectOp}, GxB_select_function, GrB_Type, GrB_Type, Ptr{Cchar}), selectop, _function, xtype, ttype, name)
309
311
end
310
312
313
+ mutable struct GB_IndexUnaryOp_opaque end
314
+
315
+ const GrB_IndexUnaryOp = Ptr{GB_IndexUnaryOp_opaque}
316
+
317
+ # typedef void ( * GxB_index_unary_function ) ( void * z , // output value z, of type ztype const void * x , // input value x of type xtype; value of v(i) or A(i,j) GrB_Index i , // row index of A(i,j) GrB_Index j , // column index of A(i,j), or zero for v(i) const void * y // input scalar y )
318
+ const GxB_index_unary_function = Ptr{Cvoid}
319
+
320
+ function GxB_IndexUnaryOp_new (op, _function, ztype, xtype, ytype, idxop_name, idxop_defn)
321
+ ccall ((:GxB_IndexUnaryOp_new , libgraphblas), GrB_Info, (Ptr{GrB_IndexUnaryOp}, GxB_index_unary_function, GrB_Type, GrB_Type, GrB_Type, Ptr{Cchar}, Ptr{Cchar}), op, _function, ztype, xtype, ytype, idxop_name, idxop_defn)
322
+ end
323
+
311
324
function GxB_SelectOp_xtype (xtype, selectop)
312
325
@wraperror ccall ((:GxB_SelectOp_xtype , libgraphblas), GrB_Info, (Ptr{GrB_Type}, GxB_SelectOp), xtype, selectop)
313
326
end
501
514
502
515
mutable struct GB_Scalar_opaque end
503
516
517
+ const GrB_Scalar = Ptr{GB_Scalar_opaque}
504
518
const GxB_Scalar = Ptr{GB_Scalar_opaque}
505
519
506
520
function GxB_Scalar_new (s, type)
@@ -1386,44 +1400,53 @@ end
1386
1400
GxB_NO_FORMAT = - 1
1387
1401
end
1388
1402
1389
- function GrB_Type_wait (type)
1390
- @wraperror ccall ((:GrB_Type_wait , libgraphblas), GrB_Info, (Ptr{GrB_Type},), type)
1403
+ @enum GrB_WaitMode:: UInt32 begin
1404
+ GrB_COMPLETE = 0
1405
+ GrB_MATERIALIZE = 1
1406
+ end
1407
+
1408
+ function GrB_Type_wait (type, waitmode)
1409
+ ccall ((:GrB_Type_wait , libgraphblas), GrB_Info, (GrB_Type, GrB_WaitMode), type, waitmode)
1410
+ end
1411
+
1412
+ function GrB_UnaryOp_wait (op, waitmode)
1413
+ ccall ((:GrB_UnaryOp_wait , libgraphblas), GrB_Info, (GrB_UnaryOp, GrB_WaitMode), op, waitmode)
1391
1414
end
1392
1415
1393
- function GrB_UnaryOp_wait (op)
1394
- @wraperror ccall ((:GrB_UnaryOp_wait , libgraphblas), GrB_Info, (Ptr{GrB_UnaryOp}, ), op)
1416
+ function GrB_BinaryOp_wait (op, waitmode )
1417
+ ccall ((:GrB_BinaryOp_wait , libgraphblas), GrB_Info, (GrB_BinaryOp, GrB_WaitMode ), op, waitmode )
1395
1418
end
1396
1419
1397
- function GrB_BinaryOp_wait (op)
1398
- @wraperror ccall ((:GrB_BinaryOp_wait , libgraphblas), GrB_Info, (Ptr{GrB_BinaryOp}, ), op)
1420
+ function GxB_SelectOp_wait (op, waitmode )
1421
+ ccall ((:GxB_SelectOp_wait , libgraphblas), GrB_Info, (GxB_SelectOp, GrB_WaitMode ), op, waitmode )
1399
1422
end
1400
1423
1401
- function GxB_SelectOp_wait (op)
1402
- @wraperror ccall ((:GxB_SelectOp_wait , libgraphblas), GrB_Info, (Ptr{GxB_SelectOp}, ), op)
1424
+ function GrB_IndexUnaryOp_wait (op, waitmode )
1425
+ ccall ((:GrB_IndexUnaryOp_wait , libgraphblas), GrB_Info, (GrB_IndexUnaryOp, GrB_WaitMode ), op, waitmode )
1403
1426
end
1404
1427
1405
- function GrB_Monoid_wait (monoid)
1406
- @wraperror ccall ((:GrB_Monoid_wait , libgraphblas), GrB_Info, (Ptr{ GrB_Monoid}, ), monoid)
1428
+ function GrB_Monoid_wait (monoid, waitmode )
1429
+ ccall ((:GrB_Monoid_wait , libgraphblas), GrB_Info, (GrB_Monoid, GrB_WaitMode ), monoid, waitmode )
1407
1430
end
1408
1431
1409
- function GrB_Semiring_wait (semiring)
1410
- @wraperror ccall ((:GrB_Semiring_wait , libgraphblas), GrB_Info, (Ptr{ GrB_Semiring}, ), semiring)
1432
+ function GrB_Semiring_wait (semiring, waitmode )
1433
+ ccall ((:GrB_Semiring_wait , libgraphblas), GrB_Info, (GrB_Semiring, GrB_WaitMode ), semiring, waitmode )
1411
1434
end
1412
1435
1413
- function GrB_Descriptor_wait (desc )
1414
- @wraperror ccall ((:GrB_Descriptor_wait , libgraphblas), GrB_Info, (Ptr{GrB_Descriptor}, ), desc )
1436
+ function GrB_Scalar_wait (s, waitmode )
1437
+ ccall ((:GrB_Scalar_wait , libgraphblas), GrB_Info, (GrB_Scalar, GrB_WaitMode ), s, waitmode )
1415
1438
end
1416
1439
1417
- function GxB_Scalar_wait (s )
1418
- @wraperror ccall ((:GxB_Scalar_wait , libgraphblas), GrB_Info, (Ptr{GxB_Scalar}, ), s )
1440
+ function GrB_Vector_wait (v, waitmode )
1441
+ ccall ((:GrB_Vector_wait , libgraphblas), GrB_Info, (GrB_Vector, GrB_WaitMode ), v, waitmode )
1419
1442
end
1420
1443
1421
- function GrB_Vector_wait (v )
1422
- @wraperror ccall ((:GrB_Vector_wait , libgraphblas), GrB_Info, (Ptr{GrB_Vector}, ), v )
1444
+ function GrB_Matrix_wait (A, waitmode )
1445
+ ccall ((:GrB_Matrix_wait , libgraphblas), GrB_Info, (GrB_Matrix, GrB_WaitMode ), A, waitmode )
1423
1446
end
1424
1447
1425
- function GrB_Matrix_wait (A )
1426
- @wraperror ccall ((:GrB_Matrix_wait , libgraphblas), GrB_Info, (Ptr{GrB_Matrix}, ), A )
1448
+ function GrB_Descriptor_wait (desc, waitmode )
1449
+ ccall ((:GrB_Descriptor_wait , libgraphblas), GrB_Info, (GrB_Descriptor, GrB_WaitMode ), desc, waitmode )
1427
1450
end
1428
1451
1429
1452
function GrB_Type_error (type)
0 commit comments