From e35d3c4822e9913ca3b31716d4dd3bd943a1afff Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Wed, 29 May 2024 11:19:05 -0400 Subject: [PATCH 01/45] Update to SuiteSparse:GraphBLAS 9.1.0 --- .pre-commit-config.yaml | 20 +- GB_VERSION.txt | 2 +- pyproject.toml | 2 +- suitesparse_graphblas/create_headers.py | 3 + suitesparse_graphblas/suitesparse_graphblas.h | 543 ++++++++++++------ .../suitesparse_graphblas_no_complex.h | 509 ++++++++++------ 6 files changed, 719 insertions(+), 360 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 64bed06..4c89d2a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ default_language_version: python: python3 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.6.0 hooks: - id: check-added-large-files - id: check-ast @@ -20,21 +20,21 @@ repos: - id: mixed-line-ending # - id: trailing-whitespace - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.14 + rev: v0.18 hooks: - id: validate-pyproject name: Validate pyproject.toml - repo: https://github.com/PyCQA/autoflake - rev: v2.2.1 + rev: v2.3.1 hooks: - id: autoflake args: [--in-place] - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/asottile/pyupgrade - rev: v3.13.0 + rev: v3.15.2 hooks: - id: pyupgrade args: [--py38-plus] @@ -44,19 +44,19 @@ repos: # - id: auto-walrus # args: [--line-length, "100"] - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 24.4.2 hooks: - id: black # - id: black-jupyter - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.0.0 hooks: - id: flake8 additional_dependencies: &flake8_dependencies # These versions need updated manually - - flake8==6.1.0 + - flake8==7.0.0 - flake8-comprehensions==3.14.0 - - flake8-bugbear==23.9.16 + - flake8-bugbear==24.4.26 # - flake8-simplify==0.20.0 - repo: https://github.com/asottile/yesqa rev: v1.5.0 @@ -71,6 +71,6 @@ repos: # - id: pyroma # args: [-n, "10", .] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.6.0 hooks: - id: no-commit-to-branch # no commit directly to main diff --git a/GB_VERSION.txt b/GB_VERSION.txt index 2b0aa21..47da986 100644 --- a/GB_VERSION.txt +++ b/GB_VERSION.txt @@ -1 +1 @@ -8.2.1 +9.1.0 diff --git a/pyproject.toml b/pyproject.toml index bff0249..3a81b22 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -96,7 +96,7 @@ dirty_template = "{tag}+{ccount}.g{sha}.dirty" [tool.black] line-length = 100 -target-version = ["py38", "py39", "py310", "py311"] +target-version = ["py38", "py39", "py310", "py311", "py312"] [tool.isort] sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"] diff --git a/suitesparse_graphblas/create_headers.py b/suitesparse_graphblas/create_headers.py index 89c199c..2e723bb 100644 --- a/suitesparse_graphblas/create_headers.py +++ b/suitesparse_graphblas/create_headers.py @@ -21,6 +21,7 @@ Run `python create_headers.py --help` to see more help. """ + import argparse import os import re @@ -297,6 +298,7 @@ def groupby(index, seq): "GxB_COMPRESSION_LZ4HC", "GxB_COMPRESSION_ZSTD", "GxB_COMPRESSION_NONE", + "GxB_HAVE_COMPLEX_C99", # Added in 9.2.0 } CHAR_DEFINES = { @@ -633,6 +635,7 @@ def handle_function_node(node): "init": "core", "wait": "core", "deserialize": "core", + "Serialized": "core", # Added in version 9 }[group] return { "name": node.name, diff --git a/suitesparse_graphblas/suitesparse_graphblas.h b/suitesparse_graphblas/suitesparse_graphblas.h index eb5db2f..a268299 100644 --- a/suitesparse_graphblas/suitesparse_graphblas.h +++ b/suitesparse_graphblas/suitesparse_graphblas.h @@ -2,6 +2,7 @@ /* GrB typedefs */ typedef struct GB_BinaryOp_opaque *GrB_BinaryOp; typedef struct GB_Descriptor_opaque *GrB_Descriptor; +typedef struct GB_Global_opaque *GrB_Global; typedef struct GB_IndexUnaryOp_opaque *GrB_IndexUnaryOp; typedef struct GB_Matrix_opaque *GrB_Matrix; typedef struct GB_Monoid_opaque *GrB_Monoid; @@ -40,10 +41,12 @@ typedef enum typedef enum { + GrB_DEFAULT = 0, GxB_DEFAULT = 0, GrB_REPLACE = 1, GrB_COMP = 2, GrB_STRUCTURE = 4, + GrB_COMP_STRUCTURE = 6, GrB_TRAN = 3, GxB_AxB_GUSTAVSON = 7081, GxB_AxB_DOT = 7083, @@ -52,6 +55,39 @@ typedef enum GxB_SECURE_IMPORT = 7080 } GrB_Desc_Value; +typedef enum +{ + GrB_OUTP_FIELD = 0, + GrB_MASK_FIELD = 1, + GrB_INP0_FIELD = 2, + GrB_INP1_FIELD = 3, + GrB_NAME = 10, + GrB_LIBRARY_VER_MAJOR = 11, + GrB_LIBRARY_VER_MINOR = 12, + GrB_LIBRARY_VER_PATCH = 13, + GrB_API_VER_MAJOR = 14, + GrB_API_VER_MINOR = 15, + GrB_API_VER_PATCH = 16, + GrB_BLOCKING_MODE = 17, + GrB_STORAGE_ORIENTATION_HINT = 100, + GrB_EL_TYPE_CODE = 102, + GrB_EL_TYPE_STRING = 106, + GrB_INP0_TYPE_CODE = 103, + GrB_INP1_TYPE_CODE = 104, + GrB_OUTP_TYPE_CODE = 105, + GrB_INP0_TYPE_STRING = 107, + GrB_INP1_TYPE_STRING = 108, + GrB_OUTP_TYPE_STRING = 109, + GrB_SIZE = 110, + GxB_JIT_C_NAME = 7041, + GxB_JIT_C_DEFINITION = 7042, + GxB_MONOID_IDENTITY = 7043, + GxB_MONOID_TERMINAL = 7044, + GxB_MONOID_OPERATOR = 7045, + GxB_SEMIRING_MONOID = 7046, + GxB_SEMIRING_MULTIPLY = 7047 +} GrB_Field; + typedef enum { GrB_CSR_FORMAT = 0, @@ -72,6 +108,7 @@ typedef enum GrB_DIMENSION_MISMATCH = -6, GrB_OUTPUT_NOT_EMPTY = -7, GrB_NOT_IMPLEMENTED = -8, + GrB_ALREADY_SET = -9, GrB_PANIC = -101, GrB_OUT_OF_MEMORY = -102, GrB_INSUFFICIENT_SPACE = -103, @@ -88,6 +125,32 @@ typedef enum GxB_BLOCKING_GPU = 7098 } GrB_Mode; +typedef enum +{ + GrB_ROWMAJOR = 0, + GrB_COLMAJOR = 1, + GrB_BOTH = 2, + GrB_UNKNOWN = 3 +} GrB_Orientation; + +typedef enum +{ + GrB_UDT_CODE = 0, + GrB_BOOL_CODE = 1, + GrB_INT8_CODE = 2, + GrB_UINT8_CODE = 3, + GrB_INT16_CODE = 4, + GrB_UINT16_CODE = 5, + GrB_INT32_CODE = 6, + GrB_UINT32_CODE = 7, + GrB_INT64_CODE = 8, + GrB_UINT64_CODE = 9, + GrB_FP32_CODE = 10, + GrB_FP64_CODE = 11, + GxB_FC32_CODE = 7070, + GxB_FC64_CODE = 7071 +} GrB_Type_Code; + typedef enum { GrB_COMPLETE = 0, @@ -121,6 +184,7 @@ typedef enum typedef enum { GxB_HYPER_SWITCH = 7000, + GxB_HYPER_HASH = 7048, GxB_BITMAP_SWITCH = 7001, GxB_FORMAT = 7002, GxB_MODE = 7003, @@ -139,6 +203,10 @@ typedef enum GxB_COMPILER_VERSION = 7016, GxB_COMPILER_NAME = 7017, GxB_LIBRARY_OPENMP = 7018, + GxB_MALLOC_FUNCTION = 7037, + GxB_CALLOC_FUNCTION = 7038, + GxB_REALLOC_FUNCTION = 7039, + GxB_FREE_FUNCTION = 7040, GxB_GLOBAL_NTHREADS = 7086, GxB_GLOBAL_CHUNK = 7087, GxB_GLOBAL_GPU_ID = 7088, @@ -158,11 +226,7 @@ typedef enum GxB_JIT_USE_CMAKE = 7032, GxB_JIT_ERROR_LOG = 7033, GxB_SPARSITY_STATUS = 7034, - GxB_SPARSITY_CONTROL = 7036, - GxB_MALLOC_FUNCTION = 7037, - GxB_CALLOC_FUNCTION = 7038, - GxB_REALLOC_FUNCTION = 7039, - GxB_FREE_FUNCTION = 7040 + GxB_SPARSITY_CONTROL = 7036 } GxB_Option_Field; typedef enum @@ -176,6 +240,7 @@ typedef enum } GxB_Print_Level; /* GrB consts */ +extern const GrB_Global GrB_GLOBAL; extern const uint64_t *GrB_ALL; /* GxB consts */ @@ -2651,10 +2716,24 @@ extern GxB_SelectOp GxB_TRIU; /* binary */ GrB_Info GrB_BinaryOp_error(const char **error, const GrB_BinaryOp op); GrB_Info GrB_BinaryOp_free(GrB_BinaryOp *binaryop); +GrB_Info GrB_BinaryOp_get_INT32(GrB_BinaryOp, int32_t *, GrB_Field); +GrB_Info GrB_BinaryOp_get_SIZE(GrB_BinaryOp, size_t *, GrB_Field); +GrB_Info GrB_BinaryOp_get_String(GrB_BinaryOp, char *, GrB_Field); +GrB_Info GrB_BinaryOp_get_VOID(GrB_BinaryOp, void *, GrB_Field); GrB_Info GrB_BinaryOp_new(GrB_BinaryOp *binaryop, GxB_binary_function function, GrB_Type ztype, GrB_Type xtype, GrB_Type ytype); +GrB_Info GrB_BinaryOp_set_INT32(GrB_BinaryOp, int32_t, GrB_Field); +GrB_Info GrB_BinaryOp_set_String(GrB_BinaryOp, char *, GrB_Field); +GrB_Info GrB_BinaryOp_set_VOID(GrB_BinaryOp, void *, GrB_Field, size_t); GrB_Info GrB_BinaryOp_wait(GrB_BinaryOp op, GrB_WaitMode waitmode); /* core */ +GrB_Info GrB_Global_get_INT32(GrB_Global, int32_t *, GrB_Field); +GrB_Info GrB_Global_get_SIZE(GrB_Global, size_t *, GrB_Field); +GrB_Info GrB_Global_get_String(GrB_Global, char *, GrB_Field); +GrB_Info GrB_Global_get_VOID(GrB_Global, void *, GrB_Field); +GrB_Info GrB_Global_set_INT32(GrB_Global, int32_t, GrB_Field); +GrB_Info GrB_Global_set_String(GrB_Global, char *, GrB_Field); +GrB_Info GrB_Global_set_VOID(GrB_Global, void *, GrB_Field, size_t); GrB_Info GrB_finalize(void); GrB_Info GrB_getVersion(unsigned int *version, unsigned int *subversion); GrB_Info GrB_init(GrB_Mode mode); @@ -2662,19 +2741,33 @@ GrB_Info GrB_init(GrB_Mode mode); /* descriptor */ GrB_Info GrB_Descriptor_error(const char **error, const GrB_Descriptor d); GrB_Info GrB_Descriptor_free(GrB_Descriptor *descriptor); +GrB_Info GrB_Descriptor_get_INT32(GrB_Descriptor, int32_t *, GrB_Field); +GrB_Info GrB_Descriptor_get_SIZE(GrB_Descriptor, size_t *, GrB_Field); +GrB_Info GrB_Descriptor_get_String(GrB_Descriptor, char *, GrB_Field); +GrB_Info GrB_Descriptor_get_VOID(GrB_Descriptor, void *, GrB_Field); GrB_Info GrB_Descriptor_new(GrB_Descriptor *descriptor); -GrB_Info GrB_Descriptor_set(GrB_Descriptor desc, GrB_Desc_Field field, GrB_Desc_Value val); +GrB_Info GrB_Descriptor_set(GrB_Descriptor, GrB_Desc_Field, GrB_Desc_Value); +GrB_Info GrB_Descriptor_set_INT32(GrB_Descriptor, int32_t, GrB_Field); +GrB_Info GrB_Descriptor_set_String(GrB_Descriptor, char *, GrB_Field); +GrB_Info GrB_Descriptor_set_VOID(GrB_Descriptor, void *, GrB_Field, size_t); GrB_Info GrB_Descriptor_wait(GrB_Descriptor desc, GrB_WaitMode waitmode); /* indexunary */ GrB_Info GrB_IndexUnaryOp_error(const char **error, const GrB_IndexUnaryOp op); GrB_Info GrB_IndexUnaryOp_free(GrB_IndexUnaryOp *op); +GrB_Info GrB_IndexUnaryOp_get_INT32(GrB_IndexUnaryOp, int32_t *, GrB_Field); +GrB_Info GrB_IndexUnaryOp_get_SIZE(GrB_IndexUnaryOp, size_t *, GrB_Field); +GrB_Info GrB_IndexUnaryOp_get_String(GrB_IndexUnaryOp, char *, GrB_Field); +GrB_Info GrB_IndexUnaryOp_get_VOID(GrB_IndexUnaryOp, void *, GrB_Field); GrB_Info GrB_IndexUnaryOp_new(GrB_IndexUnaryOp *op, GxB_index_unary_function function, GrB_Type ztype, GrB_Type xtype, GrB_Type ytype); +GrB_Info GrB_IndexUnaryOp_set_INT32(GrB_IndexUnaryOp, int32_t, GrB_Field); +GrB_Info GrB_IndexUnaryOp_set_String(GrB_IndexUnaryOp, char *, GrB_Field); +GrB_Info GrB_IndexUnaryOp_set_VOID(GrB_IndexUnaryOp, void *, GrB_Field, size_t); GrB_Info GrB_IndexUnaryOp_wait(GrB_IndexUnaryOp op, GrB_WaitMode waitmode); /* matrix */ -GrB_Info GrB_Col_assign(GrB_Matrix C, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *I, GrB_Index ni, GrB_Index j, const GrB_Descriptor desc); -GrB_Info GrB_Col_extract(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Matrix A, const GrB_Index *I, GrB_Index ni, GrB_Index j, const GrB_Descriptor desc); +GrB_Info GrB_Col_assign(GrB_Matrix C, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *Ilist, GrB_Index ni, GrB_Index j, const GrB_Descriptor desc); +GrB_Info GrB_Col_extract(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Matrix A, const GrB_Index *Ilist, GrB_Index ni, GrB_Index j, const GrB_Descriptor desc); GrB_Info GrB_Matrix_apply(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_UnaryOp op, const GrB_Matrix A, const GrB_Descriptor desc); GrB_Info GrB_Matrix_apply_BinaryOp1st_BOOL(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_BinaryOp op, bool x, const GrB_Matrix A, const GrB_Descriptor desc); GrB_Info GrB_Matrix_apply_BinaryOp1st_FP32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_BinaryOp op, float x, const GrB_Matrix A, const GrB_Descriptor desc); @@ -2715,32 +2808,32 @@ GrB_Info GrB_Matrix_apply_IndexOp_UINT8(GrB_Matrix C, const GrB_Matrix Mask, con GrB_Info GrB_Matrix_apply_IndexOp_UINT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_IndexUnaryOp op, const GrB_Matrix A, uint16_t y, const GrB_Descriptor desc); GrB_Info GrB_Matrix_apply_IndexOp_UINT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_IndexUnaryOp op, const GrB_Matrix A, uint32_t y, const GrB_Descriptor desc); GrB_Info GrB_Matrix_apply_IndexOp_UINT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_IndexUnaryOp op, const GrB_Matrix A, uint64_t y, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_Matrix A, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_BOOL(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, bool x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_FP32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, float x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_FP64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, double x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_INT8(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int8_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_INT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int16_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_INT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_INT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_Scalar(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, GrB_Scalar x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_UDT(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, void *x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_UINT8(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint8_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_UINT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint16_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_UINT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_UINT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_build_BOOL(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const bool *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_FP32(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const float *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_FP64(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const double *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_INT8(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const int8_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_INT16(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const int16_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_INT32(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const int32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_INT64(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const int64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_UDT(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const void *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_UINT8(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const uint8_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_UINT16(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const uint16_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_UINT32(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const uint32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_UINT64(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const uint64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_assign(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_Matrix A, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_BOOL(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, bool x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_FP32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, float x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_FP64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, double x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_INT8(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int8_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_INT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int16_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_INT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_INT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_Scalar(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, GrB_Scalar x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_UDT(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, void *x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_UINT8(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint8_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_UINT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint16_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_UINT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_UINT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_build_BOOL(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const bool *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_FP32(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const float *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_FP64(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const double *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_INT8(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const int8_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_INT16(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const int16_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_INT32(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const int32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_INT64(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const int64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_UDT(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const void *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_UINT8(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const uint8_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_UINT16(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const uint16_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_UINT32(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const uint32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_UINT64(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const uint64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); GrB_Info GrB_Matrix_clear(GrB_Matrix A); GrB_Info GrB_Matrix_deserialize(GrB_Matrix *C, GrB_Type type, const void *blob, GrB_Index blob_size); GrB_Info GrB_Matrix_diag(GrB_Matrix *C, const GrB_Vector v, int64_t k); @@ -2766,7 +2859,7 @@ GrB_Info GrB_Matrix_export_UINT8(GrB_Index *Ap, GrB_Index *Ai, uint8_t *Ax, GrB_ GrB_Info GrB_Matrix_export_UINT16(GrB_Index *Ap, GrB_Index *Ai, uint16_t *Ax, GrB_Index *Ap_len, GrB_Index *Ai_len, GrB_Index *Ax_len, GrB_Format format, GrB_Matrix A); GrB_Info GrB_Matrix_export_UINT32(GrB_Index *Ap, GrB_Index *Ai, uint32_t *Ax, GrB_Index *Ap_len, GrB_Index *Ai_len, GrB_Index *Ax_len, GrB_Format format, GrB_Matrix A); GrB_Info GrB_Matrix_export_UINT64(GrB_Index *Ap, GrB_Index *Ai, uint64_t *Ax, GrB_Index *Ap_len, GrB_Index *Ai_len, GrB_Index *Ax_len, GrB_Format format, GrB_Matrix A); -GrB_Info GrB_Matrix_extract(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_Matrix A, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_extract(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_Matrix A, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); GrB_Info GrB_Matrix_extractElement_BOOL(bool *x, const GrB_Matrix A, GrB_Index i, GrB_Index j); GrB_Info GrB_Matrix_extractElement_FP32(float *x, const GrB_Matrix A, GrB_Index i, GrB_Index j); GrB_Info GrB_Matrix_extractElement_FP64(double *x, const GrB_Matrix A, GrB_Index i, GrB_Index j); @@ -2780,19 +2873,24 @@ GrB_Info GrB_Matrix_extractElement_UINT8(uint8_t *x, const GrB_Matrix A, GrB_Ind GrB_Info GrB_Matrix_extractElement_UINT16(uint16_t *x, const GrB_Matrix A, GrB_Index i, GrB_Index j); GrB_Info GrB_Matrix_extractElement_UINT32(uint32_t *x, const GrB_Matrix A, GrB_Index i, GrB_Index j); GrB_Info GrB_Matrix_extractElement_UINT64(uint64_t *x, const GrB_Matrix A, GrB_Index i, GrB_Index j); -GrB_Info GrB_Matrix_extractTuples_BOOL(GrB_Index *I, GrB_Index *J, bool *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_FP32(GrB_Index *I, GrB_Index *J, float *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_FP64(GrB_Index *I, GrB_Index *J, double *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_INT8(GrB_Index *I, GrB_Index *J, int8_t *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_INT16(GrB_Index *I, GrB_Index *J, int16_t *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_INT32(GrB_Index *I, GrB_Index *J, int32_t *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_INT64(GrB_Index *I, GrB_Index *J, int64_t *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_UDT(GrB_Index *I, GrB_Index *J, void *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_UINT8(GrB_Index *I, GrB_Index *J, uint8_t *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_UINT16(GrB_Index *I, GrB_Index *J, uint16_t *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_UINT32(GrB_Index *I, GrB_Index *J, uint32_t *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_UINT64(GrB_Index *I, GrB_Index *J, uint64_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_BOOL(GrB_Index *Ilist, GrB_Index *J, bool *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_FP32(GrB_Index *Ilist, GrB_Index *J, float *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_FP64(GrB_Index *Ilist, GrB_Index *J, double *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_INT8(GrB_Index *Ilist, GrB_Index *J, int8_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_INT16(GrB_Index *Ilist, GrB_Index *J, int16_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_INT32(GrB_Index *Ilist, GrB_Index *J, int32_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_INT64(GrB_Index *Ilist, GrB_Index *J, int64_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_UDT(GrB_Index *Ilist, GrB_Index *J, void *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_UINT8(GrB_Index *Ilist, GrB_Index *J, uint8_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_UINT16(GrB_Index *Ilist, GrB_Index *J, uint16_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_UINT32(GrB_Index *Ilist, GrB_Index *J, uint32_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_UINT64(GrB_Index *Ilist, GrB_Index *J, uint64_t *X, GrB_Index *nvals, const GrB_Matrix A); GrB_Info GrB_Matrix_free(GrB_Matrix *A); +GrB_Info GrB_Matrix_get_INT32(GrB_Matrix, int32_t *, GrB_Field); +GrB_Info GrB_Matrix_get_SIZE(GrB_Matrix, size_t *, GrB_Field); +GrB_Info GrB_Matrix_get_Scalar(GrB_Matrix, GrB_Scalar, GrB_Field); +GrB_Info GrB_Matrix_get_String(GrB_Matrix, char *, GrB_Field); +GrB_Info GrB_Matrix_get_VOID(GrB_Matrix, void *, GrB_Field); GrB_Info GrB_Matrix_import_BOOL(GrB_Matrix *A, GrB_Type type, GrB_Index nrows, GrB_Index ncols, const GrB_Index *Ap, const GrB_Index *Ai, const bool *Ax, GrB_Index Ap_len, GrB_Index Ai_len, GrB_Index Ax_len, GrB_Format format); GrB_Info GrB_Matrix_import_FP32(GrB_Matrix *A, GrB_Type type, GrB_Index nrows, GrB_Index ncols, const GrB_Index *Ap, const GrB_Index *Ai, const float *Ax, GrB_Index Ap_len, GrB_Index Ai_len, GrB_Index Ax_len, GrB_Format format); GrB_Info GrB_Matrix_import_FP64(GrB_Matrix *A, GrB_Type type, GrB_Index nrows, GrB_Index ncols, const GrB_Index *Ap, const GrB_Index *Ai, const double *Ax, GrB_Index Ap_len, GrB_Index Ai_len, GrB_Index Ax_len, GrB_Format format); @@ -2858,6 +2956,10 @@ GrB_Info GrB_Matrix_setElement_UINT8(GrB_Matrix C, uint8_t x, GrB_Index i, GrB_I GrB_Info GrB_Matrix_setElement_UINT16(GrB_Matrix C, uint16_t x, GrB_Index i, GrB_Index j); GrB_Info GrB_Matrix_setElement_UINT32(GrB_Matrix C, uint32_t x, GrB_Index i, GrB_Index j); GrB_Info GrB_Matrix_setElement_UINT64(GrB_Matrix C, uint64_t x, GrB_Index i, GrB_Index j); +GrB_Info GrB_Matrix_set_INT32(GrB_Matrix, int32_t, GrB_Field); +GrB_Info GrB_Matrix_set_Scalar(GrB_Matrix, GrB_Scalar, GrB_Field); +GrB_Info GrB_Matrix_set_String(GrB_Matrix, char *, GrB_Field); +GrB_Info GrB_Matrix_set_VOID(GrB_Matrix, void *, GrB_Field, size_t); GrB_Info GrB_Matrix_wait(GrB_Matrix A, GrB_WaitMode waitmode); GrB_Info GrB_Row_assign(GrB_Matrix C, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, GrB_Index i, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); GrB_Info GrB_mxm(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_Semiring semiring, const GrB_Matrix A, const GrB_Matrix B, const GrB_Descriptor desc); @@ -2868,6 +2970,10 @@ GrB_Info GrB_vxm(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, /* monoid */ GrB_Info GrB_Monoid_error(const char **error, const GrB_Monoid monoid); GrB_Info GrB_Monoid_free(GrB_Monoid *monoid); +GrB_Info GrB_Monoid_get_INT32(GrB_Monoid, int32_t *, GrB_Field); +GrB_Info GrB_Monoid_get_SIZE(GrB_Monoid, size_t *, GrB_Field); +GrB_Info GrB_Monoid_get_String(GrB_Monoid, char *, GrB_Field); +GrB_Info GrB_Monoid_get_VOID(GrB_Monoid, void *, GrB_Field); GrB_Info GrB_Monoid_new_BOOL(GrB_Monoid *monoid, GrB_BinaryOp op, bool identity); GrB_Info GrB_Monoid_new_FP32(GrB_Monoid *monoid, GrB_BinaryOp op, float identity); GrB_Info GrB_Monoid_new_FP64(GrB_Monoid *monoid, GrB_BinaryOp op, double identity); @@ -2880,9 +2986,22 @@ GrB_Info GrB_Monoid_new_UINT8(GrB_Monoid *monoid, GrB_BinaryOp op, uint8_t ident GrB_Info GrB_Monoid_new_UINT16(GrB_Monoid *monoid, GrB_BinaryOp op, uint16_t identity); GrB_Info GrB_Monoid_new_UINT32(GrB_Monoid *monoid, GrB_BinaryOp op, uint32_t identity); GrB_Info GrB_Monoid_new_UINT64(GrB_Monoid *monoid, GrB_BinaryOp op, uint64_t identity); +GrB_Info GrB_Monoid_set_INT32(GrB_Monoid, int32_t, GrB_Field); +GrB_Info GrB_Monoid_set_String(GrB_Monoid, char *, GrB_Field); +GrB_Info GrB_Monoid_set_VOID(GrB_Monoid, void *, GrB_Field, size_t); GrB_Info GrB_Monoid_wait(GrB_Monoid monoid, GrB_WaitMode waitmode); /* scalar */ +GrB_Info GrB_BinaryOp_get_Scalar(GrB_BinaryOp, GrB_Scalar, GrB_Field); +GrB_Info GrB_BinaryOp_set_Scalar(GrB_BinaryOp, GrB_Scalar, GrB_Field); +GrB_Info GrB_Descriptor_get_Scalar(GrB_Descriptor, GrB_Scalar, GrB_Field); +GrB_Info GrB_Descriptor_set_Scalar(GrB_Descriptor, GrB_Scalar, GrB_Field); +GrB_Info GrB_Global_get_Scalar(GrB_Global, GrB_Scalar, GrB_Field); +GrB_Info GrB_Global_set_Scalar(GrB_Global, GrB_Scalar, GrB_Field); +GrB_Info GrB_IndexUnaryOp_get_Scalar(GrB_IndexUnaryOp, GrB_Scalar, GrB_Field); +GrB_Info GrB_IndexUnaryOp_set_Scalar(GrB_IndexUnaryOp, GrB_Scalar, GrB_Field); +GrB_Info GrB_Monoid_get_Scalar(GrB_Monoid, GrB_Scalar, GrB_Field); +GrB_Info GrB_Monoid_set_Scalar(GrB_Monoid, GrB_Scalar, GrB_Field); GrB_Info GrB_Scalar_clear(GrB_Scalar s); GrB_Info GrB_Scalar_dup(GrB_Scalar *s, const GrB_Scalar t); GrB_Info GrB_Scalar_error(const char **error, const GrB_Scalar s); @@ -2899,6 +3018,11 @@ GrB_Info GrB_Scalar_extractElement_UINT16(uint16_t *x, const GrB_Scalar s); GrB_Info GrB_Scalar_extractElement_UINT32(uint32_t *x, const GrB_Scalar s); GrB_Info GrB_Scalar_extractElement_UINT64(uint64_t *x, const GrB_Scalar s); GrB_Info GrB_Scalar_free(GrB_Scalar *s); +GrB_Info GrB_Scalar_get_INT32(GrB_Scalar, int32_t *, GrB_Field); +GrB_Info GrB_Scalar_get_SIZE(GrB_Scalar, size_t *, GrB_Field); +GrB_Info GrB_Scalar_get_Scalar(GrB_Scalar, GrB_Scalar, GrB_Field); +GrB_Info GrB_Scalar_get_String(GrB_Scalar, char *, GrB_Field); +GrB_Info GrB_Scalar_get_VOID(GrB_Scalar, void *, GrB_Field); GrB_Info GrB_Scalar_new(GrB_Scalar *s, GrB_Type type); GrB_Info GrB_Scalar_nvals(GrB_Index *nvals, const GrB_Scalar s); GrB_Info GrB_Scalar_setElement_BOOL(GrB_Scalar s, bool x); @@ -2913,24 +3037,55 @@ GrB_Info GrB_Scalar_setElement_UINT8(GrB_Scalar s, uint8_t x); GrB_Info GrB_Scalar_setElement_UINT16(GrB_Scalar s, uint16_t x); GrB_Info GrB_Scalar_setElement_UINT32(GrB_Scalar s, uint32_t x); GrB_Info GrB_Scalar_setElement_UINT64(GrB_Scalar s, uint64_t x); +GrB_Info GrB_Scalar_set_INT32(GrB_Scalar, int32_t, GrB_Field); +GrB_Info GrB_Scalar_set_Scalar(GrB_Scalar, GrB_Scalar, GrB_Field); +GrB_Info GrB_Scalar_set_String(GrB_Scalar, char *, GrB_Field); +GrB_Info GrB_Scalar_set_VOID(GrB_Scalar, void *, GrB_Field, size_t); GrB_Info GrB_Scalar_wait(GrB_Scalar s, GrB_WaitMode waitmode); +GrB_Info GrB_Semiring_get_Scalar(GrB_Semiring, GrB_Scalar, GrB_Field); +GrB_Info GrB_Semiring_set_Scalar(GrB_Semiring, GrB_Scalar, GrB_Field); +GrB_Info GrB_Type_get_Scalar(GrB_Type, GrB_Scalar, GrB_Field); +GrB_Info GrB_Type_set_Scalar(GrB_Type, GrB_Scalar, GrB_Field); +GrB_Info GrB_UnaryOp_get_Scalar(GrB_UnaryOp, GrB_Scalar, GrB_Field); +GrB_Info GrB_UnaryOp_set_Scalar(GrB_UnaryOp, GrB_Scalar, GrB_Field); /* semiring */ GrB_Info GrB_Semiring_error(const char **error, const GrB_Semiring semiring); GrB_Info GrB_Semiring_free(GrB_Semiring *semiring); +GrB_Info GrB_Semiring_get_INT32(GrB_Semiring, int32_t *, GrB_Field); +GrB_Info GrB_Semiring_get_SIZE(GrB_Semiring, size_t *, GrB_Field); +GrB_Info GrB_Semiring_get_String(GrB_Semiring, char *, GrB_Field); +GrB_Info GrB_Semiring_get_VOID(GrB_Semiring, void *, GrB_Field); GrB_Info GrB_Semiring_new(GrB_Semiring *semiring, GrB_Monoid add, GrB_BinaryOp multiply); +GrB_Info GrB_Semiring_set_INT32(GrB_Semiring, int32_t, GrB_Field); +GrB_Info GrB_Semiring_set_String(GrB_Semiring, char *, GrB_Field); +GrB_Info GrB_Semiring_set_VOID(GrB_Semiring, void *, GrB_Field, size_t); GrB_Info GrB_Semiring_wait(GrB_Semiring semiring, GrB_WaitMode waitmode); /* type */ GrB_Info GrB_Type_error(const char **error, const GrB_Type type); GrB_Info GrB_Type_free(GrB_Type *type); +GrB_Info GrB_Type_get_INT32(GrB_Type, int32_t *, GrB_Field); +GrB_Info GrB_Type_get_SIZE(GrB_Type, size_t *, GrB_Field); +GrB_Info GrB_Type_get_String(GrB_Type, char *, GrB_Field); +GrB_Info GrB_Type_get_VOID(GrB_Type, void *, GrB_Field); GrB_Info GrB_Type_new(GrB_Type *type, size_t sizeof_ctype); +GrB_Info GrB_Type_set_INT32(GrB_Type, int32_t, GrB_Field); +GrB_Info GrB_Type_set_String(GrB_Type, char *, GrB_Field); +GrB_Info GrB_Type_set_VOID(GrB_Type, void *, GrB_Field, size_t); GrB_Info GrB_Type_wait(GrB_Type type, GrB_WaitMode waitmode); /* unary */ GrB_Info GrB_UnaryOp_error(const char **error, const GrB_UnaryOp op); GrB_Info GrB_UnaryOp_free(GrB_UnaryOp *unaryop); +GrB_Info GrB_UnaryOp_get_INT32(GrB_UnaryOp, int32_t *, GrB_Field); +GrB_Info GrB_UnaryOp_get_SIZE(GrB_UnaryOp, size_t *, GrB_Field); +GrB_Info GrB_UnaryOp_get_String(GrB_UnaryOp, char *, GrB_Field); +GrB_Info GrB_UnaryOp_get_VOID(GrB_UnaryOp, void *, GrB_Field); GrB_Info GrB_UnaryOp_new(GrB_UnaryOp *unaryop, GxB_unary_function function, GrB_Type ztype, GrB_Type xtype); +GrB_Info GrB_UnaryOp_set_INT32(GrB_UnaryOp, int32_t, GrB_Field); +GrB_Info GrB_UnaryOp_set_String(GrB_UnaryOp, char *, GrB_Field); +GrB_Info GrB_UnaryOp_set_VOID(GrB_UnaryOp, void *, GrB_Field, size_t); GrB_Info GrB_UnaryOp_wait(GrB_UnaryOp op, GrB_WaitMode waitmode); /* vector */ @@ -2974,32 +3129,32 @@ GrB_Info GrB_Vector_apply_IndexOp_UINT8(GrB_Vector w, const GrB_Vector mask, con GrB_Info GrB_Vector_apply_IndexOp_UINT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_IndexUnaryOp op, const GrB_Vector u, uint16_t y, const GrB_Descriptor desc); GrB_Info GrB_Vector_apply_IndexOp_UINT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_IndexUnaryOp op, const GrB_Vector u, uint32_t y, const GrB_Descriptor desc); GrB_Info GrB_Vector_apply_IndexOp_UINT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_IndexUnaryOp op, const GrB_Vector u, uint64_t y, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_BOOL(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, bool x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_FP32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, float x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_FP64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, double x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_INT8(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int8_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_INT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int16_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_INT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_INT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_Scalar(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, GrB_Scalar x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_UDT(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, void *x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_UINT8(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint8_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_UINT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint16_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_UINT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_UINT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_build_BOOL(GrB_Vector w, const GrB_Index *I, const bool *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_FP32(GrB_Vector w, const GrB_Index *I, const float *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_FP64(GrB_Vector w, const GrB_Index *I, const double *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_INT8(GrB_Vector w, const GrB_Index *I, const int8_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_INT16(GrB_Vector w, const GrB_Index *I, const int16_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_INT32(GrB_Vector w, const GrB_Index *I, const int32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_INT64(GrB_Vector w, const GrB_Index *I, const int64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_UDT(GrB_Vector w, const GrB_Index *I, const void *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_UINT8(GrB_Vector w, const GrB_Index *I, const uint8_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_UINT16(GrB_Vector w, const GrB_Index *I, const uint16_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_UINT32(GrB_Vector w, const GrB_Index *I, const uint32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_UINT64(GrB_Vector w, const GrB_Index *I, const uint64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_assign(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_BOOL(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, bool x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_FP32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, float x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_FP64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, double x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_INT8(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int8_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_INT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int16_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_INT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_INT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_Scalar(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, GrB_Scalar x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_UDT(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, void *x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_UINT8(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint8_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_UINT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint16_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_UINT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_UINT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_build_BOOL(GrB_Vector w, const GrB_Index *Ilist, const bool *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_FP32(GrB_Vector w, const GrB_Index *Ilist, const float *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_FP64(GrB_Vector w, const GrB_Index *Ilist, const double *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_INT8(GrB_Vector w, const GrB_Index *Ilist, const int8_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_INT16(GrB_Vector w, const GrB_Index *Ilist, const int16_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_INT32(GrB_Vector w, const GrB_Index *Ilist, const int32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_INT64(GrB_Vector w, const GrB_Index *Ilist, const int64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_UDT(GrB_Vector w, const GrB_Index *Ilist, const void *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_UINT8(GrB_Vector w, const GrB_Index *Ilist, const uint8_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_UINT16(GrB_Vector w, const GrB_Index *Ilist, const uint16_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_UINT32(GrB_Vector w, const GrB_Index *Ilist, const uint32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_UINT64(GrB_Vector w, const GrB_Index *Ilist, const uint64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); GrB_Info GrB_Vector_clear(GrB_Vector v); GrB_Info GrB_Vector_dup(GrB_Vector *w, const GrB_Vector u); GrB_Info GrB_Vector_eWiseAdd_BinaryOp(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_BinaryOp add, const GrB_Vector u, const GrB_Vector v, const GrB_Descriptor desc); @@ -3009,7 +3164,7 @@ GrB_Info GrB_Vector_eWiseMult_BinaryOp(GrB_Vector w, const GrB_Vector mask, cons GrB_Info GrB_Vector_eWiseMult_Monoid(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Monoid monoid, const GrB_Vector u, const GrB_Vector v, const GrB_Descriptor desc); GrB_Info GrB_Vector_eWiseMult_Semiring(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Semiring semiring, const GrB_Vector u, const GrB_Vector v, const GrB_Descriptor desc); GrB_Info GrB_Vector_error(const char **error, const GrB_Vector v); -GrB_Info GrB_Vector_extract(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_extract(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); GrB_Info GrB_Vector_extractElement_BOOL(bool *x, const GrB_Vector v, GrB_Index i); GrB_Info GrB_Vector_extractElement_FP32(float *x, const GrB_Vector v, GrB_Index i); GrB_Info GrB_Vector_extractElement_FP64(double *x, const GrB_Vector v, GrB_Index i); @@ -3023,19 +3178,24 @@ GrB_Info GrB_Vector_extractElement_UINT8(uint8_t *x, const GrB_Vector v, GrB_Ind GrB_Info GrB_Vector_extractElement_UINT16(uint16_t *x, const GrB_Vector v, GrB_Index i); GrB_Info GrB_Vector_extractElement_UINT32(uint32_t *x, const GrB_Vector v, GrB_Index i); GrB_Info GrB_Vector_extractElement_UINT64(uint64_t *x, const GrB_Vector v, GrB_Index i); -GrB_Info GrB_Vector_extractTuples_BOOL(GrB_Index *I, bool *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_FP32(GrB_Index *I, float *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_FP64(GrB_Index *I, double *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_INT8(GrB_Index *I, int8_t *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_INT16(GrB_Index *I, int16_t *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_INT32(GrB_Index *I, int32_t *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_INT64(GrB_Index *I, int64_t *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_UDT(GrB_Index *I, void *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_UINT8(GrB_Index *I, uint8_t *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_UINT16(GrB_Index *I, uint16_t *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_UINT32(GrB_Index *I, uint32_t *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_UINT64(GrB_Index *I, uint64_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_BOOL(GrB_Index *Ilist, bool *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_FP32(GrB_Index *Ilist, float *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_FP64(GrB_Index *Ilist, double *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_INT8(GrB_Index *Ilist, int8_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_INT16(GrB_Index *Ilist, int16_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_INT32(GrB_Index *Ilist, int32_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_INT64(GrB_Index *Ilist, int64_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_UDT(GrB_Index *Ilist, void *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_UINT8(GrB_Index *Ilist, uint8_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_UINT16(GrB_Index *Ilist, uint16_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_UINT32(GrB_Index *Ilist, uint32_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_UINT64(GrB_Index *Ilist, uint64_t *X, GrB_Index *nvals, const GrB_Vector v); GrB_Info GrB_Vector_free(GrB_Vector *v); +GrB_Info GrB_Vector_get_INT32(GrB_Vector, int32_t *, GrB_Field); +GrB_Info GrB_Vector_get_SIZE(GrB_Vector, size_t *, GrB_Field); +GrB_Info GrB_Vector_get_Scalar(GrB_Vector, GrB_Scalar, GrB_Field); +GrB_Info GrB_Vector_get_String(GrB_Vector, char *, GrB_Field); +GrB_Info GrB_Vector_get_VOID(GrB_Vector, void *, GrB_Field); GrB_Info GrB_Vector_new(GrB_Vector *v, GrB_Type type, GrB_Index n); GrB_Info GrB_Vector_nvals(GrB_Index *nvals, const GrB_Vector v); GrB_Info GrB_Vector_reduce_BOOL(bool *c, const GrB_BinaryOp accum, const GrB_Monoid monoid, const GrB_Vector u, const GrB_Descriptor desc); @@ -3080,6 +3240,10 @@ GrB_Info GrB_Vector_setElement_UINT8(GrB_Vector w, uint8_t x, GrB_Index i); GrB_Info GrB_Vector_setElement_UINT16(GrB_Vector w, uint16_t x, GrB_Index i); GrB_Info GrB_Vector_setElement_UINT32(GrB_Vector w, uint32_t x, GrB_Index i); GrB_Info GrB_Vector_setElement_UINT64(GrB_Vector w, uint64_t x, GrB_Index i); +GrB_Info GrB_Vector_set_INT32(GrB_Vector, int32_t, GrB_Field); +GrB_Info GrB_Vector_set_Scalar(GrB_Vector, GrB_Scalar, GrB_Field); +GrB_Info GrB_Vector_set_String(GrB_Vector, char *, GrB_Field); +GrB_Info GrB_Vector_set_VOID(GrB_Vector, void *, GrB_Field, size_t); GrB_Info GrB_Vector_size(GrB_Index *n, const GrB_Vector v); GrB_Info GrB_Vector_wait(GrB_Vector v, GrB_WaitMode waitmode); @@ -3102,12 +3266,12 @@ GrB_Info GB_Iterator_attach(GxB_Iterator iterator, GrB_Matrix A, GxB_Format_Valu /* binary */ GrB_Info GxB_BinaryOp_fprint(GrB_BinaryOp binaryop, const char *name, GxB_Print_Level pr, FILE *f); GrB_Info GxB_BinaryOp_new(GrB_BinaryOp *op, GxB_binary_function function, GrB_Type ztype, GrB_Type xtype, GrB_Type ytype, const char *binop_name, const char *binop_defn); -GrB_Info GxB_BinaryOp_xtype(GrB_Type *xtype, GrB_BinaryOp binaryop); -GrB_Info GxB_BinaryOp_xtype_name(char *type_name, const GrB_BinaryOp binaryop); -GrB_Info GxB_BinaryOp_ytype(GrB_Type *ytype, GrB_BinaryOp binaryop); -GrB_Info GxB_BinaryOp_ytype_name(char *type_name, const GrB_BinaryOp binaryop); -GrB_Info GxB_BinaryOp_ztype(GrB_Type *ztype, GrB_BinaryOp binaryop); -GrB_Info GxB_BinaryOp_ztype_name(char *type_name, const GrB_BinaryOp binaryop); +GrB_Info GxB_BinaryOp_xtype(GrB_Type *xtype, GrB_BinaryOp op); +GrB_Info GxB_BinaryOp_xtype_name(char *type_name, const GrB_BinaryOp op); +GrB_Info GxB_BinaryOp_ytype(GrB_Type *ytype, GrB_BinaryOp op); +GrB_Info GxB_BinaryOp_ytype_name(char *type_name, const GrB_BinaryOp op); +GrB_Info GxB_BinaryOp_ztype(GrB_Type *ztype, GrB_BinaryOp op); +GrB_Info GxB_BinaryOp_ztype_name(char *type_name, const GrB_BinaryOp op); /* context */ GrB_Info GxB_Context_disengage(GxB_Context Context); @@ -3115,48 +3279,59 @@ GrB_Info GxB_Context_engage(GxB_Context Context); GrB_Info GxB_Context_error(const char **error, const GxB_Context Context); GrB_Info GxB_Context_fprint(GxB_Context Context, const char *name, GxB_Print_Level pr, FILE *f); GrB_Info GxB_Context_free(GxB_Context *Context); -GrB_Info GxB_Context_get(GxB_Context Context, GxB_Context_Field field, ...); -GrB_Info GxB_Context_get_FP64(GxB_Context Context, GxB_Context_Field field, double *value); -GrB_Info GxB_Context_get_INT32(GxB_Context Context, GxB_Context_Field field, int32_t *value); +GrB_Info GxB_Context_get(GxB_Context, GxB_Context_Field, ...); +GrB_Info GxB_Context_get_FP64(GxB_Context, GxB_Context_Field, double *); +GrB_Info GxB_Context_get_INT(GxB_Context, int32_t *, GrB_Field); +GrB_Info GxB_Context_get_INT32(GxB_Context, GxB_Context_Field, int32_t *); +GrB_Info GxB_Context_get_SIZE(GxB_Context, size_t *, GrB_Field); +GrB_Info GxB_Context_get_String(GxB_Context, char *, GrB_Field); +GrB_Info GxB_Context_get_VOID(GxB_Context, void *, GrB_Field); GrB_Info GxB_Context_new(GxB_Context *Context); -GrB_Info GxB_Context_set(GxB_Context Context, GxB_Context_Field field, ...); -GrB_Info GxB_Context_set_FP64(GxB_Context Context, GxB_Context_Field field, double value); -GrB_Info GxB_Context_set_INT32(GxB_Context Context, GxB_Context_Field field, int32_t value); +GrB_Info GxB_Context_set(GxB_Context, GxB_Context_Field, ...); +GrB_Info GxB_Context_set_FP64(GxB_Context, GxB_Context_Field, double); +GrB_Info GxB_Context_set_INT(GxB_Context, int32_t, GrB_Field); +GrB_Info GxB_Context_set_INT32(GxB_Context, GxB_Context_Field, int32_t); +GrB_Info GxB_Context_set_String(GxB_Context, char *, GrB_Field); +GrB_Info GxB_Context_set_VOID(GxB_Context, void *, GrB_Field, size_t); GrB_Info GxB_Context_wait(GxB_Context Context, GrB_WaitMode waitmode); /* core */ -GrB_Info GxB_Global_Option_get(GxB_Option_Field field, ...); -GrB_Info GxB_Global_Option_get_CHAR(GxB_Option_Field field, const char **value); -GrB_Info GxB_Global_Option_get_FP64(GxB_Option_Field field, double *value); -GrB_Info GxB_Global_Option_get_FUNCTION(GxB_Option_Field field, void **value); -GrB_Info GxB_Global_Option_get_INT32(GxB_Option_Field field, int32_t *value); -GrB_Info GxB_Global_Option_get_INT64(GxB_Option_Field field, int64_t *value); -GrB_Info GxB_Global_Option_set(GxB_Option_Field field, ...); -GrB_Info GxB_Global_Option_set_CHAR(GxB_Option_Field field, const char *value); -GrB_Info GxB_Global_Option_set_FP64(GxB_Option_Field field, double value); -GrB_Info GxB_Global_Option_set_FP64_ARRAY(GxB_Option_Field field, double *value); -GrB_Info GxB_Global_Option_set_FUNCTION(GxB_Option_Field field, void *value); -GrB_Info GxB_Global_Option_set_INT32(GxB_Option_Field field, int32_t value); -GrB_Info GxB_Global_Option_set_INT64_ARRAY(GxB_Option_Field field, int64_t *value); -GrB_Info GxB_deserialize_type_name(char *type_name, const void *blob, GrB_Index blob_size); +GrB_Info GxB_Global_Option_get(GxB_Option_Field, ...); +GrB_Info GxB_Global_Option_get_CHAR(GxB_Option_Field, const char **); +GrB_Info GxB_Global_Option_get_FP64(GxB_Option_Field, double *); +GrB_Info GxB_Global_Option_get_FUNCTION(GxB_Option_Field, void **); +GrB_Info GxB_Global_Option_get_INT32(GxB_Option_Field, int32_t *); +GrB_Info GxB_Global_Option_get_INT64(GxB_Option_Field, int64_t *); +GrB_Info GxB_Global_Option_set(GxB_Option_Field, ...); +GrB_Info GxB_Global_Option_set_CHAR(GxB_Option_Field, const char *); +GrB_Info GxB_Global_Option_set_FP64(GxB_Option_Field, double); +GrB_Info GxB_Global_Option_set_FP64_ARRAY(GxB_Option_Field, double *); +GrB_Info GxB_Global_Option_set_FUNCTION(GxB_Option_Field, void *); +GrB_Info GxB_Global_Option_set_INT32(GxB_Option_Field, int32_t); +GrB_Info GxB_Global_Option_set_INT64_ARRAY(GxB_Option_Field, int64_t *); +GrB_Info GxB_Serialized_get_INT32(const void *, int32_t *, GrB_Field, size_t); +GrB_Info GxB_Serialized_get_SIZE(const void *, size_t *, GrB_Field, size_t); +GrB_Info GxB_Serialized_get_String(const void *, char *, GrB_Field, size_t); +GrB_Info GxB_Serialized_get_VOID(const void *, void *, GrB_Field, size_t); +GrB_Info GxB_deserialize_type_name(char *, const void *, GrB_Index); GrB_Info GxB_init(GrB_Mode mode, void *(*user_malloc_function)(size_t), void *(*user_calloc_function)(size_t, size_t), void *(*user_realloc_function)(void *, size_t), void (*user_free_function)(void *)); /* descriptor */ -GrB_Info GxB_Desc_get(GrB_Descriptor desc, GrB_Desc_Field field, ...); -GrB_Info GxB_Desc_get_FP64(GrB_Descriptor desc, GrB_Desc_Field field, double *value); -GrB_Info GxB_Desc_get_INT32(GrB_Descriptor desc, GrB_Desc_Field field, int32_t *value); -GrB_Info GxB_Desc_set(GrB_Descriptor desc, GrB_Desc_Field field, ...); -GrB_Info GxB_Desc_set_FP64(GrB_Descriptor desc, GrB_Desc_Field field, double value); -GrB_Info GxB_Desc_set_INT32(GrB_Descriptor desc, GrB_Desc_Field field, int32_t value); +GrB_Info GxB_Desc_get(GrB_Descriptor, GrB_Desc_Field, ...); +GrB_Info GxB_Desc_get_FP64(GrB_Descriptor, GrB_Desc_Field, double *); +GrB_Info GxB_Desc_get_INT32(GrB_Descriptor, GrB_Desc_Field, int32_t *); +GrB_Info GxB_Desc_set(GrB_Descriptor, GrB_Desc_Field, ...); +GrB_Info GxB_Desc_set_FP64(GrB_Descriptor, GrB_Desc_Field, double); +GrB_Info GxB_Desc_set_INT32(GrB_Descriptor, GrB_Desc_Field, int32_t); GrB_Info GxB_Descriptor_fprint(GrB_Descriptor descriptor, const char *name, GxB_Print_Level pr, FILE *f); -GrB_Info GxB_Descriptor_get(GrB_Desc_Value *val, GrB_Descriptor desc, GrB_Desc_Field field); +GrB_Info GxB_Descriptor_get(GrB_Desc_Value *, GrB_Descriptor, GrB_Desc_Field); /* indexunary */ GrB_Info GxB_IndexUnaryOp_fprint(GrB_IndexUnaryOp op, const char *name, GxB_Print_Level pr, FILE *f); GrB_Info GxB_IndexUnaryOp_new(GrB_IndexUnaryOp *op, GxB_index_unary_function function, GrB_Type ztype, GrB_Type xtype, GrB_Type ytype, const char *idxop_name, const char *idxop_defn); -GrB_Info GxB_IndexUnaryOp_xtype_name(char *type_name, const GrB_IndexUnaryOp op); -GrB_Info GxB_IndexUnaryOp_ytype_name(char *type_name, const GrB_IndexUnaryOp op); -GrB_Info GxB_IndexUnaryOp_ztype_name(char *type_name, const GrB_IndexUnaryOp op); +GrB_Info GxB_IndexUnaryOp_xtype_name(char *, const GrB_IndexUnaryOp op); +GrB_Info GxB_IndexUnaryOp_ytype_name(char *, const GrB_IndexUnaryOp op); +GrB_Info GxB_IndexUnaryOp_ztype_name(char *, const GrB_IndexUnaryOp op); /* iterator */ GrB_Index GxB_Matrix_Iterator_getp(GxB_Iterator iterator); @@ -3201,14 +3376,14 @@ void GxB_Iterator_get_UDT(GxB_Iterator iterator, void *value); void GxB_Matrix_Iterator_getIndex(GxB_Iterator iterator, GrB_Index *row, GrB_Index *col); /* matrix */ -GrB_Info GxB_Col_subassign(GrB_Matrix C, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *I, GrB_Index ni, GrB_Index j, const GrB_Descriptor desc); +GrB_Info GxB_Col_subassign(GrB_Matrix C, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *Ilist, GrB_Index ni, GrB_Index j, const GrB_Descriptor desc); GrB_Info GxB_Matrix_Iterator_attach(GxB_Iterator iterator, GrB_Matrix A, GrB_Descriptor desc); -GrB_Info GxB_Matrix_Option_get(GrB_Matrix A, GxB_Option_Field field, ...); -GrB_Info GxB_Matrix_Option_get_FP64(GrB_Matrix A, GxB_Option_Field field, double *value); -GrB_Info GxB_Matrix_Option_get_INT32(GrB_Matrix A, GxB_Option_Field field, int32_t *value); -GrB_Info GxB_Matrix_Option_set(GrB_Matrix A, GxB_Option_Field field, ...); -GrB_Info GxB_Matrix_Option_set_FP64(GrB_Matrix A, GxB_Option_Field field, double value); -GrB_Info GxB_Matrix_Option_set_INT32(GrB_Matrix A, GxB_Option_Field field, int32_t value); +GrB_Info GxB_Matrix_Option_get(GrB_Matrix, GxB_Option_Field, ...); +GrB_Info GxB_Matrix_Option_get_FP64(GrB_Matrix, GxB_Option_Field, double *); +GrB_Info GxB_Matrix_Option_get_INT32(GrB_Matrix, GxB_Option_Field, int32_t *); +GrB_Info GxB_Matrix_Option_set(GrB_Matrix, GxB_Option_Field, ...); +GrB_Info GxB_Matrix_Option_set_FP64(GrB_Matrix, GxB_Option_Field, double); +GrB_Info GxB_Matrix_Option_set_INT32(GrB_Matrix, GxB_Option_Field, int32_t); GrB_Info GxB_Matrix_apply_BinaryOp1st(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_BinaryOp op, const GrB_Scalar x, const GrB_Matrix A, const GrB_Descriptor desc); GrB_Info GxB_Matrix_apply_BinaryOp1st_FC32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_BinaryOp op, GxB_FC32_t x, const GrB_Matrix A, const GrB_Descriptor desc); GrB_Info GxB_Matrix_apply_BinaryOp1st_FC64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_BinaryOp op, GxB_FC64_t x, const GrB_Matrix A, const GrB_Descriptor desc); @@ -3217,11 +3392,11 @@ GrB_Info GxB_Matrix_apply_BinaryOp2nd_FC32(GrB_Matrix C, const GrB_Matrix Mask, GrB_Info GxB_Matrix_apply_BinaryOp2nd_FC64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_BinaryOp op, const GrB_Matrix A, GxB_FC64_t y, const GrB_Descriptor desc); GrB_Info GxB_Matrix_apply_IndexOp_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); GrB_Info GxB_Matrix_apply_IndexOp_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); -GrB_Info GxB_Matrix_assign_FC32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, GxB_FC32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_assign_FC64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, GxB_FC64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_build_FC32(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const GxB_FC32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GxB_Matrix_build_FC64(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const GxB_FC64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GxB_Matrix_build_Scalar(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, GrB_Scalar scalar, GrB_Index nvals); +GrB_Info GxB_Matrix_assign_FC32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, GxB_FC32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_assign_FC64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, GxB_FC64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_build_FC32(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const GxB_FC32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GxB_Matrix_build_FC64(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const GxB_FC64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GxB_Matrix_build_Scalar(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, GrB_Scalar scalar, GrB_Index nvals); GrB_Info GxB_Matrix_concat(GrB_Matrix C, const GrB_Matrix *Tiles, const GrB_Index m, const GrB_Index n, const GrB_Descriptor desc); GrB_Info GxB_Matrix_deserialize(GrB_Matrix *C, GrB_Type type, const void *blob, GrB_Index blob_size, const GrB_Descriptor desc); GrB_Info GxB_Matrix_diag(GrB_Matrix C, const GrB_Vector v, int64_t k, const GrB_Descriptor desc); @@ -3238,8 +3413,8 @@ GrB_Info GxB_Matrix_export_HyperCSC(GrB_Matrix *A, GrB_Type *type, GrB_Index *nr GrB_Info GxB_Matrix_export_HyperCSR(GrB_Matrix *A, GrB_Type *type, GrB_Index *nrows, GrB_Index *ncols, 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); GrB_Info GxB_Matrix_extractElement_FC32(GxB_FC32_t *x, const GrB_Matrix A, GrB_Index i, GrB_Index j); GrB_Info GxB_Matrix_extractElement_FC64(GxB_FC64_t *x, const GrB_Matrix A, GrB_Index i, GrB_Index j); -GrB_Info GxB_Matrix_extractTuples_FC32(GrB_Index *I, GrB_Index *J, GxB_FC32_t *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GxB_Matrix_extractTuples_FC64(GrB_Index *I, GrB_Index *J, GxB_FC64_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GxB_Matrix_extractTuples_FC32(GrB_Index *Ilist, GrB_Index *J, GxB_FC32_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GxB_Matrix_extractTuples_FC64(GrB_Index *Ilist, GrB_Index *J, GxB_FC64_t *X, GrB_Index *nvals, const GrB_Matrix A); GrB_Info GxB_Matrix_fprint(GrB_Matrix A, const char *name, GxB_Print_Level pr, FILE *f); GrB_Info GxB_Matrix_import_BitmapC(GrB_Matrix *A, GrB_Type type, GrB_Index nrows, GrB_Index ncols, int8_t **Ab, void **Ax, GrB_Index Ab_size, GrB_Index Ax_size, bool iso, GrB_Index nvals, const GrB_Descriptor desc); GrB_Info GxB_Matrix_import_BitmapR(GrB_Matrix *A, GrB_Type type, GrB_Index nrows, GrB_Index ncols, int8_t **Ab, void **Ax, GrB_Index Ab_size, GrB_Index Ax_size, bool iso, GrB_Index nvals, const GrB_Descriptor desc); @@ -3274,22 +3449,22 @@ GrB_Info GxB_Matrix_setElement_FC32(GrB_Matrix C, GxB_FC32_t x, GrB_Index i, GrB GrB_Info GxB_Matrix_setElement_FC64(GrB_Matrix C, GxB_FC64_t x, GrB_Index i, GrB_Index j); GrB_Info GxB_Matrix_sort(GrB_Matrix C, GrB_Matrix P, GrB_BinaryOp op, GrB_Matrix A, const GrB_Descriptor desc); GrB_Info GxB_Matrix_split(GrB_Matrix *Tiles, const GrB_Index m, const GrB_Index n, const GrB_Index *Tile_nrows, const GrB_Index *Tile_ncols, const GrB_Matrix A, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_Matrix A, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_BOOL(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, bool x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_FC32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, GxB_FC32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_FC64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, GxB_FC64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_FP32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, float x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_FP64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, double x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_INT8(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int8_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_INT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int16_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_INT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_INT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_Scalar(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, GrB_Scalar x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_UDT(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, void *x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_UINT8(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint8_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_UINT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint16_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_UINT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_UINT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_Matrix A, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_BOOL(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, bool x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_FC32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, GxB_FC32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_FC64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, GxB_FC64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_FP32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, float x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_FP64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, double x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_INT8(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int8_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_INT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int16_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_INT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_INT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_Scalar(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, GrB_Scalar x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_UDT(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, void *x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_UINT8(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint8_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_UINT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint16_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_UINT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_UINT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); GrB_Info GxB_Matrix_type(GrB_Type *type, const GrB_Matrix A); GrB_Info GxB_Matrix_type_name(char *type_name, const GrB_Matrix A); GrB_Info GxB_Matrix_unpack_BitmapC(GrB_Matrix A, int8_t **Ab, void **Ax, GrB_Index *Ab_size, GrB_Index *Ax_size, bool *iso, GrB_Index *nvals, const GrB_Descriptor desc); @@ -3313,7 +3488,7 @@ GrB_Info GxB_Monoid_identity(void *identity, GrB_Monoid monoid); GrB_Info GxB_Monoid_new_FC32(GrB_Monoid *monoid, GrB_BinaryOp op, GxB_FC32_t identity); GrB_Info GxB_Monoid_new_FC64(GrB_Monoid *monoid, GrB_BinaryOp op, GxB_FC64_t identity); GrB_Info GxB_Monoid_operator(GrB_BinaryOp *op, GrB_Monoid monoid); -GrB_Info GxB_Monoid_terminal(bool *has_terminal, void *terminal, GrB_Monoid monoid); +GrB_Info GxB_Monoid_terminal(bool *, void *terminal, GrB_Monoid monoid); GrB_Info GxB_Monoid_terminal_new_BOOL(GrB_Monoid *monoid, GrB_BinaryOp op, bool identity, bool terminal); GrB_Info GxB_Monoid_terminal_new_FC32(GrB_Monoid *monoid, GrB_BinaryOp op, GxB_FC32_t identity, GxB_FC32_t terminal); GrB_Info GxB_Monoid_terminal_new_FC64(GrB_Monoid *monoid, GrB_BinaryOp op, GxB_FC64_t identity, GxB_FC64_t terminal); @@ -3330,6 +3505,8 @@ GrB_Info GxB_Monoid_terminal_new_UINT32(GrB_Monoid *monoid, GrB_BinaryOp op, uin GrB_Info GxB_Monoid_terminal_new_UINT64(GrB_Monoid *monoid, GrB_BinaryOp op, uint64_t identity, uint64_t terminal); /* scalar */ +GrB_Info GxB_Context_get_Scalar(GxB_Context, GrB_Scalar, GrB_Field); +GrB_Info GxB_Context_set_Scalar(GxB_Context, GrB_Scalar, GrB_Field); GrB_Info GxB_Scalar_clear(GrB_Scalar s); GrB_Info GxB_Scalar_dup(GrB_Scalar *s, const GrB_Scalar t); GrB_Info GxB_Scalar_error(const char **error, const GrB_Scalar s); @@ -3369,6 +3546,7 @@ GrB_Info GxB_Scalar_setElement_UINT64(GrB_Scalar s, uint64_t x); GrB_Info GxB_Scalar_type(GrB_Type *type, const GrB_Scalar s); GrB_Info GxB_Scalar_type_name(char *type_name, const GrB_Scalar s); GrB_Info GxB_Scalar_wait(GrB_Scalar *s); +GrB_Info GxB_Serialized_get_Scalar(const void *, GrB_Scalar, GrB_Field, size_t); /* selectop */ GrB_Info GxB_SelectOp_fprint(GxB_SelectOp op, const char *name, GxB_Print_Level pr, FILE *f); @@ -3397,12 +3575,12 @@ GrB_Info GxB_UnaryOp_ztype_name(char *type_name, const GrB_UnaryOp unaryop); /* vector */ GrB_Info GxB_Vector_Iterator_attach(GxB_Iterator iterator, GrB_Vector v, GrB_Descriptor desc); -GrB_Info GxB_Vector_Option_get(GrB_Vector A, GxB_Option_Field field, ...); -GrB_Info GxB_Vector_Option_get_FP64(GrB_Vector v, GxB_Option_Field field, double *value); -GrB_Info GxB_Vector_Option_get_INT32(GrB_Vector v, GxB_Option_Field field, int32_t *value); -GrB_Info GxB_Vector_Option_set(GrB_Vector A, GxB_Option_Field field, ...); -GrB_Info GxB_Vector_Option_set_FP64(GrB_Vector v, GxB_Option_Field field, double value); -GrB_Info GxB_Vector_Option_set_INT32(GrB_Vector v, GxB_Option_Field field, int32_t value); +GrB_Info GxB_Vector_Option_get(GrB_Vector, GxB_Option_Field, ...); +GrB_Info GxB_Vector_Option_get_FP64(GrB_Vector, GxB_Option_Field, double *); +GrB_Info GxB_Vector_Option_get_INT32(GrB_Vector, GxB_Option_Field, int32_t *); +GrB_Info GxB_Vector_Option_set(GrB_Vector, GxB_Option_Field, ...); +GrB_Info GxB_Vector_Option_set_FP64(GrB_Vector, GxB_Option_Field, double); +GrB_Info GxB_Vector_Option_set_INT32(GrB_Vector, GxB_Option_Field, int32_t); GrB_Info GxB_Vector_apply_BinaryOp1st(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_BinaryOp op, const GrB_Scalar x, const GrB_Vector u, const GrB_Descriptor desc); GrB_Info GxB_Vector_apply_BinaryOp1st_FC32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_BinaryOp op, GxB_FC32_t x, const GrB_Vector u, const GrB_Descriptor desc); GrB_Info GxB_Vector_apply_BinaryOp1st_FC64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_BinaryOp op, GxB_FC64_t x, const GrB_Vector u, const GrB_Descriptor desc); @@ -3411,11 +3589,11 @@ GrB_Info GxB_Vector_apply_BinaryOp2nd_FC32(GrB_Vector w, const GrB_Vector mask, GrB_Info GxB_Vector_apply_BinaryOp2nd_FC64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_BinaryOp op, const GrB_Vector u, GxB_FC64_t y, const GrB_Descriptor desc); GrB_Info GxB_Vector_apply_IndexOp_FC32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_IndexUnaryOp op, const GrB_Vector u, GxB_FC32_t y, const GrB_Descriptor desc); GrB_Info GxB_Vector_apply_IndexOp_FC64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_IndexUnaryOp op, const GrB_Vector u, GxB_FC64_t y, const GrB_Descriptor desc); -GrB_Info GxB_Vector_assign_FC32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, GxB_FC32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_assign_FC64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, GxB_FC64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_build_FC32(GrB_Vector w, const GrB_Index *I, const GxB_FC32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GxB_Vector_build_FC64(GrB_Vector w, const GrB_Index *I, const GxB_FC64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GxB_Vector_build_Scalar(GrB_Vector w, const GrB_Index *I, GrB_Scalar scalar, GrB_Index nvals); +GrB_Info GxB_Vector_assign_FC32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, GxB_FC32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_assign_FC64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, GxB_FC64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_build_FC32(GrB_Vector w, const GrB_Index *Ilist, const GxB_FC32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GxB_Vector_build_FC64(GrB_Vector w, const GrB_Index *Ilist, const GxB_FC64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GxB_Vector_build_Scalar(GrB_Vector w, const GrB_Index *Ilist, GrB_Scalar scalar, GrB_Index nvals); GrB_Info GxB_Vector_deserialize(GrB_Vector *w, GrB_Type type, const void *blob, GrB_Index blob_size, const GrB_Descriptor desc); GrB_Info GxB_Vector_eWiseUnion(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_BinaryOp add, const GrB_Vector u, const GrB_Scalar alpha, const GrB_Vector v, const GrB_Scalar beta, const GrB_Descriptor desc); GrB_Info GxB_Vector_export_Bitmap(GrB_Vector *v, GrB_Type *type, GrB_Index *n, int8_t **vb, void **vx, GrB_Index *vb_size, GrB_Index *vx_size, bool *iso, GrB_Index *nvals, const GrB_Descriptor desc); @@ -3423,8 +3601,8 @@ GrB_Info GxB_Vector_export_CSC(GrB_Vector *v, GrB_Type *type, GrB_Index *n, GrB_ GrB_Info GxB_Vector_export_Full(GrB_Vector *v, GrB_Type *type, GrB_Index *n, void **vx, GrB_Index *vx_size, bool *iso, const GrB_Descriptor desc); GrB_Info GxB_Vector_extractElement_FC32(GxB_FC32_t *x, const GrB_Vector v, GrB_Index i); GrB_Info GxB_Vector_extractElement_FC64(GxB_FC64_t *x, const GrB_Vector v, GrB_Index i); -GrB_Info GxB_Vector_extractTuples_FC32(GrB_Index *I, GxB_FC32_t *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GxB_Vector_extractTuples_FC64(GrB_Index *I, GxB_FC64_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GxB_Vector_extractTuples_FC32(GrB_Index *Ilist, GxB_FC32_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GxB_Vector_extractTuples_FC64(GrB_Index *Ilist, GxB_FC64_t *X, GrB_Index *nvals, const GrB_Vector v); GrB_Info GxB_Vector_fprint(GrB_Vector v, const char *name, GxB_Print_Level pr, FILE *f); GrB_Info GxB_Vector_import_Bitmap(GrB_Vector *v, GrB_Type type, GrB_Index n, int8_t **vb, void **vx, GrB_Index vb_size, GrB_Index vx_size, bool iso, GrB_Index nvals, const GrB_Descriptor desc); GrB_Info GxB_Vector_import_CSC(GrB_Vector *v, GrB_Type type, GrB_Index n, GrB_Index **vi, void **vx, GrB_Index vi_size, GrB_Index vx_size, bool iso, GrB_Index nvals, bool jumbled, const GrB_Descriptor desc); @@ -3444,22 +3622,22 @@ GrB_Info GxB_Vector_serialize(void **blob_handle, GrB_Index *blob_size_handle, G GrB_Info GxB_Vector_setElement_FC32(GrB_Vector w, GxB_FC32_t x, GrB_Index i); GrB_Info GxB_Vector_setElement_FC64(GrB_Vector w, GxB_FC64_t x, GrB_Index i); GrB_Info GxB_Vector_sort(GrB_Vector w, GrB_Vector p, GrB_BinaryOp op, GrB_Vector u, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_BOOL(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, bool x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_FC32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, GxB_FC32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_FC64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, GxB_FC64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_FP32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, float x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_FP64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, double x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_INT8(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int8_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_INT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int16_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_INT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_INT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_Scalar(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, GrB_Scalar x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_UDT(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, void *x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_UINT8(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint8_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_UINT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint16_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_UINT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_UINT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_BOOL(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, bool x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_FC32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, GxB_FC32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_FC64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, GxB_FC64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_FP32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, float x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_FP64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, double x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_INT8(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int8_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_INT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int16_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_INT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_INT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_Scalar(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, GrB_Scalar x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_UDT(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, void *x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_UINT8(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint8_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_UINT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint16_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_UINT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_UINT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); GrB_Info GxB_Vector_type(GrB_Type *type, const GrB_Vector v); GrB_Info GxB_Vector_type_name(char *type_name, const GrB_Vector v); GrB_Info GxB_Vector_unpack_Bitmap(GrB_Vector v, int8_t **vb, void **vx, GrB_Index *vb_size, GrB_Index *vx_size, bool *iso, GrB_Index *nvals, const GrB_Descriptor desc); @@ -3485,6 +3663,7 @@ GrB_Info GxB_Vector_unpack_Full(GrB_Vector v, void **vx, GrB_Index *vx_size, boo #define GxB_FAST_IMPORT ... #define GxB_FULL ... #define GxB_GPU_ID ... +#define GxB_HAVE_COMPLEX_C99 ... #define GxB_HYPERSPARSE ... #define GxB_IMPLEMENTATION ... #define GxB_IMPLEMENTATION_MAJOR ... diff --git a/suitesparse_graphblas/suitesparse_graphblas_no_complex.h b/suitesparse_graphblas/suitesparse_graphblas_no_complex.h index 5c49c31..8728b2c 100644 --- a/suitesparse_graphblas/suitesparse_graphblas_no_complex.h +++ b/suitesparse_graphblas/suitesparse_graphblas_no_complex.h @@ -2,6 +2,7 @@ /* GrB typedefs */ typedef struct GB_BinaryOp_opaque *GrB_BinaryOp; typedef struct GB_Descriptor_opaque *GrB_Descriptor; +typedef struct GB_Global_opaque *GrB_Global; typedef struct GB_IndexUnaryOp_opaque *GrB_IndexUnaryOp; typedef struct GB_Matrix_opaque *GrB_Matrix; typedef struct GB_Monoid_opaque *GrB_Monoid; @@ -38,10 +39,12 @@ typedef enum typedef enum { + GrB_DEFAULT = 0, GxB_DEFAULT = 0, GrB_REPLACE = 1, GrB_COMP = 2, GrB_STRUCTURE = 4, + GrB_COMP_STRUCTURE = 6, GrB_TRAN = 3, GxB_AxB_GUSTAVSON = 7081, GxB_AxB_DOT = 7083, @@ -50,6 +53,39 @@ typedef enum GxB_SECURE_IMPORT = 7080 } GrB_Desc_Value; +typedef enum +{ + GrB_OUTP_FIELD = 0, + GrB_MASK_FIELD = 1, + GrB_INP0_FIELD = 2, + GrB_INP1_FIELD = 3, + GrB_NAME = 10, + GrB_LIBRARY_VER_MAJOR = 11, + GrB_LIBRARY_VER_MINOR = 12, + GrB_LIBRARY_VER_PATCH = 13, + GrB_API_VER_MAJOR = 14, + GrB_API_VER_MINOR = 15, + GrB_API_VER_PATCH = 16, + GrB_BLOCKING_MODE = 17, + GrB_STORAGE_ORIENTATION_HINT = 100, + GrB_EL_TYPE_CODE = 102, + GrB_EL_TYPE_STRING = 106, + GrB_INP0_TYPE_CODE = 103, + GrB_INP1_TYPE_CODE = 104, + GrB_OUTP_TYPE_CODE = 105, + GrB_INP0_TYPE_STRING = 107, + GrB_INP1_TYPE_STRING = 108, + GrB_OUTP_TYPE_STRING = 109, + GrB_SIZE = 110, + GxB_JIT_C_NAME = 7041, + GxB_JIT_C_DEFINITION = 7042, + GxB_MONOID_IDENTITY = 7043, + GxB_MONOID_TERMINAL = 7044, + GxB_MONOID_OPERATOR = 7045, + GxB_SEMIRING_MONOID = 7046, + GxB_SEMIRING_MULTIPLY = 7047 +} GrB_Field; + typedef enum { GrB_CSR_FORMAT = 0, @@ -70,6 +106,7 @@ typedef enum GrB_DIMENSION_MISMATCH = -6, GrB_OUTPUT_NOT_EMPTY = -7, GrB_NOT_IMPLEMENTED = -8, + GrB_ALREADY_SET = -9, GrB_PANIC = -101, GrB_OUT_OF_MEMORY = -102, GrB_INSUFFICIENT_SPACE = -103, @@ -86,6 +123,30 @@ typedef enum GxB_BLOCKING_GPU = 7098 } GrB_Mode; +typedef enum +{ + GrB_ROWMAJOR = 0, + GrB_COLMAJOR = 1, + GrB_BOTH = 2, + GrB_UNKNOWN = 3 +} GrB_Orientation; + +typedef enum +{ + GrB_UDT_CODE = 0, + GrB_BOOL_CODE = 1, + GrB_INT8_CODE = 2, + GrB_UINT8_CODE = 3, + GrB_INT16_CODE = 4, + GrB_UINT16_CODE = 5, + GrB_INT32_CODE = 6, + GrB_UINT32_CODE = 7, + GrB_INT64_CODE = 8, + GrB_UINT64_CODE = 9, + GrB_FP32_CODE = 10, + GrB_FP64_CODE = 11 +} GrB_Type_Code; + typedef enum { GrB_COMPLETE = 0, @@ -119,6 +180,7 @@ typedef enum typedef enum { GxB_HYPER_SWITCH = 7000, + GxB_HYPER_HASH = 7048, GxB_BITMAP_SWITCH = 7001, GxB_FORMAT = 7002, GxB_MODE = 7003, @@ -137,6 +199,10 @@ typedef enum GxB_COMPILER_VERSION = 7016, GxB_COMPILER_NAME = 7017, GxB_LIBRARY_OPENMP = 7018, + GxB_MALLOC_FUNCTION = 7037, + GxB_CALLOC_FUNCTION = 7038, + GxB_REALLOC_FUNCTION = 7039, + GxB_FREE_FUNCTION = 7040, GxB_GLOBAL_NTHREADS = 7086, GxB_GLOBAL_CHUNK = 7087, GxB_GLOBAL_GPU_ID = 7088, @@ -156,11 +222,7 @@ typedef enum GxB_JIT_USE_CMAKE = 7032, GxB_JIT_ERROR_LOG = 7033, GxB_SPARSITY_STATUS = 7034, - GxB_SPARSITY_CONTROL = 7036, - GxB_MALLOC_FUNCTION = 7037, - GxB_CALLOC_FUNCTION = 7038, - GxB_REALLOC_FUNCTION = 7039, - GxB_FREE_FUNCTION = 7040 + GxB_SPARSITY_CONTROL = 7036 } GxB_Option_Field; typedef enum @@ -174,6 +236,7 @@ typedef enum } GxB_Print_Level; /* GrB consts */ +extern const GrB_Global GrB_GLOBAL; extern const uint64_t *GrB_ALL; /* GxB consts */ @@ -2477,10 +2540,24 @@ extern GxB_SelectOp GxB_TRIU; /* binary */ GrB_Info GrB_BinaryOp_error(const char **error, const GrB_BinaryOp op); GrB_Info GrB_BinaryOp_free(GrB_BinaryOp *binaryop); +GrB_Info GrB_BinaryOp_get_INT32(GrB_BinaryOp, int32_t *, GrB_Field); +GrB_Info GrB_BinaryOp_get_SIZE(GrB_BinaryOp, size_t *, GrB_Field); +GrB_Info GrB_BinaryOp_get_String(GrB_BinaryOp, char *, GrB_Field); +GrB_Info GrB_BinaryOp_get_VOID(GrB_BinaryOp, void *, GrB_Field); GrB_Info GrB_BinaryOp_new(GrB_BinaryOp *binaryop, GxB_binary_function function, GrB_Type ztype, GrB_Type xtype, GrB_Type ytype); +GrB_Info GrB_BinaryOp_set_INT32(GrB_BinaryOp, int32_t, GrB_Field); +GrB_Info GrB_BinaryOp_set_String(GrB_BinaryOp, char *, GrB_Field); +GrB_Info GrB_BinaryOp_set_VOID(GrB_BinaryOp, void *, GrB_Field, size_t); GrB_Info GrB_BinaryOp_wait(GrB_BinaryOp op, GrB_WaitMode waitmode); /* core */ +GrB_Info GrB_Global_get_INT32(GrB_Global, int32_t *, GrB_Field); +GrB_Info GrB_Global_get_SIZE(GrB_Global, size_t *, GrB_Field); +GrB_Info GrB_Global_get_String(GrB_Global, char *, GrB_Field); +GrB_Info GrB_Global_get_VOID(GrB_Global, void *, GrB_Field); +GrB_Info GrB_Global_set_INT32(GrB_Global, int32_t, GrB_Field); +GrB_Info GrB_Global_set_String(GrB_Global, char *, GrB_Field); +GrB_Info GrB_Global_set_VOID(GrB_Global, void *, GrB_Field, size_t); GrB_Info GrB_finalize(void); GrB_Info GrB_getVersion(unsigned int *version, unsigned int *subversion); GrB_Info GrB_init(GrB_Mode mode); @@ -2488,19 +2565,33 @@ GrB_Info GrB_init(GrB_Mode mode); /* descriptor */ GrB_Info GrB_Descriptor_error(const char **error, const GrB_Descriptor d); GrB_Info GrB_Descriptor_free(GrB_Descriptor *descriptor); +GrB_Info GrB_Descriptor_get_INT32(GrB_Descriptor, int32_t *, GrB_Field); +GrB_Info GrB_Descriptor_get_SIZE(GrB_Descriptor, size_t *, GrB_Field); +GrB_Info GrB_Descriptor_get_String(GrB_Descriptor, char *, GrB_Field); +GrB_Info GrB_Descriptor_get_VOID(GrB_Descriptor, void *, GrB_Field); GrB_Info GrB_Descriptor_new(GrB_Descriptor *descriptor); -GrB_Info GrB_Descriptor_set(GrB_Descriptor desc, GrB_Desc_Field field, GrB_Desc_Value val); +GrB_Info GrB_Descriptor_set(GrB_Descriptor, GrB_Desc_Field, GrB_Desc_Value); +GrB_Info GrB_Descriptor_set_INT32(GrB_Descriptor, int32_t, GrB_Field); +GrB_Info GrB_Descriptor_set_String(GrB_Descriptor, char *, GrB_Field); +GrB_Info GrB_Descriptor_set_VOID(GrB_Descriptor, void *, GrB_Field, size_t); GrB_Info GrB_Descriptor_wait(GrB_Descriptor desc, GrB_WaitMode waitmode); /* indexunary */ GrB_Info GrB_IndexUnaryOp_error(const char **error, const GrB_IndexUnaryOp op); GrB_Info GrB_IndexUnaryOp_free(GrB_IndexUnaryOp *op); +GrB_Info GrB_IndexUnaryOp_get_INT32(GrB_IndexUnaryOp, int32_t *, GrB_Field); +GrB_Info GrB_IndexUnaryOp_get_SIZE(GrB_IndexUnaryOp, size_t *, GrB_Field); +GrB_Info GrB_IndexUnaryOp_get_String(GrB_IndexUnaryOp, char *, GrB_Field); +GrB_Info GrB_IndexUnaryOp_get_VOID(GrB_IndexUnaryOp, void *, GrB_Field); GrB_Info GrB_IndexUnaryOp_new(GrB_IndexUnaryOp *op, GxB_index_unary_function function, GrB_Type ztype, GrB_Type xtype, GrB_Type ytype); +GrB_Info GrB_IndexUnaryOp_set_INT32(GrB_IndexUnaryOp, int32_t, GrB_Field); +GrB_Info GrB_IndexUnaryOp_set_String(GrB_IndexUnaryOp, char *, GrB_Field); +GrB_Info GrB_IndexUnaryOp_set_VOID(GrB_IndexUnaryOp, void *, GrB_Field, size_t); GrB_Info GrB_IndexUnaryOp_wait(GrB_IndexUnaryOp op, GrB_WaitMode waitmode); /* matrix */ -GrB_Info GrB_Col_assign(GrB_Matrix C, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *I, GrB_Index ni, GrB_Index j, const GrB_Descriptor desc); -GrB_Info GrB_Col_extract(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Matrix A, const GrB_Index *I, GrB_Index ni, GrB_Index j, const GrB_Descriptor desc); +GrB_Info GrB_Col_assign(GrB_Matrix C, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *Ilist, GrB_Index ni, GrB_Index j, const GrB_Descriptor desc); +GrB_Info GrB_Col_extract(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Matrix A, const GrB_Index *Ilist, GrB_Index ni, GrB_Index j, const GrB_Descriptor desc); GrB_Info GrB_Matrix_apply(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_UnaryOp op, const GrB_Matrix A, const GrB_Descriptor desc); GrB_Info GrB_Matrix_apply_BinaryOp1st_BOOL(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_BinaryOp op, bool x, const GrB_Matrix A, const GrB_Descriptor desc); GrB_Info GrB_Matrix_apply_BinaryOp1st_FP32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_BinaryOp op, float x, const GrB_Matrix A, const GrB_Descriptor desc); @@ -2541,32 +2632,32 @@ GrB_Info GrB_Matrix_apply_IndexOp_UINT8(GrB_Matrix C, const GrB_Matrix Mask, con GrB_Info GrB_Matrix_apply_IndexOp_UINT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_IndexUnaryOp op, const GrB_Matrix A, uint16_t y, const GrB_Descriptor desc); GrB_Info GrB_Matrix_apply_IndexOp_UINT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_IndexUnaryOp op, const GrB_Matrix A, uint32_t y, const GrB_Descriptor desc); GrB_Info GrB_Matrix_apply_IndexOp_UINT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_IndexUnaryOp op, const GrB_Matrix A, uint64_t y, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_Matrix A, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_BOOL(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, bool x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_FP32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, float x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_FP64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, double x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_INT8(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int8_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_INT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int16_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_INT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_INT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_Scalar(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, GrB_Scalar x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_UDT(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, void *x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_UINT8(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint8_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_UINT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint16_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_UINT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_assign_UINT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GrB_Matrix_build_BOOL(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const bool *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_FP32(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const float *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_FP64(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const double *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_INT8(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const int8_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_INT16(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const int16_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_INT32(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const int32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_INT64(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const int64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_UDT(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const void *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_UINT8(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const uint8_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_UINT16(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const uint16_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_UINT32(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const uint32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Matrix_build_UINT64(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, const uint64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_assign(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_Matrix A, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_BOOL(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, bool x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_FP32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, float x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_FP64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, double x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_INT8(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int8_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_INT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int16_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_INT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_INT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_Scalar(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, GrB_Scalar x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_UDT(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, void *x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_UINT8(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint8_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_UINT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint16_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_UINT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_assign_UINT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_build_BOOL(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const bool *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_FP32(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const float *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_FP64(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const double *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_INT8(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const int8_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_INT16(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const int16_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_INT32(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const int32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_INT64(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const int64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_UDT(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const void *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_UINT8(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const uint8_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_UINT16(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const uint16_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_UINT32(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const uint32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Matrix_build_UINT64(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, const uint64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); GrB_Info GrB_Matrix_clear(GrB_Matrix A); GrB_Info GrB_Matrix_deserialize(GrB_Matrix *C, GrB_Type type, const void *blob, GrB_Index blob_size); GrB_Info GrB_Matrix_diag(GrB_Matrix *C, const GrB_Vector v, int64_t k); @@ -2592,7 +2683,7 @@ GrB_Info GrB_Matrix_export_UINT8(GrB_Index *Ap, GrB_Index *Ai, uint8_t *Ax, GrB_ GrB_Info GrB_Matrix_export_UINT16(GrB_Index *Ap, GrB_Index *Ai, uint16_t *Ax, GrB_Index *Ap_len, GrB_Index *Ai_len, GrB_Index *Ax_len, GrB_Format format, GrB_Matrix A); GrB_Info GrB_Matrix_export_UINT32(GrB_Index *Ap, GrB_Index *Ai, uint32_t *Ax, GrB_Index *Ap_len, GrB_Index *Ai_len, GrB_Index *Ax_len, GrB_Format format, GrB_Matrix A); GrB_Info GrB_Matrix_export_UINT64(GrB_Index *Ap, GrB_Index *Ai, uint64_t *Ax, GrB_Index *Ap_len, GrB_Index *Ai_len, GrB_Index *Ax_len, GrB_Format format, GrB_Matrix A); -GrB_Info GrB_Matrix_extract(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_Matrix A, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GrB_Matrix_extract(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_Matrix A, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); GrB_Info GrB_Matrix_extractElement_BOOL(bool *x, const GrB_Matrix A, GrB_Index i, GrB_Index j); GrB_Info GrB_Matrix_extractElement_FP32(float *x, const GrB_Matrix A, GrB_Index i, GrB_Index j); GrB_Info GrB_Matrix_extractElement_FP64(double *x, const GrB_Matrix A, GrB_Index i, GrB_Index j); @@ -2606,19 +2697,24 @@ GrB_Info GrB_Matrix_extractElement_UINT8(uint8_t *x, const GrB_Matrix A, GrB_Ind GrB_Info GrB_Matrix_extractElement_UINT16(uint16_t *x, const GrB_Matrix A, GrB_Index i, GrB_Index j); GrB_Info GrB_Matrix_extractElement_UINT32(uint32_t *x, const GrB_Matrix A, GrB_Index i, GrB_Index j); GrB_Info GrB_Matrix_extractElement_UINT64(uint64_t *x, const GrB_Matrix A, GrB_Index i, GrB_Index j); -GrB_Info GrB_Matrix_extractTuples_BOOL(GrB_Index *I, GrB_Index *J, bool *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_FP32(GrB_Index *I, GrB_Index *J, float *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_FP64(GrB_Index *I, GrB_Index *J, double *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_INT8(GrB_Index *I, GrB_Index *J, int8_t *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_INT16(GrB_Index *I, GrB_Index *J, int16_t *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_INT32(GrB_Index *I, GrB_Index *J, int32_t *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_INT64(GrB_Index *I, GrB_Index *J, int64_t *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_UDT(GrB_Index *I, GrB_Index *J, void *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_UINT8(GrB_Index *I, GrB_Index *J, uint8_t *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_UINT16(GrB_Index *I, GrB_Index *J, uint16_t *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_UINT32(GrB_Index *I, GrB_Index *J, uint32_t *X, GrB_Index *nvals, const GrB_Matrix A); -GrB_Info GrB_Matrix_extractTuples_UINT64(GrB_Index *I, GrB_Index *J, uint64_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_BOOL(GrB_Index *Ilist, GrB_Index *J, bool *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_FP32(GrB_Index *Ilist, GrB_Index *J, float *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_FP64(GrB_Index *Ilist, GrB_Index *J, double *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_INT8(GrB_Index *Ilist, GrB_Index *J, int8_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_INT16(GrB_Index *Ilist, GrB_Index *J, int16_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_INT32(GrB_Index *Ilist, GrB_Index *J, int32_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_INT64(GrB_Index *Ilist, GrB_Index *J, int64_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_UDT(GrB_Index *Ilist, GrB_Index *J, void *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_UINT8(GrB_Index *Ilist, GrB_Index *J, uint8_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_UINT16(GrB_Index *Ilist, GrB_Index *J, uint16_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_UINT32(GrB_Index *Ilist, GrB_Index *J, uint32_t *X, GrB_Index *nvals, const GrB_Matrix A); +GrB_Info GrB_Matrix_extractTuples_UINT64(GrB_Index *Ilist, GrB_Index *J, uint64_t *X, GrB_Index *nvals, const GrB_Matrix A); GrB_Info GrB_Matrix_free(GrB_Matrix *A); +GrB_Info GrB_Matrix_get_INT32(GrB_Matrix, int32_t *, GrB_Field); +GrB_Info GrB_Matrix_get_SIZE(GrB_Matrix, size_t *, GrB_Field); +GrB_Info GrB_Matrix_get_Scalar(GrB_Matrix, GrB_Scalar, GrB_Field); +GrB_Info GrB_Matrix_get_String(GrB_Matrix, char *, GrB_Field); +GrB_Info GrB_Matrix_get_VOID(GrB_Matrix, void *, GrB_Field); GrB_Info GrB_Matrix_import_BOOL(GrB_Matrix *A, GrB_Type type, GrB_Index nrows, GrB_Index ncols, const GrB_Index *Ap, const GrB_Index *Ai, const bool *Ax, GrB_Index Ap_len, GrB_Index Ai_len, GrB_Index Ax_len, GrB_Format format); GrB_Info GrB_Matrix_import_FP32(GrB_Matrix *A, GrB_Type type, GrB_Index nrows, GrB_Index ncols, const GrB_Index *Ap, const GrB_Index *Ai, const float *Ax, GrB_Index Ap_len, GrB_Index Ai_len, GrB_Index Ax_len, GrB_Format format); GrB_Info GrB_Matrix_import_FP64(GrB_Matrix *A, GrB_Type type, GrB_Index nrows, GrB_Index ncols, const GrB_Index *Ap, const GrB_Index *Ai, const double *Ax, GrB_Index Ap_len, GrB_Index Ai_len, GrB_Index Ax_len, GrB_Format format); @@ -2684,6 +2780,10 @@ GrB_Info GrB_Matrix_setElement_UINT8(GrB_Matrix C, uint8_t x, GrB_Index i, GrB_I GrB_Info GrB_Matrix_setElement_UINT16(GrB_Matrix C, uint16_t x, GrB_Index i, GrB_Index j); GrB_Info GrB_Matrix_setElement_UINT32(GrB_Matrix C, uint32_t x, GrB_Index i, GrB_Index j); GrB_Info GrB_Matrix_setElement_UINT64(GrB_Matrix C, uint64_t x, GrB_Index i, GrB_Index j); +GrB_Info GrB_Matrix_set_INT32(GrB_Matrix, int32_t, GrB_Field); +GrB_Info GrB_Matrix_set_Scalar(GrB_Matrix, GrB_Scalar, GrB_Field); +GrB_Info GrB_Matrix_set_String(GrB_Matrix, char *, GrB_Field); +GrB_Info GrB_Matrix_set_VOID(GrB_Matrix, void *, GrB_Field, size_t); GrB_Info GrB_Matrix_wait(GrB_Matrix A, GrB_WaitMode waitmode); GrB_Info GrB_Row_assign(GrB_Matrix C, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, GrB_Index i, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); GrB_Info GrB_mxm(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_Semiring semiring, const GrB_Matrix A, const GrB_Matrix B, const GrB_Descriptor desc); @@ -2694,6 +2794,10 @@ GrB_Info GrB_vxm(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, /* monoid */ GrB_Info GrB_Monoid_error(const char **error, const GrB_Monoid monoid); GrB_Info GrB_Monoid_free(GrB_Monoid *monoid); +GrB_Info GrB_Monoid_get_INT32(GrB_Monoid, int32_t *, GrB_Field); +GrB_Info GrB_Monoid_get_SIZE(GrB_Monoid, size_t *, GrB_Field); +GrB_Info GrB_Monoid_get_String(GrB_Monoid, char *, GrB_Field); +GrB_Info GrB_Monoid_get_VOID(GrB_Monoid, void *, GrB_Field); GrB_Info GrB_Monoid_new_BOOL(GrB_Monoid *monoid, GrB_BinaryOp op, bool identity); GrB_Info GrB_Monoid_new_FP32(GrB_Monoid *monoid, GrB_BinaryOp op, float identity); GrB_Info GrB_Monoid_new_FP64(GrB_Monoid *monoid, GrB_BinaryOp op, double identity); @@ -2706,9 +2810,22 @@ GrB_Info GrB_Monoid_new_UINT8(GrB_Monoid *monoid, GrB_BinaryOp op, uint8_t ident GrB_Info GrB_Monoid_new_UINT16(GrB_Monoid *monoid, GrB_BinaryOp op, uint16_t identity); GrB_Info GrB_Monoid_new_UINT32(GrB_Monoid *monoid, GrB_BinaryOp op, uint32_t identity); GrB_Info GrB_Monoid_new_UINT64(GrB_Monoid *monoid, GrB_BinaryOp op, uint64_t identity); +GrB_Info GrB_Monoid_set_INT32(GrB_Monoid, int32_t, GrB_Field); +GrB_Info GrB_Monoid_set_String(GrB_Monoid, char *, GrB_Field); +GrB_Info GrB_Monoid_set_VOID(GrB_Monoid, void *, GrB_Field, size_t); GrB_Info GrB_Monoid_wait(GrB_Monoid monoid, GrB_WaitMode waitmode); /* scalar */ +GrB_Info GrB_BinaryOp_get_Scalar(GrB_BinaryOp, GrB_Scalar, GrB_Field); +GrB_Info GrB_BinaryOp_set_Scalar(GrB_BinaryOp, GrB_Scalar, GrB_Field); +GrB_Info GrB_Descriptor_get_Scalar(GrB_Descriptor, GrB_Scalar, GrB_Field); +GrB_Info GrB_Descriptor_set_Scalar(GrB_Descriptor, GrB_Scalar, GrB_Field); +GrB_Info GrB_Global_get_Scalar(GrB_Global, GrB_Scalar, GrB_Field); +GrB_Info GrB_Global_set_Scalar(GrB_Global, GrB_Scalar, GrB_Field); +GrB_Info GrB_IndexUnaryOp_get_Scalar(GrB_IndexUnaryOp, GrB_Scalar, GrB_Field); +GrB_Info GrB_IndexUnaryOp_set_Scalar(GrB_IndexUnaryOp, GrB_Scalar, GrB_Field); +GrB_Info GrB_Monoid_get_Scalar(GrB_Monoid, GrB_Scalar, GrB_Field); +GrB_Info GrB_Monoid_set_Scalar(GrB_Monoid, GrB_Scalar, GrB_Field); GrB_Info GrB_Scalar_clear(GrB_Scalar s); GrB_Info GrB_Scalar_dup(GrB_Scalar *s, const GrB_Scalar t); GrB_Info GrB_Scalar_error(const char **error, const GrB_Scalar s); @@ -2725,6 +2842,11 @@ GrB_Info GrB_Scalar_extractElement_UINT16(uint16_t *x, const GrB_Scalar s); GrB_Info GrB_Scalar_extractElement_UINT32(uint32_t *x, const GrB_Scalar s); GrB_Info GrB_Scalar_extractElement_UINT64(uint64_t *x, const GrB_Scalar s); GrB_Info GrB_Scalar_free(GrB_Scalar *s); +GrB_Info GrB_Scalar_get_INT32(GrB_Scalar, int32_t *, GrB_Field); +GrB_Info GrB_Scalar_get_SIZE(GrB_Scalar, size_t *, GrB_Field); +GrB_Info GrB_Scalar_get_Scalar(GrB_Scalar, GrB_Scalar, GrB_Field); +GrB_Info GrB_Scalar_get_String(GrB_Scalar, char *, GrB_Field); +GrB_Info GrB_Scalar_get_VOID(GrB_Scalar, void *, GrB_Field); GrB_Info GrB_Scalar_new(GrB_Scalar *s, GrB_Type type); GrB_Info GrB_Scalar_nvals(GrB_Index *nvals, const GrB_Scalar s); GrB_Info GrB_Scalar_setElement_BOOL(GrB_Scalar s, bool x); @@ -2739,24 +2861,55 @@ GrB_Info GrB_Scalar_setElement_UINT8(GrB_Scalar s, uint8_t x); GrB_Info GrB_Scalar_setElement_UINT16(GrB_Scalar s, uint16_t x); GrB_Info GrB_Scalar_setElement_UINT32(GrB_Scalar s, uint32_t x); GrB_Info GrB_Scalar_setElement_UINT64(GrB_Scalar s, uint64_t x); +GrB_Info GrB_Scalar_set_INT32(GrB_Scalar, int32_t, GrB_Field); +GrB_Info GrB_Scalar_set_Scalar(GrB_Scalar, GrB_Scalar, GrB_Field); +GrB_Info GrB_Scalar_set_String(GrB_Scalar, char *, GrB_Field); +GrB_Info GrB_Scalar_set_VOID(GrB_Scalar, void *, GrB_Field, size_t); GrB_Info GrB_Scalar_wait(GrB_Scalar s, GrB_WaitMode waitmode); +GrB_Info GrB_Semiring_get_Scalar(GrB_Semiring, GrB_Scalar, GrB_Field); +GrB_Info GrB_Semiring_set_Scalar(GrB_Semiring, GrB_Scalar, GrB_Field); +GrB_Info GrB_Type_get_Scalar(GrB_Type, GrB_Scalar, GrB_Field); +GrB_Info GrB_Type_set_Scalar(GrB_Type, GrB_Scalar, GrB_Field); +GrB_Info GrB_UnaryOp_get_Scalar(GrB_UnaryOp, GrB_Scalar, GrB_Field); +GrB_Info GrB_UnaryOp_set_Scalar(GrB_UnaryOp, GrB_Scalar, GrB_Field); /* semiring */ GrB_Info GrB_Semiring_error(const char **error, const GrB_Semiring semiring); GrB_Info GrB_Semiring_free(GrB_Semiring *semiring); +GrB_Info GrB_Semiring_get_INT32(GrB_Semiring, int32_t *, GrB_Field); +GrB_Info GrB_Semiring_get_SIZE(GrB_Semiring, size_t *, GrB_Field); +GrB_Info GrB_Semiring_get_String(GrB_Semiring, char *, GrB_Field); +GrB_Info GrB_Semiring_get_VOID(GrB_Semiring, void *, GrB_Field); GrB_Info GrB_Semiring_new(GrB_Semiring *semiring, GrB_Monoid add, GrB_BinaryOp multiply); +GrB_Info GrB_Semiring_set_INT32(GrB_Semiring, int32_t, GrB_Field); +GrB_Info GrB_Semiring_set_String(GrB_Semiring, char *, GrB_Field); +GrB_Info GrB_Semiring_set_VOID(GrB_Semiring, void *, GrB_Field, size_t); GrB_Info GrB_Semiring_wait(GrB_Semiring semiring, GrB_WaitMode waitmode); /* type */ GrB_Info GrB_Type_error(const char **error, const GrB_Type type); GrB_Info GrB_Type_free(GrB_Type *type); +GrB_Info GrB_Type_get_INT32(GrB_Type, int32_t *, GrB_Field); +GrB_Info GrB_Type_get_SIZE(GrB_Type, size_t *, GrB_Field); +GrB_Info GrB_Type_get_String(GrB_Type, char *, GrB_Field); +GrB_Info GrB_Type_get_VOID(GrB_Type, void *, GrB_Field); GrB_Info GrB_Type_new(GrB_Type *type, size_t sizeof_ctype); +GrB_Info GrB_Type_set_INT32(GrB_Type, int32_t, GrB_Field); +GrB_Info GrB_Type_set_String(GrB_Type, char *, GrB_Field); +GrB_Info GrB_Type_set_VOID(GrB_Type, void *, GrB_Field, size_t); GrB_Info GrB_Type_wait(GrB_Type type, GrB_WaitMode waitmode); /* unary */ GrB_Info GrB_UnaryOp_error(const char **error, const GrB_UnaryOp op); GrB_Info GrB_UnaryOp_free(GrB_UnaryOp *unaryop); +GrB_Info GrB_UnaryOp_get_INT32(GrB_UnaryOp, int32_t *, GrB_Field); +GrB_Info GrB_UnaryOp_get_SIZE(GrB_UnaryOp, size_t *, GrB_Field); +GrB_Info GrB_UnaryOp_get_String(GrB_UnaryOp, char *, GrB_Field); +GrB_Info GrB_UnaryOp_get_VOID(GrB_UnaryOp, void *, GrB_Field); GrB_Info GrB_UnaryOp_new(GrB_UnaryOp *unaryop, GxB_unary_function function, GrB_Type ztype, GrB_Type xtype); +GrB_Info GrB_UnaryOp_set_INT32(GrB_UnaryOp, int32_t, GrB_Field); +GrB_Info GrB_UnaryOp_set_String(GrB_UnaryOp, char *, GrB_Field); +GrB_Info GrB_UnaryOp_set_VOID(GrB_UnaryOp, void *, GrB_Field, size_t); GrB_Info GrB_UnaryOp_wait(GrB_UnaryOp op, GrB_WaitMode waitmode); /* vector */ @@ -2800,32 +2953,32 @@ GrB_Info GrB_Vector_apply_IndexOp_UINT8(GrB_Vector w, const GrB_Vector mask, con GrB_Info GrB_Vector_apply_IndexOp_UINT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_IndexUnaryOp op, const GrB_Vector u, uint16_t y, const GrB_Descriptor desc); GrB_Info GrB_Vector_apply_IndexOp_UINT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_IndexUnaryOp op, const GrB_Vector u, uint32_t y, const GrB_Descriptor desc); GrB_Info GrB_Vector_apply_IndexOp_UINT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_IndexUnaryOp op, const GrB_Vector u, uint64_t y, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_BOOL(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, bool x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_FP32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, float x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_FP64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, double x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_INT8(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int8_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_INT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int16_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_INT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_INT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_Scalar(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, GrB_Scalar x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_UDT(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, void *x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_UINT8(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint8_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_UINT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint16_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_UINT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_assign_UINT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GrB_Vector_build_BOOL(GrB_Vector w, const GrB_Index *I, const bool *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_FP32(GrB_Vector w, const GrB_Index *I, const float *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_FP64(GrB_Vector w, const GrB_Index *I, const double *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_INT8(GrB_Vector w, const GrB_Index *I, const int8_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_INT16(GrB_Vector w, const GrB_Index *I, const int16_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_INT32(GrB_Vector w, const GrB_Index *I, const int32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_INT64(GrB_Vector w, const GrB_Index *I, const int64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_UDT(GrB_Vector w, const GrB_Index *I, const void *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_UINT8(GrB_Vector w, const GrB_Index *I, const uint8_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_UINT16(GrB_Vector w, const GrB_Index *I, const uint16_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_UINT32(GrB_Vector w, const GrB_Index *I, const uint32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); -GrB_Info GrB_Vector_build_UINT64(GrB_Vector w, const GrB_Index *I, const uint64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_assign(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_BOOL(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, bool x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_FP32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, float x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_FP64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, double x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_INT8(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int8_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_INT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int16_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_INT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_INT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_Scalar(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, GrB_Scalar x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_UDT(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, void *x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_UINT8(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint8_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_UINT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint16_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_UINT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_assign_UINT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_build_BOOL(GrB_Vector w, const GrB_Index *Ilist, const bool *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_FP32(GrB_Vector w, const GrB_Index *Ilist, const float *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_FP64(GrB_Vector w, const GrB_Index *Ilist, const double *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_INT8(GrB_Vector w, const GrB_Index *Ilist, const int8_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_INT16(GrB_Vector w, const GrB_Index *Ilist, const int16_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_INT32(GrB_Vector w, const GrB_Index *Ilist, const int32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_INT64(GrB_Vector w, const GrB_Index *Ilist, const int64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_UDT(GrB_Vector w, const GrB_Index *Ilist, const void *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_UINT8(GrB_Vector w, const GrB_Index *Ilist, const uint8_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_UINT16(GrB_Vector w, const GrB_Index *Ilist, const uint16_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_UINT32(GrB_Vector w, const GrB_Index *Ilist, const uint32_t *X, GrB_Index nvals, const GrB_BinaryOp dup); +GrB_Info GrB_Vector_build_UINT64(GrB_Vector w, const GrB_Index *Ilist, const uint64_t *X, GrB_Index nvals, const GrB_BinaryOp dup); GrB_Info GrB_Vector_clear(GrB_Vector v); GrB_Info GrB_Vector_dup(GrB_Vector *w, const GrB_Vector u); GrB_Info GrB_Vector_eWiseAdd_BinaryOp(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_BinaryOp add, const GrB_Vector u, const GrB_Vector v, const GrB_Descriptor desc); @@ -2835,7 +2988,7 @@ GrB_Info GrB_Vector_eWiseMult_BinaryOp(GrB_Vector w, const GrB_Vector mask, cons GrB_Info GrB_Vector_eWiseMult_Monoid(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Monoid monoid, const GrB_Vector u, const GrB_Vector v, const GrB_Descriptor desc); GrB_Info GrB_Vector_eWiseMult_Semiring(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Semiring semiring, const GrB_Vector u, const GrB_Vector v, const GrB_Descriptor desc); GrB_Info GrB_Vector_error(const char **error, const GrB_Vector v); -GrB_Info GrB_Vector_extract(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GrB_Vector_extract(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); GrB_Info GrB_Vector_extractElement_BOOL(bool *x, const GrB_Vector v, GrB_Index i); GrB_Info GrB_Vector_extractElement_FP32(float *x, const GrB_Vector v, GrB_Index i); GrB_Info GrB_Vector_extractElement_FP64(double *x, const GrB_Vector v, GrB_Index i); @@ -2849,19 +3002,24 @@ GrB_Info GrB_Vector_extractElement_UINT8(uint8_t *x, const GrB_Vector v, GrB_Ind GrB_Info GrB_Vector_extractElement_UINT16(uint16_t *x, const GrB_Vector v, GrB_Index i); GrB_Info GrB_Vector_extractElement_UINT32(uint32_t *x, const GrB_Vector v, GrB_Index i); GrB_Info GrB_Vector_extractElement_UINT64(uint64_t *x, const GrB_Vector v, GrB_Index i); -GrB_Info GrB_Vector_extractTuples_BOOL(GrB_Index *I, bool *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_FP32(GrB_Index *I, float *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_FP64(GrB_Index *I, double *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_INT8(GrB_Index *I, int8_t *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_INT16(GrB_Index *I, int16_t *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_INT32(GrB_Index *I, int32_t *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_INT64(GrB_Index *I, int64_t *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_UDT(GrB_Index *I, void *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_UINT8(GrB_Index *I, uint8_t *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_UINT16(GrB_Index *I, uint16_t *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_UINT32(GrB_Index *I, uint32_t *X, GrB_Index *nvals, const GrB_Vector v); -GrB_Info GrB_Vector_extractTuples_UINT64(GrB_Index *I, uint64_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_BOOL(GrB_Index *Ilist, bool *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_FP32(GrB_Index *Ilist, float *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_FP64(GrB_Index *Ilist, double *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_INT8(GrB_Index *Ilist, int8_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_INT16(GrB_Index *Ilist, int16_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_INT32(GrB_Index *Ilist, int32_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_INT64(GrB_Index *Ilist, int64_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_UDT(GrB_Index *Ilist, void *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_UINT8(GrB_Index *Ilist, uint8_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_UINT16(GrB_Index *Ilist, uint16_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_UINT32(GrB_Index *Ilist, uint32_t *X, GrB_Index *nvals, const GrB_Vector v); +GrB_Info GrB_Vector_extractTuples_UINT64(GrB_Index *Ilist, uint64_t *X, GrB_Index *nvals, const GrB_Vector v); GrB_Info GrB_Vector_free(GrB_Vector *v); +GrB_Info GrB_Vector_get_INT32(GrB_Vector, int32_t *, GrB_Field); +GrB_Info GrB_Vector_get_SIZE(GrB_Vector, size_t *, GrB_Field); +GrB_Info GrB_Vector_get_Scalar(GrB_Vector, GrB_Scalar, GrB_Field); +GrB_Info GrB_Vector_get_String(GrB_Vector, char *, GrB_Field); +GrB_Info GrB_Vector_get_VOID(GrB_Vector, void *, GrB_Field); GrB_Info GrB_Vector_new(GrB_Vector *v, GrB_Type type, GrB_Index n); GrB_Info GrB_Vector_nvals(GrB_Index *nvals, const GrB_Vector v); GrB_Info GrB_Vector_reduce_BOOL(bool *c, const GrB_BinaryOp accum, const GrB_Monoid monoid, const GrB_Vector u, const GrB_Descriptor desc); @@ -2906,6 +3064,10 @@ GrB_Info GrB_Vector_setElement_UINT8(GrB_Vector w, uint8_t x, GrB_Index i); GrB_Info GrB_Vector_setElement_UINT16(GrB_Vector w, uint16_t x, GrB_Index i); GrB_Info GrB_Vector_setElement_UINT32(GrB_Vector w, uint32_t x, GrB_Index i); GrB_Info GrB_Vector_setElement_UINT64(GrB_Vector w, uint64_t x, GrB_Index i); +GrB_Info GrB_Vector_set_INT32(GrB_Vector, int32_t, GrB_Field); +GrB_Info GrB_Vector_set_Scalar(GrB_Vector, GrB_Scalar, GrB_Field); +GrB_Info GrB_Vector_set_String(GrB_Vector, char *, GrB_Field); +GrB_Info GrB_Vector_set_VOID(GrB_Vector, void *, GrB_Field, size_t); GrB_Info GrB_Vector_size(GrB_Index *n, const GrB_Vector v); GrB_Info GrB_Vector_wait(GrB_Vector v, GrB_WaitMode waitmode); @@ -2928,12 +3090,12 @@ GrB_Info GB_Iterator_attach(GxB_Iterator iterator, GrB_Matrix A, GxB_Format_Valu /* binary */ GrB_Info GxB_BinaryOp_fprint(GrB_BinaryOp binaryop, const char *name, GxB_Print_Level pr, FILE *f); GrB_Info GxB_BinaryOp_new(GrB_BinaryOp *op, GxB_binary_function function, GrB_Type ztype, GrB_Type xtype, GrB_Type ytype, const char *binop_name, const char *binop_defn); -GrB_Info GxB_BinaryOp_xtype(GrB_Type *xtype, GrB_BinaryOp binaryop); -GrB_Info GxB_BinaryOp_xtype_name(char *type_name, const GrB_BinaryOp binaryop); -GrB_Info GxB_BinaryOp_ytype(GrB_Type *ytype, GrB_BinaryOp binaryop); -GrB_Info GxB_BinaryOp_ytype_name(char *type_name, const GrB_BinaryOp binaryop); -GrB_Info GxB_BinaryOp_ztype(GrB_Type *ztype, GrB_BinaryOp binaryop); -GrB_Info GxB_BinaryOp_ztype_name(char *type_name, const GrB_BinaryOp binaryop); +GrB_Info GxB_BinaryOp_xtype(GrB_Type *xtype, GrB_BinaryOp op); +GrB_Info GxB_BinaryOp_xtype_name(char *type_name, const GrB_BinaryOp op); +GrB_Info GxB_BinaryOp_ytype(GrB_Type *ytype, GrB_BinaryOp op); +GrB_Info GxB_BinaryOp_ytype_name(char *type_name, const GrB_BinaryOp op); +GrB_Info GxB_BinaryOp_ztype(GrB_Type *ztype, GrB_BinaryOp op); +GrB_Info GxB_BinaryOp_ztype_name(char *type_name, const GrB_BinaryOp op); /* context */ GrB_Info GxB_Context_disengage(GxB_Context Context); @@ -2941,48 +3103,59 @@ GrB_Info GxB_Context_engage(GxB_Context Context); GrB_Info GxB_Context_error(const char **error, const GxB_Context Context); GrB_Info GxB_Context_fprint(GxB_Context Context, const char *name, GxB_Print_Level pr, FILE *f); GrB_Info GxB_Context_free(GxB_Context *Context); -GrB_Info GxB_Context_get(GxB_Context Context, GxB_Context_Field field, ...); -GrB_Info GxB_Context_get_FP64(GxB_Context Context, GxB_Context_Field field, double *value); -GrB_Info GxB_Context_get_INT32(GxB_Context Context, GxB_Context_Field field, int32_t *value); +GrB_Info GxB_Context_get(GxB_Context, GxB_Context_Field, ...); +GrB_Info GxB_Context_get_FP64(GxB_Context, GxB_Context_Field, double *); +GrB_Info GxB_Context_get_INT(GxB_Context, int32_t *, GrB_Field); +GrB_Info GxB_Context_get_INT32(GxB_Context, GxB_Context_Field, int32_t *); +GrB_Info GxB_Context_get_SIZE(GxB_Context, size_t *, GrB_Field); +GrB_Info GxB_Context_get_String(GxB_Context, char *, GrB_Field); +GrB_Info GxB_Context_get_VOID(GxB_Context, void *, GrB_Field); GrB_Info GxB_Context_new(GxB_Context *Context); -GrB_Info GxB_Context_set(GxB_Context Context, GxB_Context_Field field, ...); -GrB_Info GxB_Context_set_FP64(GxB_Context Context, GxB_Context_Field field, double value); -GrB_Info GxB_Context_set_INT32(GxB_Context Context, GxB_Context_Field field, int32_t value); +GrB_Info GxB_Context_set(GxB_Context, GxB_Context_Field, ...); +GrB_Info GxB_Context_set_FP64(GxB_Context, GxB_Context_Field, double); +GrB_Info GxB_Context_set_INT(GxB_Context, int32_t, GrB_Field); +GrB_Info GxB_Context_set_INT32(GxB_Context, GxB_Context_Field, int32_t); +GrB_Info GxB_Context_set_String(GxB_Context, char *, GrB_Field); +GrB_Info GxB_Context_set_VOID(GxB_Context, void *, GrB_Field, size_t); GrB_Info GxB_Context_wait(GxB_Context Context, GrB_WaitMode waitmode); /* core */ -GrB_Info GxB_Global_Option_get(GxB_Option_Field field, ...); -GrB_Info GxB_Global_Option_get_CHAR(GxB_Option_Field field, const char **value); -GrB_Info GxB_Global_Option_get_FP64(GxB_Option_Field field, double *value); -GrB_Info GxB_Global_Option_get_FUNCTION(GxB_Option_Field field, void **value); -GrB_Info GxB_Global_Option_get_INT32(GxB_Option_Field field, int32_t *value); -GrB_Info GxB_Global_Option_get_INT64(GxB_Option_Field field, int64_t *value); -GrB_Info GxB_Global_Option_set(GxB_Option_Field field, ...); -GrB_Info GxB_Global_Option_set_CHAR(GxB_Option_Field field, const char *value); -GrB_Info GxB_Global_Option_set_FP64(GxB_Option_Field field, double value); -GrB_Info GxB_Global_Option_set_FP64_ARRAY(GxB_Option_Field field, double *value); -GrB_Info GxB_Global_Option_set_FUNCTION(GxB_Option_Field field, void *value); -GrB_Info GxB_Global_Option_set_INT32(GxB_Option_Field field, int32_t value); -GrB_Info GxB_Global_Option_set_INT64_ARRAY(GxB_Option_Field field, int64_t *value); -GrB_Info GxB_deserialize_type_name(char *type_name, const void *blob, GrB_Index blob_size); +GrB_Info GxB_Global_Option_get(GxB_Option_Field, ...); +GrB_Info GxB_Global_Option_get_CHAR(GxB_Option_Field, const char **); +GrB_Info GxB_Global_Option_get_FP64(GxB_Option_Field, double *); +GrB_Info GxB_Global_Option_get_FUNCTION(GxB_Option_Field, void **); +GrB_Info GxB_Global_Option_get_INT32(GxB_Option_Field, int32_t *); +GrB_Info GxB_Global_Option_get_INT64(GxB_Option_Field, int64_t *); +GrB_Info GxB_Global_Option_set(GxB_Option_Field, ...); +GrB_Info GxB_Global_Option_set_CHAR(GxB_Option_Field, const char *); +GrB_Info GxB_Global_Option_set_FP64(GxB_Option_Field, double); +GrB_Info GxB_Global_Option_set_FP64_ARRAY(GxB_Option_Field, double *); +GrB_Info GxB_Global_Option_set_FUNCTION(GxB_Option_Field, void *); +GrB_Info GxB_Global_Option_set_INT32(GxB_Option_Field, int32_t); +GrB_Info GxB_Global_Option_set_INT64_ARRAY(GxB_Option_Field, int64_t *); +GrB_Info GxB_Serialized_get_INT32(const void *, int32_t *, GrB_Field, size_t); +GrB_Info GxB_Serialized_get_SIZE(const void *, size_t *, GrB_Field, size_t); +GrB_Info GxB_Serialized_get_String(const void *, char *, GrB_Field, size_t); +GrB_Info GxB_Serialized_get_VOID(const void *, void *, GrB_Field, size_t); +GrB_Info GxB_deserialize_type_name(char *, const void *, GrB_Index); GrB_Info GxB_init(GrB_Mode mode, void *(*user_malloc_function)(size_t), void *(*user_calloc_function)(size_t, size_t), void *(*user_realloc_function)(void *, size_t), void (*user_free_function)(void *)); /* descriptor */ -GrB_Info GxB_Desc_get(GrB_Descriptor desc, GrB_Desc_Field field, ...); -GrB_Info GxB_Desc_get_FP64(GrB_Descriptor desc, GrB_Desc_Field field, double *value); -GrB_Info GxB_Desc_get_INT32(GrB_Descriptor desc, GrB_Desc_Field field, int32_t *value); -GrB_Info GxB_Desc_set(GrB_Descriptor desc, GrB_Desc_Field field, ...); -GrB_Info GxB_Desc_set_FP64(GrB_Descriptor desc, GrB_Desc_Field field, double value); -GrB_Info GxB_Desc_set_INT32(GrB_Descriptor desc, GrB_Desc_Field field, int32_t value); +GrB_Info GxB_Desc_get(GrB_Descriptor, GrB_Desc_Field, ...); +GrB_Info GxB_Desc_get_FP64(GrB_Descriptor, GrB_Desc_Field, double *); +GrB_Info GxB_Desc_get_INT32(GrB_Descriptor, GrB_Desc_Field, int32_t *); +GrB_Info GxB_Desc_set(GrB_Descriptor, GrB_Desc_Field, ...); +GrB_Info GxB_Desc_set_FP64(GrB_Descriptor, GrB_Desc_Field, double); +GrB_Info GxB_Desc_set_INT32(GrB_Descriptor, GrB_Desc_Field, int32_t); GrB_Info GxB_Descriptor_fprint(GrB_Descriptor descriptor, const char *name, GxB_Print_Level pr, FILE *f); -GrB_Info GxB_Descriptor_get(GrB_Desc_Value *val, GrB_Descriptor desc, GrB_Desc_Field field); +GrB_Info GxB_Descriptor_get(GrB_Desc_Value *, GrB_Descriptor, GrB_Desc_Field); /* indexunary */ GrB_Info GxB_IndexUnaryOp_fprint(GrB_IndexUnaryOp op, const char *name, GxB_Print_Level pr, FILE *f); GrB_Info GxB_IndexUnaryOp_new(GrB_IndexUnaryOp *op, GxB_index_unary_function function, GrB_Type ztype, GrB_Type xtype, GrB_Type ytype, const char *idxop_name, const char *idxop_defn); -GrB_Info GxB_IndexUnaryOp_xtype_name(char *type_name, const GrB_IndexUnaryOp op); -GrB_Info GxB_IndexUnaryOp_ytype_name(char *type_name, const GrB_IndexUnaryOp op); -GrB_Info GxB_IndexUnaryOp_ztype_name(char *type_name, const GrB_IndexUnaryOp op); +GrB_Info GxB_IndexUnaryOp_xtype_name(char *, const GrB_IndexUnaryOp op); +GrB_Info GxB_IndexUnaryOp_ytype_name(char *, const GrB_IndexUnaryOp op); +GrB_Info GxB_IndexUnaryOp_ztype_name(char *, const GrB_IndexUnaryOp op); /* iterator */ GrB_Index GxB_Matrix_Iterator_getp(GxB_Iterator iterator); @@ -3025,17 +3198,17 @@ void GxB_Iterator_get_UDT(GxB_Iterator iterator, void *value); void GxB_Matrix_Iterator_getIndex(GxB_Iterator iterator, GrB_Index *row, GrB_Index *col); /* matrix */ -GrB_Info GxB_Col_subassign(GrB_Matrix C, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *I, GrB_Index ni, GrB_Index j, const GrB_Descriptor desc); +GrB_Info GxB_Col_subassign(GrB_Matrix C, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *Ilist, GrB_Index ni, GrB_Index j, const GrB_Descriptor desc); GrB_Info GxB_Matrix_Iterator_attach(GxB_Iterator iterator, GrB_Matrix A, GrB_Descriptor desc); -GrB_Info GxB_Matrix_Option_get(GrB_Matrix A, GxB_Option_Field field, ...); -GrB_Info GxB_Matrix_Option_get_FP64(GrB_Matrix A, GxB_Option_Field field, double *value); -GrB_Info GxB_Matrix_Option_get_INT32(GrB_Matrix A, GxB_Option_Field field, int32_t *value); -GrB_Info GxB_Matrix_Option_set(GrB_Matrix A, GxB_Option_Field field, ...); -GrB_Info GxB_Matrix_Option_set_FP64(GrB_Matrix A, GxB_Option_Field field, double value); -GrB_Info GxB_Matrix_Option_set_INT32(GrB_Matrix A, GxB_Option_Field field, int32_t value); +GrB_Info GxB_Matrix_Option_get(GrB_Matrix, GxB_Option_Field, ...); +GrB_Info GxB_Matrix_Option_get_FP64(GrB_Matrix, GxB_Option_Field, double *); +GrB_Info GxB_Matrix_Option_get_INT32(GrB_Matrix, GxB_Option_Field, int32_t *); +GrB_Info GxB_Matrix_Option_set(GrB_Matrix, GxB_Option_Field, ...); +GrB_Info GxB_Matrix_Option_set_FP64(GrB_Matrix, GxB_Option_Field, double); +GrB_Info GxB_Matrix_Option_set_INT32(GrB_Matrix, GxB_Option_Field, int32_t); GrB_Info GxB_Matrix_apply_BinaryOp1st(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_BinaryOp op, const GrB_Scalar x, const GrB_Matrix A, const GrB_Descriptor desc); GrB_Info GxB_Matrix_apply_BinaryOp2nd(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_BinaryOp op, const GrB_Matrix A, const GrB_Scalar y, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_build_Scalar(GrB_Matrix C, const GrB_Index *I, const GrB_Index *J, GrB_Scalar scalar, GrB_Index nvals); +GrB_Info GxB_Matrix_build_Scalar(GrB_Matrix C, const GrB_Index *Ilist, const GrB_Index *J, GrB_Scalar scalar, GrB_Index nvals); GrB_Info GxB_Matrix_concat(GrB_Matrix C, const GrB_Matrix *Tiles, const GrB_Index m, const GrB_Index n, const GrB_Descriptor desc); GrB_Info GxB_Matrix_deserialize(GrB_Matrix *C, GrB_Type type, const void *blob, GrB_Index blob_size, const GrB_Descriptor desc); GrB_Info GxB_Matrix_diag(GrB_Matrix C, const GrB_Vector v, int64_t k, const GrB_Descriptor desc); @@ -3074,20 +3247,20 @@ GrB_Info GxB_Matrix_select(GrB_Matrix C, const GrB_Matrix Mask, const GrB_Binary GrB_Info GxB_Matrix_serialize(void **blob_handle, GrB_Index *blob_size_handle, GrB_Matrix A, const GrB_Descriptor desc); GrB_Info GxB_Matrix_sort(GrB_Matrix C, GrB_Matrix P, GrB_BinaryOp op, GrB_Matrix A, const GrB_Descriptor desc); GrB_Info GxB_Matrix_split(GrB_Matrix *Tiles, const GrB_Index m, const GrB_Index n, const GrB_Index *Tile_nrows, const GrB_Index *Tile_ncols, const GrB_Matrix A, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_Matrix A, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_BOOL(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, bool x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_FP32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, float x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_FP64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, double x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_INT8(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int8_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_INT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int16_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_INT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_INT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_Scalar(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, GrB_Scalar x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_UDT(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, void *x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_UINT8(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint8_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_UINT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint16_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_UINT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); -GrB_Info GxB_Matrix_subassign_UINT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, const GrB_Matrix A, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_BOOL(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, bool x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_FP32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, float x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_FP64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, double x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_INT8(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int8_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_INT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int16_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_INT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_INT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, int64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_Scalar(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, GrB_Scalar x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_UDT(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, void *x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_UINT8(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint8_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_UINT16(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint16_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_UINT32(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); +GrB_Info GxB_Matrix_subassign_UINT64(GrB_Matrix C, const GrB_Matrix Mask, const GrB_BinaryOp accum, uint64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Index *J, GrB_Index nj, const GrB_Descriptor desc); GrB_Info GxB_Matrix_type(GrB_Type *type, const GrB_Matrix A); GrB_Info GxB_Matrix_type_name(char *type_name, const GrB_Matrix A); GrB_Info GxB_Matrix_unpack_BitmapC(GrB_Matrix A, int8_t **Ab, void **Ax, GrB_Index *Ab_size, GrB_Index *Ax_size, bool *iso, GrB_Index *nvals, const GrB_Descriptor desc); @@ -3109,7 +3282,7 @@ GrB_Info GxB_unpack_HyperHash(GrB_Matrix A, GrB_Matrix *Y, const GrB_Descriptor GrB_Info GxB_Monoid_fprint(GrB_Monoid monoid, const char *name, GxB_Print_Level pr, FILE *f); GrB_Info GxB_Monoid_identity(void *identity, GrB_Monoid monoid); GrB_Info GxB_Monoid_operator(GrB_BinaryOp *op, GrB_Monoid monoid); -GrB_Info GxB_Monoid_terminal(bool *has_terminal, void *terminal, GrB_Monoid monoid); +GrB_Info GxB_Monoid_terminal(bool *, void *terminal, GrB_Monoid monoid); GrB_Info GxB_Monoid_terminal_new_BOOL(GrB_Monoid *monoid, GrB_BinaryOp op, bool identity, bool terminal); GrB_Info GxB_Monoid_terminal_new_FP32(GrB_Monoid *monoid, GrB_BinaryOp op, float identity, float terminal); GrB_Info GxB_Monoid_terminal_new_FP64(GrB_Monoid *monoid, GrB_BinaryOp op, double identity, double terminal); @@ -3124,6 +3297,8 @@ GrB_Info GxB_Monoid_terminal_new_UINT32(GrB_Monoid *monoid, GrB_BinaryOp op, uin GrB_Info GxB_Monoid_terminal_new_UINT64(GrB_Monoid *monoid, GrB_BinaryOp op, uint64_t identity, uint64_t terminal); /* scalar */ +GrB_Info GxB_Context_get_Scalar(GxB_Context, GrB_Scalar, GrB_Field); +GrB_Info GxB_Context_set_Scalar(GxB_Context, GrB_Scalar, GrB_Field); GrB_Info GxB_Scalar_clear(GrB_Scalar s); GrB_Info GxB_Scalar_dup(GrB_Scalar *s, const GrB_Scalar t); GrB_Info GxB_Scalar_error(const char **error, const GrB_Scalar s); @@ -3159,6 +3334,7 @@ GrB_Info GxB_Scalar_setElement_UINT64(GrB_Scalar s, uint64_t x); GrB_Info GxB_Scalar_type(GrB_Type *type, const GrB_Scalar s); GrB_Info GxB_Scalar_type_name(char *type_name, const GrB_Scalar s); GrB_Info GxB_Scalar_wait(GrB_Scalar *s); +GrB_Info GxB_Serialized_get_Scalar(const void *, GrB_Scalar, GrB_Field, size_t); /* selectop */ GrB_Info GxB_SelectOp_fprint(GxB_SelectOp op, const char *name, GxB_Print_Level pr, FILE *f); @@ -3187,15 +3363,15 @@ GrB_Info GxB_UnaryOp_ztype_name(char *type_name, const GrB_UnaryOp unaryop); /* vector */ GrB_Info GxB_Vector_Iterator_attach(GxB_Iterator iterator, GrB_Vector v, GrB_Descriptor desc); -GrB_Info GxB_Vector_Option_get(GrB_Vector A, GxB_Option_Field field, ...); -GrB_Info GxB_Vector_Option_get_FP64(GrB_Vector v, GxB_Option_Field field, double *value); -GrB_Info GxB_Vector_Option_get_INT32(GrB_Vector v, GxB_Option_Field field, int32_t *value); -GrB_Info GxB_Vector_Option_set(GrB_Vector A, GxB_Option_Field field, ...); -GrB_Info GxB_Vector_Option_set_FP64(GrB_Vector v, GxB_Option_Field field, double value); -GrB_Info GxB_Vector_Option_set_INT32(GrB_Vector v, GxB_Option_Field field, int32_t value); +GrB_Info GxB_Vector_Option_get(GrB_Vector, GxB_Option_Field, ...); +GrB_Info GxB_Vector_Option_get_FP64(GrB_Vector, GxB_Option_Field, double *); +GrB_Info GxB_Vector_Option_get_INT32(GrB_Vector, GxB_Option_Field, int32_t *); +GrB_Info GxB_Vector_Option_set(GrB_Vector, GxB_Option_Field, ...); +GrB_Info GxB_Vector_Option_set_FP64(GrB_Vector, GxB_Option_Field, double); +GrB_Info GxB_Vector_Option_set_INT32(GrB_Vector, GxB_Option_Field, int32_t); GrB_Info GxB_Vector_apply_BinaryOp1st(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_BinaryOp op, const GrB_Scalar x, const GrB_Vector u, const GrB_Descriptor desc); GrB_Info GxB_Vector_apply_BinaryOp2nd(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_BinaryOp op, const GrB_Vector u, const GrB_Scalar y, const GrB_Descriptor desc); -GrB_Info GxB_Vector_build_Scalar(GrB_Vector w, const GrB_Index *I, GrB_Scalar scalar, GrB_Index nvals); +GrB_Info GxB_Vector_build_Scalar(GrB_Vector w, const GrB_Index *Ilist, GrB_Scalar scalar, GrB_Index nvals); GrB_Info GxB_Vector_deserialize(GrB_Vector *w, GrB_Type type, const void *blob, GrB_Index blob_size, const GrB_Descriptor desc); GrB_Info GxB_Vector_eWiseUnion(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_BinaryOp add, const GrB_Vector u, const GrB_Scalar alpha, const GrB_Vector v, const GrB_Scalar beta, const GrB_Descriptor desc); GrB_Info GxB_Vector_export_Bitmap(GrB_Vector *v, GrB_Type *type, GrB_Index *n, int8_t **vb, void **vx, GrB_Index *vb_size, GrB_Index *vx_size, bool *iso, GrB_Index *nvals, const GrB_Descriptor desc); @@ -3214,20 +3390,20 @@ GrB_Info GxB_Vector_pack_Full(GrB_Vector v, void **vx, GrB_Index vx_size, bool i GrB_Info GxB_Vector_select(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GxB_SelectOp op, const GrB_Vector u, const GrB_Scalar Thunk, const GrB_Descriptor desc); GrB_Info GxB_Vector_serialize(void **blob_handle, GrB_Index *blob_size_handle, GrB_Vector u, const GrB_Descriptor desc); GrB_Info GxB_Vector_sort(GrB_Vector w, GrB_Vector p, GrB_BinaryOp op, GrB_Vector u, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_BOOL(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, bool x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_FP32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, float x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_FP64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, double x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_INT8(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int8_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_INT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int16_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_INT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_INT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_Scalar(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, GrB_Scalar x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_UDT(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, void *x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_UINT8(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint8_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_UINT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint16_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_UINT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint32_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); -GrB_Info GxB_Vector_subassign_UINT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint64_t x, const GrB_Index *I, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, const GrB_Vector u, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_BOOL(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, bool x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_FP32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, float x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_FP64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, double x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_INT8(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int8_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_INT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int16_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_INT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_INT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, int64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_Scalar(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, GrB_Scalar x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_UDT(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, void *x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_UINT8(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint8_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_UINT16(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint16_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_UINT32(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint32_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); +GrB_Info GxB_Vector_subassign_UINT64(GrB_Vector w, const GrB_Vector mask, const GrB_BinaryOp accum, uint64_t x, const GrB_Index *Ilist, GrB_Index ni, const GrB_Descriptor desc); GrB_Info GxB_Vector_type(GrB_Type *type, const GrB_Vector v); GrB_Info GxB_Vector_type_name(char *type_name, const GrB_Vector v); GrB_Info GxB_Vector_unpack_Bitmap(GrB_Vector v, int8_t **vb, void **vx, GrB_Index *vb_size, GrB_Index *vx_size, bool *iso, GrB_Index *nvals, const GrB_Descriptor desc); @@ -3253,6 +3429,7 @@ GrB_Info GxB_Vector_unpack_Full(GrB_Vector v, void **vx, GrB_Index *vx_size, boo #define GxB_FAST_IMPORT ... #define GxB_FULL ... #define GxB_GPU_ID ... +#define GxB_HAVE_COMPLEX_C99 ... #define GxB_HYPERSPARSE ... #define GxB_IMPLEMENTATION ... #define GxB_IMPLEMENTATION_MAJOR ... From 858df8917f44fea183bda88e13d72c07394e6c02 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Wed, 29 May 2024 18:52:19 -0400 Subject: [PATCH 02/45] maybe fix? (path and extra constant) --- build_graphblas_cffi.py | 3 +++ suitesparse_graphblas/create_headers.py | 2 +- suitesparse_graphblas/suitesparse_graphblas.h | 1 - suitesparse_graphblas/suitesparse_graphblas_no_complex.h | 1 - 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build_graphblas_cffi.py b/build_graphblas_cffi.py index 1c73e1c..81002e9 100644 --- a/build_graphblas_cffi.py +++ b/build_graphblas_cffi.py @@ -19,12 +19,15 @@ graphblas_root = "C:\\GraphBLAS" if is_win else sys.prefix include_dirs = [os.path.join(graphblas_root, "include")] +include_dirs.append(os.path.join(graphblas_root, "include", "suitesparse")) library_dirs = [os.path.join(graphblas_root, "lib")] if is_win: include_dirs.append(os.path.join(sys.prefix, "Library", "include")) + include_dirs.append(os.path.join(sys.prefix, "Library", "include", "suitesparse")) library_dirs.append(os.path.join(sys.prefix, "Library", "lib")) include_dirs.append(os.path.join(graphblas_root, "include")) + include_dirs.append(os.path.join(graphblas_root, "include", "suitesparse")) library_dirs.append(os.path.join(graphblas_root, "lib")) library_dirs.append(os.path.join(graphblas_root, "bin")) diff --git a/suitesparse_graphblas/create_headers.py b/suitesparse_graphblas/create_headers.py index 2e723bb..2a1ba1e 100644 --- a/suitesparse_graphblas/create_headers.py +++ b/suitesparse_graphblas/create_headers.py @@ -298,7 +298,7 @@ def groupby(index, seq): "GxB_COMPRESSION_LZ4HC", "GxB_COMPRESSION_ZSTD", "GxB_COMPRESSION_NONE", - "GxB_HAVE_COMPLEX_C99", # Added in 9.2.0 + # "GxB_HAVE_COMPLEX_C99", # Added in 9.2.0 } CHAR_DEFINES = { diff --git a/suitesparse_graphblas/suitesparse_graphblas.h b/suitesparse_graphblas/suitesparse_graphblas.h index a268299..66eefda 100644 --- a/suitesparse_graphblas/suitesparse_graphblas.h +++ b/suitesparse_graphblas/suitesparse_graphblas.h @@ -3663,7 +3663,6 @@ GrB_Info GxB_Vector_unpack_Full(GrB_Vector v, void **vx, GrB_Index *vx_size, boo #define GxB_FAST_IMPORT ... #define GxB_FULL ... #define GxB_GPU_ID ... -#define GxB_HAVE_COMPLEX_C99 ... #define GxB_HYPERSPARSE ... #define GxB_IMPLEMENTATION ... #define GxB_IMPLEMENTATION_MAJOR ... diff --git a/suitesparse_graphblas/suitesparse_graphblas_no_complex.h b/suitesparse_graphblas/suitesparse_graphblas_no_complex.h index 8728b2c..05526f9 100644 --- a/suitesparse_graphblas/suitesparse_graphblas_no_complex.h +++ b/suitesparse_graphblas/suitesparse_graphblas_no_complex.h @@ -3429,7 +3429,6 @@ GrB_Info GxB_Vector_unpack_Full(GrB_Vector v, void **vx, GrB_Index *vx_size, boo #define GxB_FAST_IMPORT ... #define GxB_FULL ... #define GxB_GPU_ID ... -#define GxB_HAVE_COMPLEX_C99 ... #define GxB_HYPERSPARSE ... #define GxB_IMPLEMENTATION ... #define GxB_IMPLEMENTATION_MAJOR ... From 01c7d1eb992aa9b4fc88059dc9611523d13a6ce3 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Wed, 29 May 2024 18:55:55 -0400 Subject: [PATCH 03/45] Update default include path to include "suitesparse" --- suitesparse_graphblas/create_headers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suitesparse_graphblas/create_headers.py b/suitesparse_graphblas/create_headers.py index 2a1ba1e..df665ff 100644 --- a/suitesparse_graphblas/create_headers.py +++ b/suitesparse_graphblas/create_headers.py @@ -785,7 +785,7 @@ def main(): parser.add_argument( "--graphblas", help="Path to GraphBLAS.h of SuiteSparse. Default will look in Python prefix path.", - default=os.path.join(sys.prefix, "include", "GraphBLAS.h"), + default=os.path.join(sys.prefix, "include", "suitesparse", "GraphBLAS.h"), ) parser.add_argument( "--show-skipped", From 4f76637fcfe76de41c12a89f8b95c36c727cddf1 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Wed, 29 May 2024 19:01:58 -0400 Subject: [PATCH 04/45] Try this --- suitesparse_graphblas/create_headers.py | 2 +- suitesparse_graphblas/suitesparse_graphblas.h | 1 + suitesparse_graphblas/suitesparse_graphblas_no_complex.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/suitesparse_graphblas/create_headers.py b/suitesparse_graphblas/create_headers.py index df665ff..d4d6afd 100644 --- a/suitesparse_graphblas/create_headers.py +++ b/suitesparse_graphblas/create_headers.py @@ -298,7 +298,6 @@ def groupby(index, seq): "GxB_COMPRESSION_LZ4HC", "GxB_COMPRESSION_ZSTD", "GxB_COMPRESSION_NONE", - # "GxB_HAVE_COMPLEX_C99", # Added in 9.2.0 } CHAR_DEFINES = { @@ -327,6 +326,7 @@ def groupby(index, seq): "RMM_WRAP_H", "GXB_COMPLEX_H", "GxB_STATIC_INLINE_VOID", + "GxB_HAVE_COMPLEX_C99", # deprecated "GxB_HYPER", } diff --git a/suitesparse_graphblas/suitesparse_graphblas.h b/suitesparse_graphblas/suitesparse_graphblas.h index 66eefda..7aebc0b 100644 --- a/suitesparse_graphblas/suitesparse_graphblas.h +++ b/suitesparse_graphblas/suitesparse_graphblas.h @@ -225,6 +225,7 @@ typedef enum GxB_JIT_C_CMAKE_LIBS = 7031, GxB_JIT_USE_CMAKE = 7032, GxB_JIT_ERROR_LOG = 7033, + GxB_JIT_CUDA_PREFACE = 7100, GxB_SPARSITY_STATUS = 7034, GxB_SPARSITY_CONTROL = 7036 } GxB_Option_Field; diff --git a/suitesparse_graphblas/suitesparse_graphblas_no_complex.h b/suitesparse_graphblas/suitesparse_graphblas_no_complex.h index 05526f9..a3bf947 100644 --- a/suitesparse_graphblas/suitesparse_graphblas_no_complex.h +++ b/suitesparse_graphblas/suitesparse_graphblas_no_complex.h @@ -221,6 +221,7 @@ typedef enum GxB_JIT_C_CMAKE_LIBS = 7031, GxB_JIT_USE_CMAKE = 7032, GxB_JIT_ERROR_LOG = 7033, + GxB_JIT_CUDA_PREFACE = 7100, GxB_SPARSITY_STATUS = 7034, GxB_SPARSITY_CONTROL = 7036 } GxB_Option_Field; From fb18dc7a7f214d040936a835ff2c5d468ae590e1 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Wed, 29 May 2024 19:19:07 -0400 Subject: [PATCH 05/45] Maybe don't need this anymore for arm on mac os --- .github/workflows/wheels.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index fb7acdf..8898811 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -144,10 +144,6 @@ jobs: run: | brew fetch --retry coreutils && brew install coreutils brew fetch --retry libomp && brew install libomp - if [[ ${{ matrix.cibw_archs }} == "arm64" ]] ; then - echo "Building universal libomp manually" - sh add_arm_to_libomp_dylib.sh || exit 1 - fi - uses: pypa/cibuildwheel@v2.16 with: From 8749bc23e0bc3f5ec33962c72b0961b77913d5ce Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Fri, 31 May 2024 23:50:04 -0700 Subject: [PATCH 06/45] Explicit macos x86 and arm runners --- .github/workflows/wheels.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 8898811..af9f387 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -84,16 +84,12 @@ jobs: cibw_skip: "pp* *musl*" # macOS x86 - - os: macos-latest + - os: macos-12 cibw_archs: "x86_64" - # macOS Apple Silicon cross-compiled on x86 macOS runner. - # GitHub does not offer Apple Silicon yet (only for self-hosted). - # See https://github.com/github/roadmap/issues/528 + # macOS Apple Silicon - os: macos-latest cibw_archs: "arm64" - # Skip macOS ARM tests on Intel runner. - cibw_test_skip: "*-macosx_arm64" steps: - uses: actions/checkout@v4 @@ -139,13 +135,12 @@ jobs: if: contains(matrix.os, 'macos') # Install coreutils which includes `nproc` used by `make -j` in suitesparse.sh # - # GitHub actions comes with libomp already installed, but for its native arch only. Must build universal one - # manually so that both x86 and arm builds can be built. + # Explicitly install libomp to be clear about the dependency. run: | brew fetch --retry coreutils && brew install coreutils brew fetch --retry libomp && brew install libomp - - uses: pypa/cibuildwheel@v2.16 + - uses: pypa/cibuildwheel@v2.18 with: output-dir: wheelhouse env: From 38fe7beb6cd3ffc702adf9f18e73f9ae9a9a8592 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Fri, 31 May 2024 23:54:56 -0700 Subject: [PATCH 07/45] Add dir dump --- build_graphblas_cffi.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/build_graphblas_cffi.py b/build_graphblas_cffi.py index 81002e9..8d62b39 100644 --- a/build_graphblas_cffi.py +++ b/build_graphblas_cffi.py @@ -5,6 +5,33 @@ from cffi import FFI from setuptools import Extension +###### TEST +from pathlib import Path + +# prefix components: +space = ' ' +branch = '│ ' +# pointers: +tee = '├── ' +last = '└── ' + + +def tree(dir_path: Path, prefix: str=''): + """A recursive generator, given a directory Path object + will yield a visual tree structure line by line + with each line prefixed by the same characters + """ + contents = list(dir_path.iterdir()) + # contents each get pointers that are ├── with a final └── : + pointers = [tee] * (len(contents) - 1) + [last] + for pointer, path in zip(pointers, contents): + yield prefix + pointer + path.name + if path.is_dir(): # extend the prefix and recurse: + extension = branch if pointer == tee else space + # i.e. space because last, └── , above so no more | + yield from tree(path, prefix=prefix+extension) +##### + is_win = sys.platform.startswith("win") ss_g = Path(__file__).parent / "suitesparse_graphblas" @@ -19,6 +46,10 @@ graphblas_root = "C:\\GraphBLAS" if is_win else sys.prefix include_dirs = [os.path.join(graphblas_root, "include")] +#### TEST +for line in tree(Path(include_dirs[0])): + print(line) +#### TEST include_dirs.append(os.path.join(graphblas_root, "include", "suitesparse")) library_dirs = [os.path.join(graphblas_root, "lib")] if is_win: From f42f731139eca595fa40f7f0f2516ecc30e9a8eb Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sat, 1 Jun 2024 09:50:22 -0700 Subject: [PATCH 08/45] Look in "/usr/local" --- build_graphblas_cffi.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build_graphblas_cffi.py b/build_graphblas_cffi.py index 8d62b39..a4ed01d 100644 --- a/build_graphblas_cffi.py +++ b/build_graphblas_cffi.py @@ -45,6 +45,10 @@ def tree(dir_path: Path, prefix: str=''): # Windows wheels.yml configures suitesparse.sh to install GraphBLAS to "C:\\GraphBLAS". graphblas_root = "C:\\GraphBLAS" if is_win else sys.prefix + #### TEST + if not is_win: + graphblas_root = "/usr/local" + include_dirs = [os.path.join(graphblas_root, "include")] #### TEST for line in tree(Path(include_dirs[0])): From cf75a880316fd41057e015c990c6f7ebeca5a682 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 15:18:46 -0700 Subject: [PATCH 09/45] Try installing to prefix --- .github/workflows/wheels.yml | 4 +++- build_graphblas_cffi.py | 3 +++ suitesparse.sh | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index af9f387..d46ec69 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -159,7 +159,9 @@ jobs: # macOS libomp requires special configs. BREW_LIBOMP=1 asks suitesparse.sh to include them. # SUITESPARSE_MACOS_ARCH asks to build a particular architecture. Either x86 or arm64. - CIBW_ENVIRONMENT_MACOS: BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }} + CIBW_ENVIRONMENT_MACOS: BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }} GRAPHBLAS_PREFIX="/tmp/graphblas" + + CIBW_ENVIRONMENT_LINUX: GRAPHBLAS_PREFIX="/tmp/graphblas" # Uncomment to only build CPython wheels # CIBW_BUILD: "cp*" diff --git a/build_graphblas_cffi.py b/build_graphblas_cffi.py index a4ed01d..be357b7 100644 --- a/build_graphblas_cffi.py +++ b/build_graphblas_cffi.py @@ -41,6 +41,9 @@ def tree(dir_path: Path, prefix: str=''): # Expected subdirectories: include/ (contains GraphBLAS.h), lib/, and bin/ (on Windows only) # Otherwise fallback to default system folders. graphblas_root = os.environ.get("GraphBLAS_ROOT", None) +if not graphblas_root: + graphblas_root = os.environ.get("GRAPHBLAS_PREFIX", None) + if not graphblas_root: # Windows wheels.yml configures suitesparse.sh to install GraphBLAS to "C:\\GraphBLAS". graphblas_root = "C:\\GraphBLAS" if is_win else sys.prefix diff --git a/suitesparse.sh b/suitesparse.sh index 2264ef0..6ab7c25 100755 --- a/suitesparse.sh +++ b/suitesparse.sh @@ -117,7 +117,8 @@ fi # Level 2, "run", means that pre-JIT kernels may be used, which does not require a compiler at runtime. cmake .. -DJITINIT=2 -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles' "${cmake_params[@]}" make -j$NPROC -make install +#make install +cmake --install build --prefix ${GRAPHBLAS_PREFIX} if [ -n "${CMAKE_GNUtoMS}" ]; then if [ -z "${GRAPHBLAS_PREFIX}" ]; then From a96d9ae423537586140474c31e5725b26a33f133 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 15:49:45 -0700 Subject: [PATCH 10/45] Cmake from . --- suitesparse.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suitesparse.sh b/suitesparse.sh index 6ab7c25..8ad73e5 100755 --- a/suitesparse.sh +++ b/suitesparse.sh @@ -118,7 +118,7 @@ fi cmake .. -DJITINIT=2 -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles' "${cmake_params[@]}" make -j$NPROC #make install -cmake --install build --prefix ${GRAPHBLAS_PREFIX} +cmake --install . --prefix ${GRAPHBLAS_PREFIX} if [ -n "${CMAKE_GNUtoMS}" ]; then if [ -z "${GRAPHBLAS_PREFIX}" ]; then From 2580a674feaca2cf3bf8140b654cf2abf5df147b Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 16:21:38 -0700 Subject: [PATCH 11/45] Add lib64 --- .github/workflows/wheels.yml | 2 +- build_graphblas_cffi.py | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index d46ec69..f57b785 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -17,7 +17,7 @@ on: - Test PyPI push: - branches: [ main ] +# branches: [ main ] pull_request: diff --git a/build_graphblas_cffi.py b/build_graphblas_cffi.py index be357b7..c87f077 100644 --- a/build_graphblas_cffi.py +++ b/build_graphblas_cffi.py @@ -48,23 +48,19 @@ def tree(dir_path: Path, prefix: str=''): # Windows wheels.yml configures suitesparse.sh to install GraphBLAS to "C:\\GraphBLAS". graphblas_root = "C:\\GraphBLAS" if is_win else sys.prefix - #### TEST - if not is_win: - graphblas_root = "/usr/local" - include_dirs = [os.path.join(graphblas_root, "include")] #### TEST -for line in tree(Path(include_dirs[0])): +for line in tree(Path(graphblas_root)): print(line) #### TEST include_dirs.append(os.path.join(graphblas_root, "include", "suitesparse")) -library_dirs = [os.path.join(graphblas_root, "lib")] +library_dirs = [os.path.join(graphblas_root, "lib"), os.path.join(graphblas_root, "lib64")] if is_win: include_dirs.append(os.path.join(sys.prefix, "Library", "include")) - include_dirs.append(os.path.join(sys.prefix, "Library", "include", "suitesparse")) + # include_dirs.append(os.path.join(sys.prefix, "Library", "include", "suitesparse")) library_dirs.append(os.path.join(sys.prefix, "Library", "lib")) - include_dirs.append(os.path.join(graphblas_root, "include")) + # include_dirs.append(os.path.join(graphblas_root, "include")) include_dirs.append(os.path.join(graphblas_root, "include", "suitesparse")) library_dirs.append(os.path.join(graphblas_root, "lib")) library_dirs.append(os.path.join(graphblas_root, "bin")) From fa0e83773711bd08961cf6b2f955364d1cf2ed7b Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 16:37:50 -0700 Subject: [PATCH 12/45] Try installing to . instead of /tmp --- .github/workflows/wheels.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index f57b785..620cf26 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -155,13 +155,13 @@ jobs: CIBW_ENVIRONMENT_PASS_LINUX: SUITESPARSE_FAST_BUILD SUITESPARSE_FASTEST_BUILD # CMAKE_GNUtoMS=ON asks suitesparse.sh to build libraries in MSVC style on Windows. - CIBW_ENVIRONMENT_WINDOWS: CMAKE_GNUtoMS=ON GRAPHBLAS_PREFIX="C:/GraphBLAS" + CIBW_ENVIRONMENT_WINDOWS: GRAPHBLAS_PREFIX="C:/GraphBLAS" CMAKE_GNUtoMS=ON # macOS libomp requires special configs. BREW_LIBOMP=1 asks suitesparse.sh to include them. # SUITESPARSE_MACOS_ARCH asks to build a particular architecture. Either x86 or arm64. - CIBW_ENVIRONMENT_MACOS: BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }} GRAPHBLAS_PREFIX="/tmp/graphblas" + CIBW_ENVIRONMENT_MACOS: GRAPHBLAS_PREFIX="./graphblas" BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }} - CIBW_ENVIRONMENT_LINUX: GRAPHBLAS_PREFIX="/tmp/graphblas" + CIBW_ENVIRONMENT_LINUX: GRAPHBLAS_PREFIX="./graphblas" # Uncomment to only build CPython wheels # CIBW_BUILD: "cp*" From 9c3b59e255c89ad07f6eb39a88499d5131138cb4 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 16:53:56 -0700 Subject: [PATCH 13/45] Set MACOSX_DEPLOYMENT_TARGET --- .github/workflows/wheels.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 620cf26..d4d5213 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -136,9 +136,12 @@ jobs: # Install coreutils which includes `nproc` used by `make -j` in suitesparse.sh # # Explicitly install libomp to be clear about the dependency. + # + # libomp determines the minimum macOS version that we can build for run: | brew fetch --retry coreutils && brew install coreutils brew fetch --retry libomp && brew install libomp + echo MACOSX_DEPLOYMENT_TARGET=$(otool -l $(brew --prefix libomp)/lib/libomp.dylib | grep minos | awk '{print $2}') >> $GITHUB_ENV - uses: pypa/cibuildwheel@v2.18 with: From 0aee66c4e845bc0080651ceba399611ecd5e889c Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 16:54:53 -0700 Subject: [PATCH 14/45] Try installing to /usr/local/graphblas --- .github/workflows/wheels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index d4d5213..1276642 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -162,9 +162,9 @@ jobs: # macOS libomp requires special configs. BREW_LIBOMP=1 asks suitesparse.sh to include them. # SUITESPARSE_MACOS_ARCH asks to build a particular architecture. Either x86 or arm64. - CIBW_ENVIRONMENT_MACOS: GRAPHBLAS_PREFIX="./graphblas" BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }} + CIBW_ENVIRONMENT_MACOS: GRAPHBLAS_PREFIX="/usr/local/graphblas" BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }} - CIBW_ENVIRONMENT_LINUX: GRAPHBLAS_PREFIX="./graphblas" + CIBW_ENVIRONMENT_LINUX: GRAPHBLAS_PREFIX="/usr/local/graphblas" # Uncomment to only build CPython wheels # CIBW_BUILD: "cp*" From aa353141e114647e2dbeaa1cfde5896bf473bdbb Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 18:13:20 -0700 Subject: [PATCH 15/45] Try installing to {package} --- .github/workflows/wheels.yml | 8 +++++--- build_graphblas_cffi.py | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 1276642..35a2bd3 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -84,11 +84,13 @@ jobs: cibw_skip: "pp* *musl*" # macOS x86 + # Note: keep as old as possible as due to libomp this will be the oldest supported macOS version. - os: macos-12 cibw_archs: "x86_64" # macOS Apple Silicon - - os: macos-latest + # Note: keep as old as possible as due to libomp this will be the oldest supported macOS version. + - os: macos-14 cibw_archs: "arm64" steps: @@ -162,9 +164,9 @@ jobs: # macOS libomp requires special configs. BREW_LIBOMP=1 asks suitesparse.sh to include them. # SUITESPARSE_MACOS_ARCH asks to build a particular architecture. Either x86 or arm64. - CIBW_ENVIRONMENT_MACOS: GRAPHBLAS_PREFIX="/usr/local/graphblas" BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }} + CIBW_ENVIRONMENT_MACOS: GRAPHBLAS_PREFIX="{package}/graphblas" BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }} - CIBW_ENVIRONMENT_LINUX: GRAPHBLAS_PREFIX="/usr/local/graphblas" + CIBW_ENVIRONMENT_LINUX: GRAPHBLAS_PREFIX="{package}/graphblas" # Uncomment to only build CPython wheels # CIBW_BUILD: "cp*" diff --git a/build_graphblas_cffi.py b/build_graphblas_cffi.py index c87f077..b0483e1 100644 --- a/build_graphblas_cffi.py +++ b/build_graphblas_cffi.py @@ -57,10 +57,10 @@ def tree(dir_path: Path, prefix: str=''): library_dirs = [os.path.join(graphblas_root, "lib"), os.path.join(graphblas_root, "lib64")] if is_win: include_dirs.append(os.path.join(sys.prefix, "Library", "include")) - # include_dirs.append(os.path.join(sys.prefix, "Library", "include", "suitesparse")) + include_dirs.append(os.path.join(sys.prefix, "Library", "include", "suitesparse")) library_dirs.append(os.path.join(sys.prefix, "Library", "lib")) - # include_dirs.append(os.path.join(graphblas_root, "include")) + include_dirs.append(os.path.join(graphblas_root, "include")) include_dirs.append(os.path.join(graphblas_root, "include", "suitesparse")) library_dirs.append(os.path.join(graphblas_root, "lib")) library_dirs.append(os.path.join(graphblas_root, "bin")) From fe9dffc7d4f4bdf9ff42681f15d44b2884d09df4 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 18:21:53 -0700 Subject: [PATCH 16/45] Fix --- .github/workflows/wheels.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 35a2bd3..34b0132 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -153,7 +153,7 @@ jobs: CIBW_BUILD_VERBOSITY: 3 # Build SuiteSparse - CIBW_BEFORE_ALL: bash suitesparse.sh ${{ env.GB_VERSION_REF }} + CIBW_BEFORE_ALL: GRAPHBLAS_PREFIX="{package}/graphblas" bash suitesparse.sh ${{ env.GB_VERSION_REF }} CIBW_BEFORE_BUILD_LINUX: ${{ matrix.cibw_before_build_linux }} @@ -164,9 +164,9 @@ jobs: # macOS libomp requires special configs. BREW_LIBOMP=1 asks suitesparse.sh to include them. # SUITESPARSE_MACOS_ARCH asks to build a particular architecture. Either x86 or arm64. - CIBW_ENVIRONMENT_MACOS: GRAPHBLAS_PREFIX="{package}/graphblas" BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }} + CIBW_ENVIRONMENT_MACOS: GRAPHBLAS_PREFIX="graphblas" BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }} - CIBW_ENVIRONMENT_LINUX: GRAPHBLAS_PREFIX="{package}/graphblas" + CIBW_ENVIRONMENT_LINUX: GRAPHBLAS_PREFIX="graphblas" # Uncomment to only build CPython wheels # CIBW_BUILD: "cp*" From 855f1bed172b7a283c1bc3adbd0e4c18e7561825 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 18:41:11 -0700 Subject: [PATCH 17/45] Add prints --- .github/workflows/wheels.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 34b0132..e90793b 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -168,6 +168,13 @@ jobs: CIBW_ENVIRONMENT_LINUX: GRAPHBLAS_PREFIX="graphblas" + #### TEST: + CIBW_REPAIR_WHEEL_COMMAND_MACOS: > + pwd && + find graphblas && + find . -type d && + delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} + # Uncomment to only build CPython wheels # CIBW_BUILD: "cp*" From 38298a8b596ca6ffdceed7a66210c04e480bd354 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 18:53:04 -0700 Subject: [PATCH 18/45] Add print --- .github/workflows/wheels.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e90793b..d81c1db 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -171,6 +171,7 @@ jobs: #### TEST: CIBW_REPAIR_WHEEL_COMMAND_MACOS: > pwd && + ls -lh && find graphblas && find . -type d && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} From a9b4c3713a6fbe36a3f89a2d6e9dea4a8a955da9 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 19:05:27 -0700 Subject: [PATCH 19/45] Try installing to . --- .github/workflows/wheels.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index d81c1db..c5eebd7 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -153,7 +153,7 @@ jobs: CIBW_BUILD_VERBOSITY: 3 # Build SuiteSparse - CIBW_BEFORE_ALL: GRAPHBLAS_PREFIX="{package}/graphblas" bash suitesparse.sh ${{ env.GB_VERSION_REF }} + CIBW_BEFORE_ALL: GRAPHBLAS_PREFIX="{package}" bash suitesparse.sh ${{ env.GB_VERSION_REF }} CIBW_BEFORE_BUILD_LINUX: ${{ matrix.cibw_before_build_linux }} @@ -164,9 +164,9 @@ jobs: # macOS libomp requires special configs. BREW_LIBOMP=1 asks suitesparse.sh to include them. # SUITESPARSE_MACOS_ARCH asks to build a particular architecture. Either x86 or arm64. - CIBW_ENVIRONMENT_MACOS: GRAPHBLAS_PREFIX="graphblas" BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }} + CIBW_ENVIRONMENT_MACOS: BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }} - CIBW_ENVIRONMENT_LINUX: GRAPHBLAS_PREFIX="graphblas" +# CIBW_ENVIRONMENT_LINUX: GRAPHBLAS_PREFIX="graphblas" #### TEST: CIBW_REPAIR_WHEEL_COMMAND_MACOS: > From 66e11b327ec9f3997761adb7f6fcf890f50e2c78 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 19:15:33 -0700 Subject: [PATCH 20/45] parent --- build_graphblas_cffi.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build_graphblas_cffi.py b/build_graphblas_cffi.py index b0483e1..66e2a39 100644 --- a/build_graphblas_cffi.py +++ b/build_graphblas_cffi.py @@ -44,6 +44,12 @@ def tree(dir_path: Path, prefix: str=''): if not graphblas_root: graphblas_root = os.environ.get("GRAPHBLAS_PREFIX", None) +if "{package}" in graphblas_root: + graphblas_root = graphblas_root.replace("{package}", str(Path(__file__).parent)) + +if not graphblas_root: + graphblas_root = Path(__file__).parent + if not graphblas_root: # Windows wheels.yml configures suitesparse.sh to install GraphBLAS to "C:\\GraphBLAS". graphblas_root = "C:\\GraphBLAS" if is_win else sys.prefix From 5dd9e9a2f883c22630ffcbc487e1078151a8efef Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 19:20:55 -0700 Subject: [PATCH 21/45] retry --- build_graphblas_cffi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_graphblas_cffi.py b/build_graphblas_cffi.py index 66e2a39..d0fc3fe 100644 --- a/build_graphblas_cffi.py +++ b/build_graphblas_cffi.py @@ -44,8 +44,8 @@ def tree(dir_path: Path, prefix: str=''): if not graphblas_root: graphblas_root = os.environ.get("GRAPHBLAS_PREFIX", None) -if "{package}" in graphblas_root: - graphblas_root = graphblas_root.replace("{package}", str(Path(__file__).parent)) +# if "{package}" in graphblas_root: +# graphblas_root = graphblas_root.replace("{package}", str(Path(__file__).parent)) if not graphblas_root: graphblas_root = Path(__file__).parent From 7e1c7a5edc729740ae7d8182f6caf567718e9fe4 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 19:25:18 -0700 Subject: [PATCH 22/45] Disable JIT on Windows --- suitesparse.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/suitesparse.sh b/suitesparse.sh index 8ad73e5..a5d961c 100755 --- a/suitesparse.sh +++ b/suitesparse.sh @@ -113,11 +113,16 @@ if [ -n "${SUITESPARSE_FASTEST_BUILD}" ]; then cmake_params+=(-DCMAKE_CUDA_DEV=1) fi -# Use `-DJITINIT=2` so that the JIT functionality is available, but disabled by default. -# Level 2, "run", means that pre-JIT kernels may be used, which does not require a compiler at runtime. -cmake .. -DJITINIT=2 -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles' "${cmake_params[@]}" +if [ -z "${CMAKE_GNUtoMS}" ]; then + # Windows JIT options + # Does not build, skip JIT on Windows for now. +else + # Use `-DJITINIT=2` so that the JIT functionality is available, but disabled by default. + # Level 2, "run", means that pre-JIT kernels may be used, which does not require a compiler at runtime. + cmake_params+=(-DJITINIT=2) +fi +cmake .. -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles' "${cmake_params[@]}" make -j$NPROC -#make install cmake --install . --prefix ${GRAPHBLAS_PREFIX} if [ -n "${CMAKE_GNUtoMS}" ]; then From 6a940fdfad06b6d77c09ed564fa3086933abd1fa Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 19:27:59 -0700 Subject: [PATCH 23/45] retry --- .github/workflows/wheels.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index c5eebd7..443d09f 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -172,7 +172,6 @@ jobs: CIBW_REPAIR_WHEEL_COMMAND_MACOS: > pwd && ls -lh && - find graphblas && find . -type d && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} From c794d3964df5b31b99ce74f2a11ff5185690a1fe Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 19:30:51 -0700 Subject: [PATCH 24/45] Fix if --- suitesparse.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/suitesparse.sh b/suitesparse.sh index a5d961c..f740a12 100755 --- a/suitesparse.sh +++ b/suitesparse.sh @@ -113,14 +113,15 @@ if [ -n "${SUITESPARSE_FASTEST_BUILD}" ]; then cmake_params+=(-DCMAKE_CUDA_DEV=1) fi -if [ -z "${CMAKE_GNUtoMS}" ]; then +if [ -n "${CMAKE_GNUtoMS}" ]; then # Windows JIT options - # Does not build, skip JIT on Windows for now. + echo "Skipping JIT on Windows for now because it fails to build." else # Use `-DJITINIT=2` so that the JIT functionality is available, but disabled by default. # Level 2, "run", means that pre-JIT kernels may be used, which does not require a compiler at runtime. cmake_params+=(-DJITINIT=2) fi + cmake .. -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles' "${cmake_params[@]}" make -j$NPROC cmake --install . --prefix ${GRAPHBLAS_PREFIX} From a43bcfd94ebb62924e10d3d6c81b27172bfc0f9e Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 19:45:51 -0700 Subject: [PATCH 25/45] Revert to sys install --- .github/workflows/wheels.yml | 14 +++++++------- build_graphblas_cffi.py | 8 ++++---- suitesparse.sh | 3 ++- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 443d09f..14920e6 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -153,7 +153,7 @@ jobs: CIBW_BUILD_VERBOSITY: 3 # Build SuiteSparse - CIBW_BEFORE_ALL: GRAPHBLAS_PREFIX="{package}" bash suitesparse.sh ${{ env.GB_VERSION_REF }} + CIBW_BEFORE_ALL: bash suitesparse.sh ${{ env.GB_VERSION_REF }} CIBW_BEFORE_BUILD_LINUX: ${{ matrix.cibw_before_build_linux }} @@ -168,12 +168,12 @@ jobs: # CIBW_ENVIRONMENT_LINUX: GRAPHBLAS_PREFIX="graphblas" - #### TEST: - CIBW_REPAIR_WHEEL_COMMAND_MACOS: > - pwd && - ls -lh && - find . -type d && - delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} + #### TEST: GRAPHBLAS_PREFIX="{package}" +# CIBW_REPAIR_WHEEL_COMMAND_MACOS: > +# pwd && +# ls -lh && +# find . -type d && +# delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} # Uncomment to only build CPython wheels # CIBW_BUILD: "cp*" diff --git a/build_graphblas_cffi.py b/build_graphblas_cffi.py index d0fc3fe..5898c8e 100644 --- a/build_graphblas_cffi.py +++ b/build_graphblas_cffi.py @@ -44,15 +44,15 @@ def tree(dir_path: Path, prefix: str=''): if not graphblas_root: graphblas_root = os.environ.get("GRAPHBLAS_PREFIX", None) +# if not graphblas_root: +# graphblas_root = Path(__file__).parent +# # if "{package}" in graphblas_root: # graphblas_root = graphblas_root.replace("{package}", str(Path(__file__).parent)) -if not graphblas_root: - graphblas_root = Path(__file__).parent - if not graphblas_root: # Windows wheels.yml configures suitesparse.sh to install GraphBLAS to "C:\\GraphBLAS". - graphblas_root = "C:\\GraphBLAS" if is_win else sys.prefix + graphblas_root = "C:\\GraphBLAS" if is_win else "/usr/local" include_dirs = [os.path.join(graphblas_root, "include")] #### TEST diff --git a/suitesparse.sh b/suitesparse.sh index f740a12..5a54781 100755 --- a/suitesparse.sh +++ b/suitesparse.sh @@ -124,7 +124,8 @@ fi cmake .. -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles' "${cmake_params[@]}" make -j$NPROC -cmake --install . --prefix ${GRAPHBLAS_PREFIX} +sudo make install +#cmake --install . --prefix ${GRAPHBLAS_PREFIX} if [ -n "${CMAKE_GNUtoMS}" ]; then if [ -z "${GRAPHBLAS_PREFIX}" ]; then From fcc2579a6309ea5db282bf66959b9bddc1c11383 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 19:57:50 -0700 Subject: [PATCH 26/45] Fix sudo --- build_graphblas_cffi.py | 4 +++- suitesparse.sh | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/build_graphblas_cffi.py b/build_graphblas_cffi.py index 5898c8e..7e680fa 100644 --- a/build_graphblas_cffi.py +++ b/build_graphblas_cffi.py @@ -56,8 +56,10 @@ def tree(dir_path: Path, prefix: str=''): include_dirs = [os.path.join(graphblas_root, "include")] #### TEST -for line in tree(Path(graphblas_root)): +for i, line in enumerate(tree(Path(graphblas_root))): print(line) + if i > 30: + break #### TEST include_dirs.append(os.path.join(graphblas_root, "include", "suitesparse")) library_dirs = [os.path.join(graphblas_root, "lib"), os.path.join(graphblas_root, "lib64")] diff --git a/suitesparse.sh b/suitesparse.sh index 5a54781..8a79d83 100755 --- a/suitesparse.sh +++ b/suitesparse.sh @@ -122,9 +122,16 @@ else cmake_params+=(-DJITINIT=2) fi +# some platforms require sudo for installation, some don't have sudo at all +if command -v sudo; then + SUDO=sudo +else + SUDO="" +fi + cmake .. -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles' "${cmake_params[@]}" make -j$NPROC -sudo make install +$SUDO make install #cmake --install . --prefix ${GRAPHBLAS_PREFIX} if [ -n "${CMAKE_GNUtoMS}" ]; then From 6a8c53cd83e78bab718856c6a0f017f8129d6131 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 20:02:31 -0700 Subject: [PATCH 27/45] Disable JIT on Windows --- suitesparse.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/suitesparse.sh b/suitesparse.sh index 8a79d83..355b652 100755 --- a/suitesparse.sh +++ b/suitesparse.sh @@ -116,6 +116,7 @@ fi if [ -n "${CMAKE_GNUtoMS}" ]; then # Windows JIT options echo "Skipping JIT on Windows for now because it fails to build." + cmake_params+=(-DGRAPHBLAS_USE_JIT=OFF) else # Use `-DJITINIT=2` so that the JIT functionality is available, but disabled by default. # Level 2, "run", means that pre-JIT kernels may be used, which does not require a compiler at runtime. From 270cffa798d5a5a8ae6c488aaa1f072d0acc2a72 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 20:27:19 -0700 Subject: [PATCH 28/45] tweaks --- build_graphblas_cffi.py | 8 ++++---- suitesparse.sh | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/build_graphblas_cffi.py b/build_graphblas_cffi.py index 7e680fa..0026ded 100644 --- a/build_graphblas_cffi.py +++ b/build_graphblas_cffi.py @@ -56,10 +56,10 @@ def tree(dir_path: Path, prefix: str=''): include_dirs = [os.path.join(graphblas_root, "include")] #### TEST -for i, line in enumerate(tree(Path(graphblas_root))): - print(line) - if i > 30: - break +# for i, line in enumerate(tree(Path(graphblas_root))): +# print(line) +# if i > 30: +# break #### TEST include_dirs.append(os.path.join(graphblas_root, "include", "suitesparse")) library_dirs = [os.path.join(graphblas_root, "lib"), os.path.join(graphblas_root, "lib64")] diff --git a/suitesparse.sh b/suitesparse.sh index 355b652..cb8e9c2 100755 --- a/suitesparse.sh +++ b/suitesparse.sh @@ -121,10 +121,13 @@ else # Use `-DJITINIT=2` so that the JIT functionality is available, but disabled by default. # Level 2, "run", means that pre-JIT kernels may be used, which does not require a compiler at runtime. cmake_params+=(-DJITINIT=2) + + # Disable JIT here too to not segfault in tests + cmake_params+=(-DGRAPHBLAS_USE_JIT=OFF) fi # some platforms require sudo for installation, some don't have sudo at all -if command -v sudo; then +if [ "$(uname)" == "Darwin" ]; then SUDO=sudo else SUDO="" From e5ccb16913d6f86428ae5edf597e1c9ec2353315 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 21:16:36 -0700 Subject: [PATCH 29/45] MSVC complex values --- build_graphblas_cffi.py | 3 +++ suitesparse.sh | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build_graphblas_cffi.py b/build_graphblas_cffi.py index 0026ded..f95980b 100644 --- a/build_graphblas_cffi.py +++ b/build_graphblas_cffi.py @@ -113,6 +113,9 @@ def get_extension(apply_msvc_patch: bool = None, extra_compile_args=()): msvc_code = msvc_code.replace("double _Complex", "_Dcomplex") code_path.write_text(msvc_code) + # tell GraphBLAS.h that we need MSVC-style complex values + extra_compile_args = list(extra_compile_args) + ["-DGxB_HAVE_COMPLEX_MSVC"] + return Extension( "suitesparse_graphblas._graphblas", [os.path.join("suitesparse_graphblas", "_graphblas.c")], diff --git a/suitesparse.sh b/suitesparse.sh index cb8e9c2..7385206 100755 --- a/suitesparse.sh +++ b/suitesparse.sh @@ -114,7 +114,7 @@ if [ -n "${SUITESPARSE_FASTEST_BUILD}" ]; then fi if [ -n "${CMAKE_GNUtoMS}" ]; then - # Windows JIT options + # Windows options echo "Skipping JIT on Windows for now because it fails to build." cmake_params+=(-DGRAPHBLAS_USE_JIT=OFF) else @@ -136,7 +136,6 @@ fi cmake .. -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles' "${cmake_params[@]}" make -j$NPROC $SUDO make install -#cmake --install . --prefix ${GRAPHBLAS_PREFIX} if [ -n "${CMAKE_GNUtoMS}" ]; then if [ -z "${GRAPHBLAS_PREFIX}" ]; then From 41872fc434616f7af596caaafedb0d45b1ed9862 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 21:31:49 -0700 Subject: [PATCH 30/45] Revert prints --- .github/workflows/wheels.yml | 11 +-------- build_graphblas_cffi.py | 46 ++---------------------------------- 2 files changed, 3 insertions(+), 54 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 14920e6..0567e65 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -160,21 +160,12 @@ jobs: CIBW_ENVIRONMENT_PASS_LINUX: SUITESPARSE_FAST_BUILD SUITESPARSE_FASTEST_BUILD # CMAKE_GNUtoMS=ON asks suitesparse.sh to build libraries in MSVC style on Windows. - CIBW_ENVIRONMENT_WINDOWS: GRAPHBLAS_PREFIX="C:/GraphBLAS" CMAKE_GNUtoMS=ON + CIBW_ENVIRONMENT_WINDOWS: CMAKE_GNUtoMS=ON GRAPHBLAS_PREFIX="C:/GraphBLAS" # macOS libomp requires special configs. BREW_LIBOMP=1 asks suitesparse.sh to include them. # SUITESPARSE_MACOS_ARCH asks to build a particular architecture. Either x86 or arm64. CIBW_ENVIRONMENT_MACOS: BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }} -# CIBW_ENVIRONMENT_LINUX: GRAPHBLAS_PREFIX="graphblas" - - #### TEST: GRAPHBLAS_PREFIX="{package}" -# CIBW_REPAIR_WHEEL_COMMAND_MACOS: > -# pwd && -# ls -lh && -# find . -type d && -# delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} - # Uncomment to only build CPython wheels # CIBW_BUILD: "cp*" diff --git a/build_graphblas_cffi.py b/build_graphblas_cffi.py index f95980b..6a7d7c9 100644 --- a/build_graphblas_cffi.py +++ b/build_graphblas_cffi.py @@ -5,33 +5,6 @@ from cffi import FFI from setuptools import Extension -###### TEST -from pathlib import Path - -# prefix components: -space = ' ' -branch = '│ ' -# pointers: -tee = '├── ' -last = '└── ' - - -def tree(dir_path: Path, prefix: str=''): - """A recursive generator, given a directory Path object - will yield a visual tree structure line by line - with each line prefixed by the same characters - """ - contents = list(dir_path.iterdir()) - # contents each get pointers that are ├── with a final └── : - pointers = [tee] * (len(contents) - 1) + [last] - for pointer, path in zip(pointers, contents): - yield prefix + pointer + path.name - if path.is_dir(): # extend the prefix and recurse: - extension = branch if pointer == tee else space - # i.e. space because last, └── , above so no more | - yield from tree(path, prefix=prefix+extension) -##### - is_win = sys.platform.startswith("win") ss_g = Path(__file__).parent / "suitesparse_graphblas" @@ -41,27 +14,12 @@ def tree(dir_path: Path, prefix: str=''): # Expected subdirectories: include/ (contains GraphBLAS.h), lib/, and bin/ (on Windows only) # Otherwise fallback to default system folders. graphblas_root = os.environ.get("GraphBLAS_ROOT", None) -if not graphblas_root: - graphblas_root = os.environ.get("GRAPHBLAS_PREFIX", None) - -# if not graphblas_root: -# graphblas_root = Path(__file__).parent -# -# if "{package}" in graphblas_root: -# graphblas_root = graphblas_root.replace("{package}", str(Path(__file__).parent)) if not graphblas_root: # Windows wheels.yml configures suitesparse.sh to install GraphBLAS to "C:\\GraphBLAS". graphblas_root = "C:\\GraphBLAS" if is_win else "/usr/local" -include_dirs = [os.path.join(graphblas_root, "include")] -#### TEST -# for i, line in enumerate(tree(Path(graphblas_root))): -# print(line) -# if i > 30: -# break -#### TEST -include_dirs.append(os.path.join(graphblas_root, "include", "suitesparse")) +include_dirs = [os.path.join(graphblas_root, "include"), os.path.join(graphblas_root, "include", "suitesparse")] library_dirs = [os.path.join(graphblas_root, "lib"), os.path.join(graphblas_root, "lib64")] if is_win: include_dirs.append(os.path.join(sys.prefix, "Library", "include")) @@ -113,7 +71,7 @@ def get_extension(apply_msvc_patch: bool = None, extra_compile_args=()): msvc_code = msvc_code.replace("double _Complex", "_Dcomplex") code_path.write_text(msvc_code) - # tell GraphBLAS.h that we need MSVC-style complex values + # Hack: tell GraphBLAS.h that we need MSVC-style complex values extra_compile_args = list(extra_compile_args) + ["-DGxB_HAVE_COMPLEX_MSVC"] return Extension( From 891f221414d7bc18b564cb2f4d0481cda3b827a6 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 21:48:57 -0700 Subject: [PATCH 31/45] Silence workflow warnings --- .github/workflows/wheels.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 0567e65..5fd9967 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -92,6 +92,8 @@ jobs: # Note: keep as old as possible as due to libomp this will be the oldest supported macOS version. - os: macos-14 cibw_archs: "arm64" + # Silence warning for only Python 3.8, as per https://github.com/pypa/cibuildwheel/pull/1169 + cibw_skip: "cp38-macosx_*:arm64" steps: - uses: actions/checkout@v4 @@ -142,7 +144,7 @@ jobs: # libomp determines the minimum macOS version that we can build for run: | brew fetch --retry coreutils && brew install coreutils - brew fetch --retry libomp && brew install libomp + brew fetch --retry libomp && brew reinstall libomp echo MACOSX_DEPLOYMENT_TARGET=$(otool -l $(brew --prefix libomp)/lib/libomp.dylib | grep minos | awk '{print $2}') >> $GITHUB_ENV - uses: pypa/cibuildwheel@v2.18 From b91147465d5f7ed96d315935a72eca6ed407d754 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 21:49:21 -0700 Subject: [PATCH 32/45] Delete no longer used script --- add_arm_to_libomp_dylib.sh | 53 -------------------------------------- 1 file changed, 53 deletions(-) delete mode 100755 add_arm_to_libomp_dylib.sh diff --git a/add_arm_to_libomp_dylib.sh b/add_arm_to_libomp_dylib.sh deleted file mode 100755 index d452ac1..0000000 --- a/add_arm_to_libomp_dylib.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# Construct a universal2 version of homebrew's libomp. -# -# Homebrew's libomp works well to patch Apple clang's missing OpenMP support. The problem is a combination of: -# - Brew installs libomp built for x86 *or* ARM, matching the architecture of the machine it is running on. -# - GitHub Actions only has x86 runners as of now. Check back in Q4 2023. https://github.com/github/roadmap/issues/528 -# - The linker will select the first found libomp, and if that version does not include the expected architecture then -# linking will fail. -# -# One solution is to build a universal2 version of libomp that includes both architectures. That's what this script -# does. It adds the ARM version of libomp to the x86 version. -# -# This script assumes it is running on x86 with x86 libomp already installed. - -if [ "$(arch)" != "x86_64" ] && [ "$(arch)" != "i386" ]; then - echo "Not running on x86 as expected. Running on:" - arch - echo "If the above says arm64 then this hack is no longer necessary. Remove this script from the build." - exit 1; -fi - -set -x # echo on -set -e # fail fast - -#mkdir x86lib -mkdir armlib - -# download and unzip both x86 and arm libomp tarballs -#brew fetch --retry --force --bottle-tag=x86_64_monterey libomp -brew fetch --retry --force --bottle-tag=arm64_monterey libomp - -# untar -#tar -xzf $(brew --cache --bottle-tag=x86_64_monterey libomp) --strip-components 2 -C x86lib -tar -xzf $(brew --cache --bottle-tag=arm64_monterey libomp) --strip-components 2 -C armlib - -# ARM and x86 dylibs have different install names due to different brew install directories. -# The x86 install name will be expected so make the ARM install name match. -X86_INSTALL_NAME="$(otool -X -D $(brew --prefix libomp)/lib/libomp.dylib)" -install_name_tool -id "${X86_INSTALL_NAME}" armlib/lib/libomp.dylib -codesign --force -s - armlib/lib/libomp.dylib - -# merge the downloaded (arm) libomp with the already installed (x86) libomp to create a universal libomp -lipo armlib/lib/libomp.dylib $(brew --prefix libomp)/lib/libomp.dylib -output libomp.dylib -create - -# print contents of universal library for reference -otool -arch all -L libomp.dylib - -# replace the x86-only libomp with the newly-created universal one -cp -f libomp.dylib $(brew --prefix libomp)/lib - -# clean up -rm libomp.dylib -rm -rf armlib From 1d348e1e6f397fca1cc733a3641dfa41fb19ef46 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 22:06:57 -0700 Subject: [PATCH 33/45] Undo run tests on push --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 5fd9967..cdd3479 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -17,7 +17,7 @@ on: - Test PyPI push: -# branches: [ main ] + branches: [ main ] pull_request: From 0810cd0515728223ae3d7772c1eabecc0ccec9f3 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 22:15:41 -0700 Subject: [PATCH 34/45] Make linter happy --- build_graphblas_cffi.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build_graphblas_cffi.py b/build_graphblas_cffi.py index 6a7d7c9..bfb8411 100644 --- a/build_graphblas_cffi.py +++ b/build_graphblas_cffi.py @@ -19,7 +19,10 @@ # Windows wheels.yml configures suitesparse.sh to install GraphBLAS to "C:\\GraphBLAS". graphblas_root = "C:\\GraphBLAS" if is_win else "/usr/local" -include_dirs = [os.path.join(graphblas_root, "include"), os.path.join(graphblas_root, "include", "suitesparse")] +include_dirs = [ + os.path.join(graphblas_root, "include"), + os.path.join(graphblas_root, "include", "suitesparse") +] library_dirs = [os.path.join(graphblas_root, "lib"), os.path.join(graphblas_root, "lib64")] if is_win: include_dirs.append(os.path.join(sys.prefix, "Library", "include")) From 9b27a84f529a360ff3a2825ca2ded25c2280e7f8 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 22:20:14 -0700 Subject: [PATCH 35/45] Linter --- build_graphblas_cffi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_graphblas_cffi.py b/build_graphblas_cffi.py index bfb8411..0ac8866 100644 --- a/build_graphblas_cffi.py +++ b/build_graphblas_cffi.py @@ -21,7 +21,7 @@ include_dirs = [ os.path.join(graphblas_root, "include"), - os.path.join(graphblas_root, "include", "suitesparse") + os.path.join(graphblas_root, "include", "suitesparse"), ] library_dirs = [os.path.join(graphblas_root, "lib"), os.path.join(graphblas_root, "lib64")] if is_win: From bb3ec655b406a9e84bbb631b7256ff0ca1abacd5 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 22:37:35 -0700 Subject: [PATCH 36/45] Support both suitesparse.sh and conda install paths --- build_graphblas_cffi.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build_graphblas_cffi.py b/build_graphblas_cffi.py index 0ac8866..7548102 100644 --- a/build_graphblas_cffi.py +++ b/build_graphblas_cffi.py @@ -17,7 +17,14 @@ if not graphblas_root: # Windows wheels.yml configures suitesparse.sh to install GraphBLAS to "C:\\GraphBLAS". - graphblas_root = "C:\\GraphBLAS" if is_win else "/usr/local" + if is_win: + graphblas_root = "C:\\GraphBLAS" + elif Path("/usr/local/include/suitesparse").exists(): + # SuiteSparse:GraphBLAS 9.1+ built by suitesparse.sh + graphblas_root = "/usr/local" + else: + # Conda install + graphblas_root = sys.prefix include_dirs = [ os.path.join(graphblas_root, "include"), From 50364241f0f7f2489eca69937dc85566f25d4807 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Sun, 2 Jun 2024 23:10:35 -0700 Subject: [PATCH 37/45] Fix cibw_test_skip typo --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index cdd3479..35b810d 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -93,7 +93,7 @@ jobs: - os: macos-14 cibw_archs: "arm64" # Silence warning for only Python 3.8, as per https://github.com/pypa/cibuildwheel/pull/1169 - cibw_skip: "cp38-macosx_*:arm64" + cibw_test_skip: "cp38-macosx_*:arm64" steps: - uses: actions/checkout@v4 From f211aedf9e01472811d37fe4b2af91c66be11352 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sat, 12 Oct 2024 11:58:35 +0200 Subject: [PATCH 38/45] Build with numpy 2; add Python 3.13; drop Python 3.8 --- .github/workflows/test.yml | 2 +- pyproject.toml | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8bbc36a..b79df03 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: source: ["conda-forge"] # os: ["ubuntu-latest"] # source: ["source"] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index 3a81b22..daeb1c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,10 +6,7 @@ requires = [ "wheel", "cffi>=1.11", "cython", - "oldest-supported-numpy; platform_python_implementation != 'PyPy'", - # Inspired by SciPy: unpin numpy version for PyPy builds, - # as oldest-supported-numpy does not take PyPy into account. - "numpy; platform_python_implementation=='PyPy'", + "numpy>=2.0", ] [project] @@ -17,7 +14,7 @@ name = "suitesparse-graphblas" dynamic = ["version"] description = "SuiteSparse:GraphBLAS Python bindings." readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" license = {file = "LICENSE"} authors = [ {name = "Erik Welch", email = "erik.n.welch@gmail.com"}, @@ -53,11 +50,11 @@ classifiers = [ "Operating System :: Microsoft :: Windows", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3 :: Only", "Intended Audience :: Developers", "Intended Audience :: Other Audience", @@ -96,7 +93,7 @@ dirty_template = "{tag}+{ccount}.g{sha}.dirty" [tool.black] line-length = 100 -target-version = ["py38", "py39", "py310", "py311", "py312"] +target-version = ["py39", "py310", "py311", "py312", "py313"] [tool.isort] sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"] From 1b2669aa4a22479874b2234977de40343cb3b6bf Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sat, 12 Oct 2024 12:08:13 +0200 Subject: [PATCH 39/45] Bump --- .pre-commit-config.yaml | 20 ++++++++++---------- pyproject.toml | 5 ++--- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4c89d2a..0565220 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ default_language_version: python: python3 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-ast @@ -20,7 +20,7 @@ repos: - id: mixed-line-ending # - id: trailing-whitespace - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.18 + rev: v0.20.2 hooks: - id: validate-pyproject name: Validate pyproject.toml @@ -34,29 +34,29 @@ repos: hooks: - id: isort - repo: https://github.com/asottile/pyupgrade - rev: v3.15.2 + rev: v3.18.0 hooks: - id: pyupgrade - args: [--py38-plus] + args: [--py39-plus] # - repo: https://github.com/MarcoGorelli/auto-walrus # rev: v0.2.2 # hooks: # - id: auto-walrus # args: [--line-length, "100"] - repo: https://github.com/psf/black - rev: 24.4.2 + rev: 24.10.0 hooks: - id: black # - id: black-jupyter - repo: https://github.com/PyCQA/flake8 - rev: 7.0.0 + rev: 7.1.1 hooks: - id: flake8 additional_dependencies: &flake8_dependencies # These versions need updated manually - - flake8==7.0.0 - - flake8-comprehensions==3.14.0 - - flake8-bugbear==24.4.26 + - flake8==7.1.1 + - flake8-comprehensions==3.15.0 + - flake8-bugbear==24.8.19 # - flake8-simplify==0.20.0 - repo: https://github.com/asottile/yesqa rev: v1.5.0 @@ -71,6 +71,6 @@ repos: # - id: pyroma # args: [-n, "10", .] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: no-commit-to-branch # no commit directly to main diff --git a/pyproject.toml b/pyproject.toml index daeb1c9..ecdb078 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,9 +65,8 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", ] dependencies = [ - # These are super-old; can/should we update them? - "cffi>=1.11", - "numpy>=1.19", + "cffi>=1.15", + "numpy>=1.23", ] [project.urls] homepage = "https://github.com/GraphBLAS/python-suitesparse-graphblas" From 9141d439860a27f612752b83e1bf86680c60984d Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sat, 12 Oct 2024 13:26:22 +0200 Subject: [PATCH 40/45] Try setuptools<74 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ecdb078..f85c0bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [build-system] build-backend = "setuptools.build_meta" requires = [ - "setuptools >=64", + "setuptools >=64, <74", "setuptools-git-versioning", "wheel", "cffi>=1.11", From bc10b6e64283275ef271eb1ec3096b97ccbfa621 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sat, 12 Oct 2024 13:50:39 +0200 Subject: [PATCH 41/45] experiment w/ setuptools as runtime dep --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index f85c0bf..eb8f37a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,6 +65,7 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", ] dependencies = [ + "setuptools >=64, <74", # XXX: experimenting "cffi>=1.15", "numpy>=1.23", ] From 8f04eaa5e99399fc9aeeb9ac57be17c619ee1f24 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sat, 12 Oct 2024 16:05:49 +0200 Subject: [PATCH 42/45] undo --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index eb8f37a..f85c0bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,6 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", ] dependencies = [ - "setuptools >=64, <74", # XXX: experimenting "cffi>=1.15", "numpy>=1.23", ] From 0447fda20362f589fbbc7c3e3647eaebfa87f7b0 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sun, 13 Oct 2024 10:34:19 +0200 Subject: [PATCH 43/45] Update cibuildwheel We need https://github.com/pypa/cibuildwheel/issues/1915 to `yum install` --- .github/workflows/wheels.yml | 2 +- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 35b810d..a22e8ea 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -147,7 +147,7 @@ jobs: brew fetch --retry libomp && brew reinstall libomp echo MACOSX_DEPLOYMENT_TARGET=$(otool -l $(brew --prefix libomp)/lib/libomp.dylib | grep minos | awk '{print $2}') >> $GITHUB_ENV - - uses: pypa/cibuildwheel@v2.18 + - uses: pypa/cibuildwheel@v2.21.3 with: output-dir: wheelhouse env: diff --git a/pyproject.toml b/pyproject.toml index f85c0bf..3a47125 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,7 @@ [build-system] build-backend = "setuptools.build_meta" requires = [ + # setuptools<74 until PyPy vendors cffi 1.15.1 "setuptools >=64, <74", "setuptools-git-versioning", "wheel", From 3653f5b23e2963e5a481d381e056377bf39472a8 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sun, 13 Oct 2024 21:55:04 +0200 Subject: [PATCH 44/45] Use cibuildwheel 2.21, not 2.21.3 --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index a22e8ea..175036f 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -147,7 +147,7 @@ jobs: brew fetch --retry libomp && brew reinstall libomp echo MACOSX_DEPLOYMENT_TARGET=$(otool -l $(brew --prefix libomp)/lib/libomp.dylib | grep minos | awk '{print $2}') >> $GITHUB_ENV - - uses: pypa/cibuildwheel@v2.21.3 + - uses: pypa/cibuildwheel@v2.21 with: output-dir: wheelhouse env: From 71c53ba3c85b49ad46c264afb05d03fa214ac97c Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Sun, 13 Oct 2024 21:55:42 +0200 Subject: [PATCH 45/45] Delete unnecessary code b/c we dropped Python 3.8 --- .github/workflows/wheels.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 175036f..2565b10 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -92,8 +92,6 @@ jobs: # Note: keep as old as possible as due to libomp this will be the oldest supported macOS version. - os: macos-14 cibw_archs: "arm64" - # Silence warning for only Python 3.8, as per https://github.com/pypa/cibuildwheel/pull/1169 - cibw_test_skip: "cp38-macosx_*:arm64" steps: - uses: actions/checkout@v4