Skip to content

Commit 1782905

Browse files
authored
Update to 7.2.0 (#47)
* Update to 7.2.0
1 parent d31ba3a commit 1782905

File tree

5 files changed

+19
-6
lines changed

5 files changed

+19
-6
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
python-version: ["3.8", "3.9", "3.10"]
2020
source: ["conda-forge"]
2121
# source: ["source"]
22-
graphblas-version: ["7.1.0"]
22+
graphblas-version: ["7.2.0"]
2323
steps:
2424
- name: Checkout
2525
uses: actions/checkout@v2

suitesparse_graphblas/create_headers.py

+1
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ def groupby(index, seq):
297297
"GxB_COMPRESSION_INTEL",
298298
"GxB_COMPRESSION_LZ4",
299299
"GxB_COMPRESSION_LZ4HC",
300+
"GxB_COMPRESSION_ZSTD",
300301
"GxB_COMPRESSION_NONE",
301302
}
302303

suitesparse_graphblas/io/serialize.py

+11-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ def get_serialize_desc(compression=lib.GxB_COMPRESSION_DEFAULT, level=None, nthr
2222
if nthreads is not None:
2323
check_status(desc, lib.GxB_Desc_set(desc[0], lib.GxB_NTHREADS, ffi.cast("int", nthreads)))
2424
if compression is not None:
25-
if level is not None and compression == lib.GxB_COMPRESSION_LZ4HC:
25+
if level is not None and compression in {
26+
lib.GxB_COMPRESSION_LZ4HC,
27+
lib.GxB_COMPRESSION_ZSTD,
28+
}:
2629
compression += level
2730
check_status(
2831
desc, lib.GxB_Desc_set(desc[0], lib.GxB_COMPRESSION, ffi.cast("int", compression))
@@ -37,9 +40,11 @@ def serialize_matrix(A, compression=lib.GxB_COMPRESSION_DEFAULT, level=None, *,
3740
----------
3841
compression : int, optional
3942
One of None, GxB_COMPRESSION_NONE, GxB_COMPRESSION_DEFAULT,
40-
GxB_COMPRESSION_LZ4, or GxB_COMPRESSION_LZ4HC
43+
GxB_COMPRESSION_LZ4, GxB_COMPRESSION_LZ4HC, or GxB_COMPRESSION_ZSTD
4144
level : int, optional
42-
Used by GxB_COMPRESSION_LZ4HC. Should be between 1 and 9, where 9 is most compressed.
45+
For GxB_COMPRESSION_LZ4HC, should be between 1 and 9, where 9 is most compressed.
46+
For GxB_COMPRESSION_ZSTD, should be between 1 and 19, where 19 is most compressed.
47+
4348
nthreads : int, optional
4449
The maximum number of OpenMP threads to use.
4550
"""
@@ -59,9 +64,10 @@ def serialize_vector(v, compression=lib.GxB_COMPRESSION_DEFAULT, level=None, *,
5964
----------
6065
compression : int, optional
6166
One of None, GxB_COMPRESSION_NONE, GxB_COMPRESSION_DEFAULT,
62-
GxB_COMPRESSION_LZ4, or GxB_COMPRESSION_LZ4HC
67+
GxB_COMPRESSION_LZ4, GxB_COMPRESSION_LZ4HC, or GxB_COMPRESSION_ZSTD
6368
level : int, optional
64-
Used by GxB_COMPRESSION_LZ4HC. Should be between 1 and 9, where 9 is most compressed.
69+
For GxB_COMPRESSION_LZ4HC, should be between 1 and 9, where 9 is most compressed.
70+
For GxB_COMPRESSION_ZSTD, should be between 1 and 19, where 19 is most compressed.
6571
nthreads : int, optional
6672
The maximum number of OpenMP threads to use.
6773
"""

suitesparse_graphblas/suitesparse_graphblas.h

+3
Original file line numberDiff line numberDiff line change
@@ -3217,6 +3217,8 @@ extern GrB_Info GxB_Matrix_pack_HyperCSC(GrB_Matrix A, GrB_Index **Ap, GrB_Index
32173217
extern GrB_Info GxB_Matrix_pack_HyperCSR(GrB_Matrix A, GrB_Index **Ap, GrB_Index **Ah, GrB_Index **Aj, void **Ax, GrB_Index Ap_size, GrB_Index Ah_size, GrB_Index Aj_size, GrB_Index Ax_size, bool iso, GrB_Index nvec, bool jumbled, const GrB_Descriptor desc);
32183218
extern GrB_Info GxB_Matrix_reduce_FC32(GxB_FC32_t *c, const GrB_BinaryOp accum, const GrB_Monoid monoid, const GrB_Matrix A, const GrB_Descriptor desc);
32193219
extern GrB_Info GxB_Matrix_reduce_FC64(GxB_FC64_t *c, const GrB_BinaryOp accum, const GrB_Monoid monoid, const GrB_Matrix A, const GrB_Descriptor desc);
3220+
extern GrB_Info GxB_Matrix_reshape(GrB_Matrix C, bool by_col, GrB_Index nrows_new, GrB_Index ncols_new, const GrB_Descriptor desc);
3221+
extern GrB_Info GxB_Matrix_reshapeDup(GrB_Matrix *C, GrB_Matrix A, bool by_col, GrB_Index nrows_new, GrB_Index ncols_new, const GrB_Descriptor desc);
32203222
extern GrB_Info GxB_Matrix_select(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GxB_SelectOp op, const GrB_Matrix A, const GrB_Scalar Thunk, const GrB_Descriptor desc);
32213223
extern GrB_Info GxB_Matrix_select_FC32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_IndexUnaryOp op, const GrB_Matrix A, GxB_FC32_t y, const GrB_Descriptor desc);
32223224
extern GrB_Info GxB_Matrix_select_FC64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_IndexUnaryOp op, const GrB_Matrix A, GxB_FC64_t y, const GrB_Descriptor desc);
@@ -3430,6 +3432,7 @@ extern GrB_Info GxB_Vector_unpack_Full(GrB_Vector v, void **vx, GrB_Index *vx_si
34303432
#define GxB_COMPRESSION_LZ4 ...
34313433
#define GxB_COMPRESSION_LZ4HC ...
34323434
#define GxB_COMPRESSION_NONE ...
3435+
#define GxB_COMPRESSION_ZSTD ...
34333436
#define GxB_END ...
34343437
#define GxB_FAST_IMPORT ...
34353438
#define GxB_FULL ...

suitesparse_graphblas/suitesparse_graphblas_no_complex.h

+3
Original file line numberDiff line numberDiff line change
@@ -3021,6 +3021,8 @@ extern GrB_Info GxB_Matrix_pack_FullC(GrB_Matrix A, void **Ax, GrB_Index Ax_size
30213021
extern GrB_Info GxB_Matrix_pack_FullR(GrB_Matrix A, void **Ax, GrB_Index Ax_size, bool iso, const GrB_Descriptor desc);
30223022
extern GrB_Info GxB_Matrix_pack_HyperCSC(GrB_Matrix A, GrB_Index **Ap, GrB_Index **Ah, GrB_Index **Ai, void **Ax, GrB_Index Ap_size, GrB_Index Ah_size, GrB_Index Ai_size, GrB_Index Ax_size, bool iso, GrB_Index nvec, bool jumbled, const GrB_Descriptor desc);
30233023
extern GrB_Info GxB_Matrix_pack_HyperCSR(GrB_Matrix A, GrB_Index **Ap, GrB_Index **Ah, GrB_Index **Aj, void **Ax, GrB_Index Ap_size, GrB_Index Ah_size, GrB_Index Aj_size, GrB_Index Ax_size, bool iso, GrB_Index nvec, bool jumbled, const GrB_Descriptor desc);
3024+
extern GrB_Info GxB_Matrix_reshape(GrB_Matrix C, bool by_col, GrB_Index nrows_new, GrB_Index ncols_new, const GrB_Descriptor desc);
3025+
extern GrB_Info GxB_Matrix_reshapeDup(GrB_Matrix *C, GrB_Matrix A, bool by_col, GrB_Index nrows_new, GrB_Index ncols_new, const GrB_Descriptor desc);
30243026
extern GrB_Info GxB_Matrix_select(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GxB_SelectOp op, const GrB_Matrix A, const GrB_Scalar Thunk, const GrB_Descriptor desc);
30253027
extern GrB_Info GxB_Matrix_serialize(void **blob_handle, GrB_Index *blob_size_handle, GrB_Matrix A, const GrB_Descriptor desc);
30263028
extern GrB_Info GxB_Matrix_sort(GrB_Matrix C, GrB_Matrix P, GrB_BinaryOp op, GrB_Matrix A, const GrB_Descriptor desc);
@@ -3198,6 +3200,7 @@ extern GrB_Info GxB_Vector_unpack_Full(GrB_Vector v, void **vx, GrB_Index *vx_si
31983200
#define GxB_COMPRESSION_LZ4 ...
31993201
#define GxB_COMPRESSION_LZ4HC ...
32003202
#define GxB_COMPRESSION_NONE ...
3203+
#define GxB_COMPRESSION_ZSTD ...
32013204
#define GxB_END ...
32023205
#define GxB_FAST_IMPORT ...
32033206
#define GxB_FULL ...

0 commit comments

Comments
 (0)