Skip to content

Commit 4135675

Browse files
add comments for enums
1 parent baaa5f0 commit 4135675

File tree

1 file changed

+28
-20
lines changed

1 file changed

+28
-20
lines changed

src/Enums.jl

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,36 @@
11
@enum GrB_Info begin
2-
GrB_SUCCESS = 0
3-
GrB_NO_VALUE = 1
4-
GrB_UNINITIALIZED_OBJECT = 2
5-
GrB_INVALID_OBJECT = 3
6-
GrB_NULL_POINTER = 4
7-
GrB_INVALID_VALUE = 5
8-
GrB_INVALID_INDEX = 6
9-
GrB_DOMAIN_MISMATCH = 7
10-
GrB_DIMENSION_MISMATCH = 8
11-
GrB_OUTPUT_NOT_EMPTY = 9
12-
GrB_OUT_OF_MEMORY = 10
13-
GrB_INSUFFICIENT_SPACE = 11
14-
GrB_INDEX_OUT_OF_BOUNDS = 12
15-
GrB_PANIC = 13
2+
GrB_SUCCESS = 0 # all is well
3+
GrB_NO_VALUE = 1 # A(ij) requested but not there
4+
5+
# In non-blocking mode these errors are caught right away.
6+
7+
GrB_UNINITIALIZED_OBJECT = 2 # object has not been initialized
8+
GrB_INVALID_OBJECT = 3 # object is corrupted
9+
GrB_NULL_POINTER = 4 # input pointer is NULL
10+
GrB_INVALID_VALUE = 5 # generic error code; some value is bad
11+
GrB_INVALID_INDEX = 6 # a row or column index is out of bounds;
12+
# used for indices passed as scalars not
13+
# in a list.
14+
GrB_DOMAIN_MISMATCH = 7 # object domains are not compatible
15+
GrB_DIMENSION_MISMATCH = 8 # matrix dimensions do not match
16+
GrB_OUTPUT_NOT_EMPTY = 9 # output matrix already has values in it
17+
18+
# In non-blocking mode these errors can be deferred.
19+
20+
GrB_OUT_OF_MEMORY = 10 # out of memory
21+
GrB_INSUFFICIENT_SPACE = 11 # output array not large enough
22+
GrB_INDEX_OUT_OF_BOUNDS = 12 # a row or column index is out of bounds
23+
GrB_PANIC = 13 # SuiteSparse:GraphBLAS only panics if a critical section fails
1624
end
1725

1826
@enum GrB_Mode begin
19-
GrB_NONBLOCKING = 0
20-
GrB_BLOCKING = 1
27+
GrB_NONBLOCKING = 0 # methods may return with pending computations
28+
GrB_BLOCKING = 1 # no computations are ever left pending
2129
end
2230

2331
@enum GxB_Print_Level begin
24-
GxB_SILENT = 0
25-
GxB_SUMMARY = 1
26-
GxB_SHORT = 2
27-
GxB_COMPLETE = 3
32+
GxB_SILENT = 0 # nothing is printed just check the object
33+
GxB_SUMMARY = 1 # print a terse summary
34+
GxB_SHORT = 2 # short description about 30 entries of a matrix
35+
GxB_COMPLETE = 3 # print the entire contents of the object
2836
end

0 commit comments

Comments
 (0)