rsb.h File Reference

This file declares the user interface functions and data structures for the `librsb` library (see The librsb library interface (rsb.h, optional ones rsb.hpp and rsb.F90)). More...

## Data Structures

struct | rsb_initopts
| A structure specifying library (initialization) options, to be used with the rsb_lib_reinit() function. . More...

## Macros

#define | RSB_ERR_CAST(E) (-(E))
#define | RSB_ERR_NO_ERROR RSB_ERR_CAST(0x000)
#define | RSB_ERR_GENERIC_ERROR RSB_ERR_CAST(0x001)
#define | RSB_ERR_UNSUPPORTED_OPERATION RSB_ERR_CAST(0x002)
#define | RSB_ERR_UNSUPPORTED_TYPE RSB_ERR_CAST(0x004)
#define | RSB_ERR_UNSUPPORTED_FORMAT RSB_ERR_CAST(0x008)
#define | RSB_ERR_INTERNAL_ERROR RSB_ERR_CAST(0x010)
#define | RSB_ERR_BADARGS RSB_ERR_CAST(0x020)
#define | RSB_ERR_ENOMEM RSB_ERR_CAST(0x040)
#define | RSB_ERR_UNIMPLEMENTED_YET RSB_ERR_CAST(0x100)
#define | RSB_ERR_LIMITS RSB_ERR_CAST(0x200)
#define | RSB_ERR_FORTRAN_ERROR RSB_ERR_GENERIC_ERROR
#define | RSB_ERR_UNSUPPORTED_FEATURE RSB_ERR_CAST(0x400)
#define | RSB_ERR_NO_USER_CONFIGURATION RSB_ERR_CAST(0x800)
#define | RSB_ERR_CORRUPT_INPUT_DATA RSB_ERR_CAST(0x1000)
#define | RSB_ERR_FAILED_MEMHIER_DETECTION RSB_ERR_CAST(0x2000)
#define | RSB_ERR_COULD_NOT_HONOUR_EXTERNALLY_ALLOCATION_FLAGS RSB_ERR_CAST(0x4000)
#define | RSB_ERR_NO_STREAM_OUTPUT_CONFIGURED_OUT RSB_ERR_CAST(0x8000)
#define | RSB_ERR_INVALID_NUMERICAL_DATA RSB_ERR_CAST(0x10000)
#define | RSB_ERR_MEMORY_LEAK RSB_ERR_CAST(0x20000)
#define | RSB_ERR_ELEMENT_NOT_FOUND RSB_ERR_CAST(0x40000000)
#define | RSB_ERRS_UNSUPPORTED_FEATURES (RSB_ERR_UNSUPPORTED_FEATURE|RSB_ERR_NO_STREAM_OUTPUT_CONFIGURED_OUT)
#define | RSB_PROGRAM_SUCCESS (0)
#define | RSB_PROGRAM_ERROR (-1)
#define | RSB_ERR_TO_PROGRAM_ERROR(E) ((E)==(RSB_ERR_NO_ERROR)?RSB_PROGRAM_SUCCESS:RSB_PROGRAM_ERROR)
#define | RSB_REINIT_SINGLE_VALUE(IOF, IOP, IOS, ERRVAL) { enum rsb_opt_t keys[]={IOF}; void*values[]={(IOP)}; struct rsb_initopts io; io.action=(IOS); io.keys=keys; io.values=values; io.n_pairs=1; ERRVAL=rsb_lib_reinit(&io); }
#define | RSB_REINIT_SINGLE_VALUE_C_IOP(IOF, IOP, IOS, ERRVAL) { enum rsb_opt_t keys[]={IOF}; const void*values[]={(IOP)}; struct rsb_initopts io; io.action=(IOS); io.keys=keys; (io.values)=(void**)values; io.n_pairs=1; ERRVAL=rsb_lib_reinit(&io); }
#define | RSB_REINIT_SINGLE_VALUE_SET(IOF, IOP, ERRVAL) RSB_REINIT_SINGLE_VALUE(IOF,IOP,RSB_IO_SPECIFIER_SET,ERRVAL)
#define | RSB_REINIT_SINGLE_VALUE_GET(IOF, IOP, ERRVAL) RSB_REINIT_SINGLE_VALUE(IOF,IOP,RSB_IO_SPECIFIER_GET,ERRVAL)
#define | RSB_IO_SPECIFIER_GET 1
#define | RSB_IO_SPECIFIER_SET 0
#define | RSB_NULL_INIT_OPTIONS NULL
#define | RSB_NULL_EXIT_OPTIONS NULL
#define | rsb_mtx_get_norm rsb_mtx_get_nrm
#define | rsb_file_mtx_render rsb_file_mtx_rndr
#define | rsb_mtx_upd_values rsb_mtx_upd_vals
#define | RSB_PRECF_ILU0 0x00000001
#define | rsb_mtx_get_preconditioner rsb_mtx_get_prec
#define | rsb_mtx_set_values rsb_mtx_set_vals
#define | rsb_mtx_get_values rsb_mtx_get_vals
#define | rsb_file_mtx_get_dimensions rsb_file_mtx_get_dims
#define | RSB_SIZEOF(TYPE) RSB_NUMERICAL_TYPE_SIZE(TYPE)
Other constants
Other constants for some typedefs.
#define | RSB_BOOL_TRUE 1
#define | RSB_BOOL_FALSE 0
#define | RSB_DO_FLAG_ADD(V, F) (V) |= (F)
#define | RSB_DO_FLAG_DEL(V, F) (V) &= ~(F)
#define | RSB_DO_FLAG_FILTEROUT(V, F) ((V) & ~(F))
#define | RSB_DO_FLAG_FILTERONLY(V, F) ((V) & (F))
#define | RSB_DO_FLAG_HAS(V, F) ((((V)&(F))==(F))?RSB_BOOL_TRUE:RSB_BOOL_FALSE)
#define | RSB_DO_FLAG_HAS_INTERSECTION(V, F) (((V)&(F))?RSB_BOOL_TRUE:RSB_BOOL_FALSE)
#define | RSB_DEFAULT_ROW_BLOCKING 1
#define | RSB_DEFAULT_COL_BLOCKING 1
#define | RSB_DEFAULT_BLOCKING 1
#define | RSB_IS_SIGNED(T) (((T)0) > (((T)-1)))
#define | RSB_MAX_UNSIGNED(T) ((T)-1)
#define | RSB_CHAR_BIT 8 /* bits per byte; if not 8, librsb compilation should fail */
#define | RSB_HALF_MAX_SIGNED(T) ((T)1 << (sizeof(T)*RSB_CHAR_BIT-2))
#define | RSB_MAX_SIGNED(T) (RSB_HALF_MAX_SIGNED(T) - 1 + RSB_HALF_MAX_SIGNED(T))
#define | RSB_MAX_VALUE_FOR_TYPE(T) (RSB_IS_SIGNED(T)?RSB_MAX_SIGNED(T):RSB_MAX_UNSIGNED(T))
#define | RSB_MIN_MATRIX_DIM 0 /*!> Minimum allowed matrix dimension. */
#define | RSB_MIN_MATRIX_NNZ 0 /*!> Minimum allowed matrix nonzeroes count. */
#define | RSB_NNZ_BLK_MAX 255 /* Dense block maximal allowed size (still unused, for now internal) */
#define | RSB_MAX_MATRIX_DIM (RSB_MAX_VALUE_FOR_TYPE(rsb_coo_idx_t)-RSB_NNZ_BLK_MAX-255) /*!> Maximum allowed matrix dimension. */
#define | RSB_MAX_MATRIX_NNZ (RSB_MAX_VALUE_FOR_TYPE(rsb_nnz_idx_t)-RSB_NNZ_BLK_MAX) /*!> Maximum allowed matrix nonzeroes count. */
#define | RSB_MARKER_COO_VALUE (RSB_MAX_MATRIX_DIM+1) /* */
#define | RSB_MARKER_NNZ_VALUE (RSB_MAX_MATRIX_NNZ+1) /* */
#define | RSB_INVALID_COO_IDX_VAL ((RSB_MARKER_COO_VALUE)+1) /*< A value which is illegal for any #rsb_coo_idx_t variable. */
#define | RSB_INVALID_NNZ_IDX_VAL ((RSB_MARKER_NNZ_VALUE)+1) /*< A value which is illegal for any #rsb_nnz_idx_t variable. */
Matrix assembly flags
struct rsb_mtx_t declaration is in a separate, internal include file These are flags which could be combined to specify the assembly of sparse matrices and in various matrix-related operations. If unsure what flags to use to a function, RSB_FLAG_NOFLAGS shall be a good default in most cases.
#define | RSB_FLAG_DEFAULT_STORAGE_FLAGS (RSB_FLAG_WANT_BCSS_STORAGE|RSB_FLAG_WANT_COO_STORAGE)
#define | RSB_FLAG_DEFAULT_COO_MATRIX_FLAGS RSB_FLAG_WANT_COO_STORAGE
#define | RSB_FLAG_DEFAULT_CSR_MATRIX_FLAGS RSB_FLAG_WANT_BCSS_STORAGE
#define | RSB_FLAG_DEFAULT_RSB_MATRIX_FLAGS (RSB_FLAG_QUAD_PARTITIONING|RSB_FLAG_USE_HALFWORD_INDICES|RSB_FLAG_WANT_COO_STORAGE|RSB_FLAG_WANT_BCSS_STORAGE)
#define | RSB_FLAG_DEFAULT_MATRIX_FLAGS RSB_FLAG_DEFAULT_RSB_MATRIX_FLAGS
#define | RSB_FLAG_NOFLAGS 0x000000
#define | RSB_FLAG_IDENTICAL_FLAGS RSB_FLAG_NOFLAGS
#define | RSB_FLAG_FORTRAN_INDICES_INTERFACE 0x000001
#define | RSB_FLAG_C_INDICES_INTERFACE 0x000000
#define | RSB_FLAG_USE_HALFWORD_INDICES 0x000002
#define | RSB_FLAG_WANT_ROW_MAJOR_ORDER 0x000000
#define | RSB_FLAG_WANT_COLUMN_MAJOR_ORDER 0x4000000
#define | RSB_FLAG_SORTED_INPUT 0x000004
#define | RSB_FLAG_TRIANGULAR 0x000008
#define | RSB_FLAG_LOWER 0x000010
#define | RSB_FLAG_UPPER 0x000020
#define | RSB_FLAG_UNIT_DIAG_IMPLICIT 0x000040
#define | RSB_FLAG_WANT_COO_STORAGE 0x000100
#define | RSB_FLAG_DUPLICATES_KEEP_LAST 0x000000
#define | RSB_FLAG_DUPLICATES_DEFAULT_HANDLE 0x000000
#define | RSB_FLAG_DUPLICATES_SUM 0x000200
#define | RSB_FLAG_DISCARD_ZEROS 0x000400
#define | RSB_FLAG_QUAD_PARTITIONING 0x002000
#define | RSB_FLAG_WANT_BCSS_STORAGE 0x004000
#define | RSB_FLAG_ASSEMBLED_IN_COO_ARRAYS 0x040000
#define | RSB_FLAG_EXPERIMENTAL_IN_PLACE_PERMUTATION_SORT 0x080000
#define | RSB_FLAG_SYMMETRIC 0x400000
#define | RSB_FLAG_HERMITIAN 0x800000
#define | RSB_FLAG_RECURSIVE_MORE_LEAVES_THAN_THREADS 0x1000000
#define | RSB_FLAG_LOWER_HERMITIAN (RSB_FLAG_HERMITIAN | RSB_FLAG_LOWER)
#define | RSB_FLAG_UPPER_HERMITIAN (RSB_FLAG_HERMITIAN | RSB_FLAG_UPPER)
#define | RSB_FLAG_LOWER_TRIANGULAR (RSB_FLAG_TRIANGULAR | RSB_FLAG_LOWER)
#define | RSB_FLAG_UPPER_TRIANGULAR (RSB_FLAG_TRIANGULAR | RSB_FLAG_UPPER)
#define | RSB_FLAG_LOWER_SYMMETRIC (RSB_FLAG_SYMMETRIC | RSB_FLAG_LOWER)
#define | RSB_FLAG_DIAGONAL (RSB_FLAG_UPPER_TRIANGULAR | RSB_FLAG_LOWER_TRIANGULAR)
#define | RSB_FLAG_UPPER_SYMMETRIC (RSB_FLAG_SYMMETRIC | RSB_FLAG_UPPER)
#define | RSB_FLAG_RECURSIVE_SUBDIVIDE_MORE_ON_DIAG 0x8000000
#define | RSB_FLAG_EXTERNALLY_ALLOCATED_ARRAYS 0x40000000
#define | RSB_FLAG_USE_CSR_RESERVED 0x200000
#define | RSB_FLAG_USE_HALFWORD_INDICES_CSR (RSB_FLAG_USE_HALFWORD_INDICES|RSB_FLAG_USE_CSR_RESERVED)
#define | RSB_FLAG_USE_HALFWORD_INDICES_COO (RSB_FLAG_USE_HALFWORD_INDICES|RSB_FLAG_WANT_COO_STORAGE)
#define | RSB_FLAG_MUTUALLY_EXCLUSIVE_SWITCHES (RSB_FLAG_USE_HALFWORD_INDICES_COO|RSB_FLAG_USE_HALFWORD_INDICES_CSR)
Matrix rendering flags
These are flags which could be combined to specify rendering options to rsb_mtx_rndr and rsb_file_mtx_rndr.
#define | RSB_MARF_RGB 0x00000001
#define | RSB_MARF_EPS_S 0x00000010
#define | RSB_MARF_EPS_B 0x00000020
#define | RSB_MARF_EPS 0x00000030
#define | RSB_MARF_EPS_L 0x00000070

## Typedefs

typedef rsb_flags_t | rsb_marf_t
typedef rsb_flags_t | rsb_precf_t
Type definitions
These are definitions of `librsb` base types.
typedef signed int | rsb_blk_idx_t
typedef signed int | rsb_coo_idx_t
typedef signed int | rsb_nnz_idx_t
typedef signed int | rsb_flags_t
typedef char | rsb_type_t
typedef signed int | rsb_err_t
typedef signed int | rsb_int_t
typedef rsb_flags_t | rsb_bool_t
typedef rsb_flags_t | rsb_trans_t
typedef double | rsb_real_t
typedef char | rsb_char_t
typedef rsb_real_t | rsb_time_t

## Enumerations

enum

rsb_opt_t {
RSB_IO_WANT_VERBOSE_INIT =0x000001 , RSB_IO_WANT_VERBOSE_EXIT =0x000002 , RSB_IO_WANT_OUTPUT_STREAM =0x000003 , RSB_IO_WANT_SORT_METHOD =0x000004 ,
RSB_IO_WANT_CACHE_BLOCKING_METHOD =0x000005 , RSB_IO_WANT_SUBDIVISION_MULTIPLIER =0x000006 , RSB_IO_WANT_VERBOSE_ERRORS =0x000007 , RSB_IO_WANT_BOUNDED_BOX_COMPUTATION =0x000008 ,
RSB_IO_WANT_EXECUTING_THREADS =0x000009 , RSB_IO_WANT_EXTRA_VERBOSE_INTERFACE =0x000010 , RSB_IO_WANT_MEMORY_HIERARCHY_INFO_STRING =0x000011 , RSB_IO_WANT_IS_INITIALIZED_MARKER =0x000012 ,
RSB_IO_WANT_MEM_ALLOC_CNT =0x000013 , RSB_IO_WANT_MEM_ALLOC_TOT =0x000014 , RSB_IO_WANT_LEAF_LEVEL_MULTIVEC =0x000015 , RSB_IO_WANT_MAX_MEMORY_ALLOCATIONS =0x000016 ,
RSB_IO_WANT_MAX_MEMORY_ALLOCATED =0x000017 , RSB_IO_WANT_LIBRSB_ETIME =0x000018 , RSB_IO_WANT_VERBOSE_TUNING =0x000019
}

| library option values for rsb_lib_init, rsb_lib_set_opt_str, rsb_lib_reinit, rsb_lib_exit, rsb_lib_get_opt, rsb_lib_set_opt, or (deprecated) macros RSB_REINIT_SINGLE_VALUE_GET, RSB_REINIT_SINGLE_VALUE_SET, RSB_REINIT_SINGLE_VALUE, RSB_REINIT_SINGLE_VALUE_C_IOP.. More...
enum | rsb_extff_t { RSB_EXTF_NORM_ONE =0x00001001 , RSB_EXTF_NORM_TWO =0x00001002 , RSB_EXTF_NORM_INF =0x00001003 , RSB_EXTF_SUMS_ROW =0x00001004 , RSB_EXTF_SUMS_COL =0x00001005 , RSB_EXTF_ASUMS_ROW =0x00001006 , RSB_EXTF_ASUMS_COL =0x00001007 , RSB_EXTF_DIAG =0x00000004 }
| Extraction filter flags, to be used with rsb_mtx_get_nrm()/rsb_mtx_get_vec(). More...

enum

rsb_mif_t {
RSB_MIF_INDEX_STORAGE_IN_BYTES__TO__SIZE_T =0x00000001 , RSB_MIF_INDEX_STORAGE_IN_BYTES_PER_NNZ__TO__RSB_REAL_T =0x00000002 , RSB_MIF_MATRIX_ROWS__TO__RSB_COO_INDEX_T =0x00000004 , RSB_MIF_MATRIX_COLS__TO__RSB_COO_INDEX_T =0x00000008 ,
RSB_MIF_MATRIX_NNZ__TO__RSB_NNZ_INDEX_T =0x00000010 , RSB_MIF_TOTAL_SIZE__TO__SIZE_T =0x00000020 , RSB_MIF_MATRIX_FLAGS__TO__RSB_FLAGS_T =0x00000040 , RSB_MIF_MATRIX_TYPECODE__TO__RSB_TYPE_T =0x00000080 ,
RSB_MIF_MATRIX_INFO__TO__CHAR_P =0x00000100 , RSB_MIF_LEAVES_COUNT__TO__RSB_BLK_INDEX_T =0x00000200
}

| Flags for getting matrix information via rsb_mtx_get_info()/rsb_mtx_get_info_str(). More...
enum | rsb_elopf_t { RSB_ELOPF_MUL =0x00000001 , RSB_ELOPF_DIV =0x00000002 , RSB_ELOPF_POW =0x00000004 , RSB_ELOPF_NEG =0x00000008 , RSB_ELOPF_SCALE_ROWS =0x00000010 , RSB_ELOPF_SCALE_COLS =0x00000020 , RSB_ELOPF_SCALE_ROWS_REAL =0x00000040 , RSB_ELOPF_SCALE_COLS_REAL =0x00000080 }
| Flags for specifying a particular elemental/row-wise operation with rsb_mtx_upd_vals(). More...

## Functions

rsb_err_t | rsb_strerror_r (rsb_err_t errval, rsb_char_t *buf, size_t buflen)
rsb_err_t | rsb_perror (void *stream, rsb_err_t errval)
rsb_err_t | rsb_lib_init (struct rsb_initopts *iop)
rsb_err_t | rsb_lib_reinit (struct rsb_initopts *iop)
rsb_err_t | rsb_lib_set_opt_str (const rsb_char_t *opnp, const rsb_char_t *opvp)
rsb_err_t | rsb_lib_set_opt (enum rsb_opt_t iof, const void *iop)
rsb_err_t | rsb_lib_get_opt (enum rsb_opt_t iof, void *iop)
rsb_err_t | rsb_lib_exit (struct rsb_initopts *iop)
struct rsb_mtx_t * | rsb_mtx_alloc_from_coo_begin (rsb_nnz_idx_t nnzA, rsb_type_t typecode, rsb_coo_idx_t nrA, rsb_coo_idx_t ncA, rsb_flags_t flagsA, rsb_err_t *errvalp)
rsb_err_t | rsb_mtx_alloc_from_coo_end (struct rsb_mtx_t **mtxApp)
struct rsb_mtx_t * | rsb_mtx_alloc_from_csr_const (const void *VA, const rsb_coo_idx_t *RP, const rsb_coo_idx_t *JA, rsb_nnz_idx_t nnzA, rsb_type_t typecode, rsb_coo_idx_t nrA, rsb_coo_idx_t ncA, rsb_blk_idx_t brA, rsb_blk_idx_t bcA, rsb_flags_t flagsA, rsb_err_t *errvalp)
struct rsb_mtx_t * | rsb_mtx_alloc_from_csc_const (const void *VA, const rsb_coo_idx_t *IA, const rsb_coo_idx_t *CP, rsb_nnz_idx_t nnzA, rsb_type_t typecode, rsb_coo_idx_t nrA, rsb_coo_idx_t ncA, rsb_blk_idx_t brA, rsb_blk_idx_t bcA, rsb_flags_t flagsA, rsb_err_t *errvalp)
struct rsb_mtx_t * | rsb_mtx_alloc_from_csr_inplace (void *VA, rsb_nnz_idx_t *RP, rsb_coo_idx_t *JA, rsb_nnz_idx_t nnzA, rsb_type_t typecode, rsb_coo_idx_t nrA, rsb_coo_idx_t ncA, rsb_blk_idx_t brA, rsb_blk_idx_t bcA, rsb_flags_t flagsA, rsb_err_t *errvalp)
struct rsb_mtx_t * | rsb_mtx_alloc_from_coo_const (const void *VA, const rsb_coo_idx_t *IA, const rsb_coo_idx_t *JA, rsb_nnz_idx_t nnzA, rsb_type_t typecode, rsb_coo_idx_t nrA, rsb_coo_idx_t ncA, rsb_blk_idx_t brA, rsb_blk_idx_t bcA, rsb_flags_t flagsA, rsb_err_t *errvalp)
struct rsb_mtx_t * | rsb_mtx_alloc_from_coo_inplace (void *VA, rsb_coo_idx_t *IA, rsb_coo_idx_t *JA, rsb_nnz_idx_t nnzA, rsb_type_t typecode, rsb_coo_idx_t nrA, rsb_coo_idx_t ncA, rsb_blk_idx_t brA, rsb_blk_idx_t bcA, rsb_flags_t flagsA, rsb_err_t *errvalp)
rsb_err_t | rsb_mtx_clone (struct rsb_mtx_t **mtxBpp, rsb_type_t typecode, rsb_trans_t transA, const void *alphap, const struct rsb_mtx_t *mtxAp, rsb_flags_t flags)
struct rsb_mtx_t * | rsb_mtx_free (struct rsb_mtx_t *mtxAp)
rsb_err_t | rsb_mtx_get_nrm (const struct rsb_mtx_t *mtxAp, void *Np, enum rsb_extff_t flags)
rsb_err_t | rsb_mtx_get_vec (const struct rsb_mtx_t *mtxAp, void *Dp, enum rsb_extff_t flags)
rsb_err_t | rsb_mtx_rndr (const rsb_char_t *filename, const struct rsb_mtx_t *mtxAp, rsb_coo_idx_t pmWidth, rsb_coo_idx_t pmHeight, rsb_marf_t rflags)
rsb_err_t | rsb_file_mtx_rndr (void *pmp, const rsb_char_t *filename, rsb_coo_idx_t pmlWidth, rsb_coo_idx_t pmWidth, rsb_coo_idx_t pmHeight, rsb_marf_t rflags)
rsb_err_t | rsb_spmv (rsb_trans_t transA, const void *alphap, const struct rsb_mtx_t *mtxAp, const void *Xp, rsb_coo_idx_t incX, const void *betap, void *Yp, rsb_coo_idx_t incY)
rsb_err_t | rsb_spmm (rsb_trans_t transA, const void *alphap, const struct rsb_mtx_t *mtxAp, rsb_coo_idx_t nrhs, rsb_flags_t order, const void *Bp, rsb_nnz_idx_t ldB, const void *betap, void *Cp, rsb_nnz_idx_t ldC)
rsb_err_t | rsb_spsv (rsb_trans_t transT, const void *alphap, const struct rsb_mtx_t *mtxTp, const void *Xp, rsb_coo_idx_t incX, void *Yp, rsb_coo_idx_t incY)
rsb_err_t | rsb_spsm (rsb_trans_t transT, const void *alphap, const struct rsb_mtx_t *mtxTp, rsb_coo_idx_t nrhs, rsb_flags_t order, const void *betap, const void *Bp, rsb_nnz_idx_t ldB, void *Cp, rsb_nnz_idx_t ldC)
rsb_err_t | rsb_mtx_add_to_dense (const void *alphap, const struct rsb_mtx_t *mtxAp, rsb_nnz_idx_t ldB, rsb_nnz_idx_t nrB, rsb_nnz_idx_t ncB, rsb_bool_t rowmajorB, void *Bp)
struct rsb_mtx_t * | rsb_sppsp (rsb_type_t typecode, rsb_trans_t transA, const void *alphap, const struct rsb_mtx_t *mtxAp, rsb_trans_t transB, const void *betap, const struct rsb_mtx_t *mtxBp, rsb_err_t *errvalp)
struct rsb_mtx_t * | rsb_spmsp (rsb_type_t typecode, rsb_trans_t transA, const void *alphap, const struct rsb_mtx_t *mtxAp, rsb_trans_t transB, const void *betap, const struct rsb_mtx_t *mtxBp, rsb_err_t *errvalp)
rsb_err_t | rsb_spmsp_to_dense (rsb_type_t typecode, rsb_trans_t transA, const void *alphap, const struct rsb_mtx_t *mtxAp, rsb_trans_t transB, const void *betap, const struct rsb_mtx_t *mtxBp, rsb_nnz_idx_t ldC, rsb_nnz_idx_t nrC, rsb_nnz_idx_t ncC, rsb_bool_t rowmajorC, void *Cp)
rsb_err_t | rsb_mtx_switch_to_coo (struct rsb_mtx_t *mtxAp, void **VAp, rsb_coo_idx_t **IAp, rsb_coo_idx_t **JAp, rsb_flags_t flags)
rsb_err_t | rsb_mtx_switch_to_csr (struct rsb_mtx_t *mtxAp, void **VAp, rsb_coo_idx_t **IAp, rsb_coo_idx_t **JAp, rsb_flags_t flags)
rsb_err_t | rsb_mtx_get_coo (const struct rsb_mtx_t *mtxAp, void *VA, rsb_coo_idx_t *IA, rsb_coo_idx_t *JA, rsb_flags_t flags)
rsb_err_t | rsb_mtx_get_csr (rsb_type_t typecode, const struct rsb_mtx_t *mtxAp, void *VA, rsb_nnz_idx_t *RP, rsb_coo_idx_t *JA, rsb_flags_t flags)
rsb_err_t | rsb_mtx_get_rows_sparse (rsb_trans_t transA, const void *alphap, const struct rsb_mtx_t *mtxAp, void *VA, rsb_coo_idx_t *IA, rsb_coo_idx_t *JA, rsb_coo_idx_t frA, rsb_coo_idx_t lrA, rsb_nnz_idx_t *rnzp, rsb_flags_t flags)
rsb_err_t | rsb_mtx_get_coo_block (const struct rsb_mtx_t *mtxAp, void *VA, rsb_coo_idx_t *IA, rsb_coo_idx_t *JA, rsb_coo_idx_t frA, rsb_coo_idx_t lrA, rsb_coo_idx_t fcA, rsb_coo_idx_t lcA, const rsb_coo_idx_t *IREN, const rsb_coo_idx_t *JREN, rsb_nnz_idx_t *rnzp, rsb_flags_t flags)
rsb_err_t | rsb_mtx_get_info (const struct rsb_mtx_t *mtxAp, enum rsb_mif_t miflags, void *minfop)
rsb_err_t | rsb_mtx_get_info_str (const struct rsb_mtx_t *mtxAp, const rsb_char_t *mis, void *minfop, size_t buflen)
rsb_err_t | rsb_mtx_upd_vals (struct rsb_mtx_t *mtxAp, enum rsb_elopf_t elop_flags, const void *omegap)
rsb_err_t | rsb_mtx_get_prec (void *opdp, const struct rsb_mtx_t *mtxAp, rsb_precf_t prec_flags, const void *ipdp)
rsb_err_t | rsb_mtx_set_vals (struct rsb_mtx_t *mtxAp, const void *VA, const rsb_coo_idx_t *IA, const rsb_coo_idx_t *JA, rsb_nnz_idx_t nnz, rsb_flags_t flags)
rsb_err_t | rsb_mtx_get_vals (const struct rsb_mtx_t *mtxAp, void *VA, const rsb_coo_idx_t *IA, const rsb_coo_idx_t *JA, rsb_nnz_idx_t nnz, rsb_flags_t flags)
rsb_err_t | rsb_tune_spmm (struct rsb_mtx_t **mtxOpp, rsb_real_t *sfp, rsb_int_t *tnp, rsb_int_t maxr, rsb_time_t maxt, rsb_trans_t transA, const void *alphap, const struct rsb_mtx_t *mtxAp, rsb_coo_idx_t nrhs, rsb_flags_t order, const void *Bp, rsb_nnz_idx_t ldB, const void *betap, void *Cp, rsb_nnz_idx_t ldC)
rsb_err_t | rsb_tune_spsm (struct rsb_mtx_t **mtxOpp, rsb_real_t *sfp, rsb_int_t *tnp, rsb_int_t maxr, rsb_time_t maxt, rsb_trans_t transA, const void *alphap, const struct rsb_mtx_t *mtxAp, rsb_coo_idx_t nrhs, rsb_flags_t order, const void *Bp, rsb_nnz_idx_t ldB, const void *betap, void *Cp, rsb_nnz_idx_t ldC)
rsb_trans_t | rsb_psblas_trans_to_rsb_trans (const char psbtrans)
rsb_err_t | rsb_file_mtx_save (const struct rsb_mtx_t *mtxAp, const rsb_char_t *filename)
struct rsb_mtx_t * | rsb_file_mtx_load (const rsb_char_t *filename, rsb_flags_t flagsA, rsb_type_t typecode, rsb_err_t *errvalp)
rsb_err_t | rsb_file_vec_load (const rsb_char_t *filename, rsb_type_t typecode, void *Yp, rsb_coo_idx_t *yvlp)
rsb_err_t | rsb_file_vec_save (const rsb_char_t *filename, rsb_type_t typecode, const void *Yp, rsb_coo_idx_t yvl)
rsb_err_t | rsb_file_mtx_get_dims (const rsb_char_t *filename, rsb_coo_idx_t *nrp, rsb_coo_idx_t *ncp, rsb_coo_idx_t *nzp, rsb_flags_t *flagsp)
rsb_err_t | rsb_coo_sort (void *VA, rsb_coo_idx_t *IA, rsb_coo_idx_t *JA, rsb_nnz_idx_t nnzA, rsb_coo_idx_t nrA, rsb_coo_idx_t ncA, rsb_type_t typecode, rsb_flags_t flagsA)
rsb_err_t | rsb_coo_cleanup (rsb_coo_idx_t *nnzp, void *VA, rsb_coo_idx_t *IA, rsb_coo_idx_t *JA, rsb_nnz_idx_t nnzA, rsb_coo_idx_t nrA, rsb_coo_idx_t ncA, rsb_type_t typecode, rsb_flags_t flagsA)
rsb_time_t | rsb_time (void)

## Detailed Description

This file declares the user interface functions and data structures for the `librsb` library (see The librsb library interface (rsb.h, optional ones rsb.hpp and rsb.F90)).

Author
  Michele Martone

## Macro Definition Documentation

## RSB_BOOL_FALSE

#define RSB_BOOL_FALSE 0

A "false" value for rsb_bool_t.

## RSB_BOOL_TRUE

#define RSB_BOOL_TRUE 1

A "true" value for rsb_bool_t.

## RSB_CHAR_BIT

#define RSB_CHAR_BIT 8 /* bits per byte; if not 8, librsb compilation should fail */

## RSB_DEFAULT_BLOCKING

#define RSB_DEFAULT_BLOCKING 1

A safe value for column blocking (reserved for future use).

## RSB_DEFAULT_COL_BLOCKING

#define RSB_DEFAULT_COL_BLOCKING 1

Reserved for future use.

## RSB_DEFAULT_ROW_BLOCKING

#define RSB_DEFAULT_ROW_BLOCKING 1

Reserved for future use.

## RSB_DO_FLAG_ADD

#define RSB_DO_FLAG_ADD | ( |  | V,
|  |  | F
| ) |  | (V) |= (F)

The flag variable `V` gets the logical OR value with flag `F`.

## RSB_DO_FLAG_DEL

#define RSB_DO_FLAG_DEL | ( |  | V,
|  |  | F
| ) |  | (V) &= ~(F)

The flag variable `V` gets the logical NAND value with flag `F`.

## RSB_DO_FLAG_FILTERONLY

#define RSB_DO_FLAG_FILTERONLY | ( |  | V,
|  |  | F
| ) |  | ((V) & (F))

The flag variable `V` after logical AND value with flag `F`.

## RSB_DO_FLAG_FILTEROUT

#define RSB_DO_FLAG_FILTEROUT | ( |  | V,
|  |  | F
| ) |  | ((V) & ~(F))

The flag variable `V` after logical NAND value with flag `F`.

## RSB_DO_FLAG_HAS

#define RSB_DO_FLAG_HAS | ( |  | V,
|  |  | F
| ) |  | ((((V)&(F))==(F))?RSB_BOOL_TRUE:RSB_BOOL_FALSE)

Presence check for flag `F`.

## RSB_DO_FLAG_HAS_INTERSECTION

#define RSB_DO_FLAG_HAS_INTERSECTION | ( |  | V,
|  |  | F
| ) |  | (((V)&(F))?RSB_BOOL_TRUE:RSB_BOOL_FALSE)

Presence check for flag `F`.

## RSB_ERR_BADARGS

#define RSB_ERR_BADARGS RSB_ERR_CAST(0x020)

The user supplied corrupt or inconsistent data as argument.

## RSB_ERR_CAST

#define RSB_ERR_CAST | ( |  | E | ) | (-(E))

A macro for the error code value.

## RSB_ERR_CORRUPT_INPUT_DATA

#define RSB_ERR_CORRUPT_INPUT_DATA RSB_ERR_CAST(0x1000)

User-supplied data (e.g.: from file) was corrupt.

## RSB_ERR_COULD_NOT_HONOUR_EXTERNALLY_ALLOCATION_FLAGS

#define RSB_ERR_COULD_NOT_HONOUR_EXTERNALLY_ALLOCATION_FLAGS RSB_ERR_CAST(0x4000)

User gave flags for an in place assembly in a copy-based function.

## RSB_ERR_ELEMENT_NOT_FOUND

#define RSB_ERR_ELEMENT_NOT_FOUND RSB_ERR_CAST(0x40000000)

Element not found by rsb_mtx_get_vals() or rsb_mtx_set_vals().

## RSB_ERR_ENOMEM

#define RSB_ERR_ENOMEM RSB_ERR_CAST(0x040)

There is not enough dynamical memory to perform the requested operation.

## RSB_ERR_FAILED_MEMHIER_DETECTION

#define RSB_ERR_FAILED_MEMHIER_DETECTION RSB_ERR_CAST(0x2000)

Memory hierarchy info failed to be detected. You can bypass this by setting a meaningful `RSB_USER_SET_MEM_HIERARCHY_INFO` environment variable.

## RSB_ERR_FORTRAN_ERROR

#define RSB_ERR_FORTRAN_ERROR RSB_ERR_GENERIC_ERROR

A Fortran-specific error occurred.

## RSB_ERR_GENERIC_ERROR

#define RSB_ERR_GENERIC_ERROR RSB_ERR_CAST(0x001)

An unspecified, generic error occurred.

## RSB_ERR_INTERNAL_ERROR

#define RSB_ERR_INTERNAL_ERROR RSB_ERR_CAST(0x010)

An error occurred which is not apparently caused by a user's fault (internal error).

## RSB_ERR_INVALID_NUMERICAL_DATA

#define RSB_ERR_INVALID_NUMERICAL_DATA RSB_ERR_CAST(0x10000)

User gave some input with invalid numerical data.

## RSB_ERR_LIMITS

#define RSB_ERR_LIMITS RSB_ERR_CAST(0x200)

The requested operation could not be executed, or index overflow will happen.

## RSB_ERR_MEMORY_LEAK

#define RSB_ERR_MEMORY_LEAK RSB_ERR_CAST(0x20000)

Probable memory leak (user did not deallocate librsb structures before calling rsb_lib_exit()).

## RSB_ERR_NO_ERROR

#define RSB_ERR_NO_ERROR RSB_ERR_CAST(0x000)

No error occurred (success). The return value that means function operation success, in most cases.

## RSB_ERR_NO_STREAM_OUTPUT_CONFIGURED_OUT

#define RSB_ERR_NO_STREAM_OUTPUT_CONFIGURED_OUT RSB_ERR_CAST(0x8000)

User requested writing to a file stream, while this feature is configured out.

## RSB_ERR_NO_USER_CONFIGURATION

#define RSB_ERR_NO_USER_CONFIGURATION RSB_ERR_CAST(0x800)

A file containing user set configuration was not present.

## RSB_ERR_TO_PROGRAM_ERROR

#define RSB_ERR_TO_PROGRAM_ERROR | ( |  | E | ) | ((E)==(RSB_ERR_NO_ERROR)?RSB_PROGRAM_SUCCESS:RSB_PROGRAM_ERROR)

Program error code (int).

## RSB_ERR_UNIMPLEMENTED_YET

#define RSB_ERR_UNIMPLEMENTED_YET RSB_ERR_CAST(0x100)

The requested operation was not implemented yet in this code revision (but probably will be, someday).

## RSB_ERR_UNSUPPORTED_FEATURE

#define RSB_ERR_UNSUPPORTED_FEATURE RSB_ERR_CAST(0x400)

The requested feature is not available because it was opted out or not configured at build time.

## RSB_ERR_UNSUPPORTED_FORMAT

#define RSB_ERR_UNSUPPORTED_FORMAT RSB_ERR_CAST(0x008)

The user requested to use a matrix storage format which is not supported (e.g.: was opted out at build time).

## RSB_ERR_UNSUPPORTED_OPERATION

#define RSB_ERR_UNSUPPORTED_OPERATION RSB_ERR_CAST(0x002)

The user requested an operation which is not supported (e.g.: was opted out at build time).

## RSB_ERR_UNSUPPORTED_TYPE

#define RSB_ERR_UNSUPPORTED_TYPE RSB_ERR_CAST(0x004)

The user requested to use a type which is not supported (e.g.: was opted out at build time).

## RSB_ERRS_UNSUPPORTED_FEATURES

#define RSB_ERRS_UNSUPPORTED_FEATURES (RSB_ERR_UNSUPPORTED_FEATURE|RSB_ERR_NO_STREAM_OUTPUT_CONFIGURED_OUT)

Collation of "unsupported" type errors.

## rsb_file_mtx_get_dimensions

#define rsb_file_mtx_get_dimensions rsb_file_mtx_get_dims

Deprecated:
  rsb_file_mtx_get_dimensions has been deprecated: use rsb_file_mtx_get_dims.

## rsb_file_mtx_render

#define rsb_file_mtx_render rsb_file_mtx_rndr

Deprecated:
  rsb_file_mtx_render has been deprecated: use rsb_file_mtx_rndr.

## RSB_FLAG_ASSEMBLED_IN_COO_ARRAYS

#define RSB_FLAG_ASSEMBLED_IN_COO_ARRAYS 0x040000

If set, matrices will be fit in the three input coo arrays, after conversion.

## RSB_FLAG_C_INDICES_INTERFACE

#define RSB_FLAG_C_INDICES_INTERFACE 0x000000

If set, the input/output coordinate indices will be assumed to be 0 based (default).

## RSB_FLAG_DEFAULT_COO_MATRIX_FLAGS

#define RSB_FLAG_DEFAULT_COO_MATRIX_FLAGS RSB_FLAG_WANT_COO_STORAGE

A flag combination specifying a pure COO matrix.

## RSB_FLAG_DEFAULT_CSR_MATRIX_FLAGS

#define RSB_FLAG_DEFAULT_CSR_MATRIX_FLAGS RSB_FLAG_WANT_BCSS_STORAGE

A flag combination specifying a pure CSR matrix.

## RSB_FLAG_DEFAULT_MATRIX_FLAGS

#define RSB_FLAG_DEFAULT_MATRIX_FLAGS RSB_FLAG_DEFAULT_RSB_MATRIX_FLAGS

A flag combination specifying a matrix in a default, supported format.

## RSB_FLAG_DEFAULT_RSB_MATRIX_FLAGS

#define RSB_FLAG_DEFAULT_RSB_MATRIX_FLAGS (RSB_FLAG_QUAD_PARTITIONING|RSB_FLAG_USE_HALFWORD_INDICES|RSB_FLAG_WANT_COO_STORAGE|RSB_FLAG_WANT_BCSS_STORAGE)

A flag combination specifying a pure RSB matrix.

## RSB_FLAG_DEFAULT_STORAGE_FLAGS

#define RSB_FLAG_DEFAULT_STORAGE_FLAGS (RSB_FLAG_WANT_BCSS_STORAGE|RSB_FLAG_WANT_COO_STORAGE)

Default storage flags.

## RSB_FLAG_DIAGONAL

#define RSB_FLAG_DIAGONAL (RSB_FLAG_UPPER_TRIANGULAR | RSB_FLAG_LOWER_TRIANGULAR)

Combined flags for a diagonal matrix.

## RSB_FLAG_DISCARD_ZEROS

#define RSB_FLAG_DISCARD_ZEROS 0x000400

If set, explicit zeros will not be inserted

Warning
  : this flag is active by default

## RSB_FLAG_DUPLICATES_DEFAULT_HANDLE

#define RSB_FLAG_DUPLICATES_DEFAULT_HANDLE 0x000000

The default nonzeroes duplicates handling.

## RSB_FLAG_DUPLICATES_KEEP_LAST

#define RSB_FLAG_DUPLICATES_KEEP_LAST 0x000000

Keep the last nonzero duplicate, at matrix assembly time.

## RSB_FLAG_DUPLICATES_SUM

#define RSB_FLAG_DUPLICATES_SUM 0x000200

Compute and keep the sum of nonzero duplicates, at matrix assembly time.

## RSB_FLAG_EXPERIMENTAL_IN_PLACE_PERMUTATION_SORT

#define RSB_FLAG_EXPERIMENTAL_IN_PLACE_PERMUTATION_SORT 0x080000

## RSB_FLAG_EXTERNALLY_ALLOCATED_ARRAYS

#define RSB_FLAG_EXTERNALLY_ALLOCATED_ARRAYS 0x40000000

If set, the input COO arrays to the assembly functions will not be freed at matrix destruction time.

Warning
  Please do NOT use this flag, for the default memory allocation handling is still not specified. Instead, use the in place allocation functions: rsb_mtx_alloc_from_csr_inplace() and rsb_mtx_alloc_from_coo_inplace().

## RSB_FLAG_FORTRAN_INDICES_INTERFACE

#define RSB_FLAG_FORTRAN_INDICES_INTERFACE 0x000001

If set, the input/output coordinate indices will be assumed to be 1 based.

## RSB_FLAG_HERMITIAN

#define RSB_FLAG_HERMITIAN 0x800000

If set, the input matrix will be treated as symmetric hermitian (stored as a lower triangular one).

See also
  RSB_FLAG_LOWER,RSB_FLAG_LOWER.

## RSB_FLAG_IDENTICAL_FLAGS

#define RSB_FLAG_IDENTICAL_FLAGS RSB_FLAG_NOFLAGS

The identical flag (used in cloning function rsb_mtx_clone).

## RSB_FLAG_LOWER

#define RSB_FLAG_LOWER 0x000010

If set, the matrix will be stored in as lower (triangular or symmetric).

See also
  RSB_FLAG_TRIANGULAR,RSB_FLAG_SYMMETRIC,RSB_FLAG_UPPER.

## RSB_FLAG_LOWER_HERMITIAN

#define RSB_FLAG_LOWER_HERMITIAN (RSB_FLAG_HERMITIAN | RSB_FLAG_LOWER)

Combined flags for a lower hermitian matrix.

## RSB_FLAG_LOWER_SYMMETRIC

#define RSB_FLAG_LOWER_SYMMETRIC (RSB_FLAG_SYMMETRIC | RSB_FLAG_LOWER)

Combined flags for a symmetric, lower-stored matrix.

## RSB_FLAG_LOWER_TRIANGULAR

#define RSB_FLAG_LOWER_TRIANGULAR (RSB_FLAG_TRIANGULAR | RSB_FLAG_LOWER)

Combined flags for a lower triangular matrix.

## RSB_FLAG_MUTUALLY_EXCLUSIVE_SWITCHES

#define RSB_FLAG_MUTUALLY_EXCLUSIVE_SWITCHES (RSB_FLAG_USE_HALFWORD_INDICES_COO|RSB_FLAG_USE_HALFWORD_INDICES_CSR)

A combination of flags which is forbidden (so don't use it).

## RSB_FLAG_NOFLAGS

#define RSB_FLAG_NOFLAGS 0x000000

The null (empty) flag.

## RSB_FLAG_QUAD_PARTITIONING

#define RSB_FLAG_QUAD_PARTITIONING 0x002000

If set, matrix will be organized as a quad tree of submatrices.

## RSB_FLAG_RECURSIVE_MORE_LEAVES_THAN_THREADS

#define RSB_FLAG_RECURSIVE_MORE_LEAVES_THAN_THREADS 0x1000000

If set, recursion on small matrices will last at least the number of active threads.

## RSB_FLAG_RECURSIVE_SUBDIVIDE_MORE_ON_DIAG

#define RSB_FLAG_RECURSIVE_SUBDIVIDE_MORE_ON_DIAG 0x8000000

If set, the matrix will be subdivided at a finer grain on diagonal blocks.

## RSB_FLAG_SORTED_INPUT

#define RSB_FLAG_SORTED_INPUT 0x000004

If set, the code will assume the input nonzeroes as sorted.

## RSB_FLAG_SYMMETRIC

#define RSB_FLAG_SYMMETRIC 0x400000

If set, the input matrix will be treated as symmetric (stored as a lower triangular one by default).

See also
  RSB_FLAG_LOWER,RSB_FLAG_LOWER.

## RSB_FLAG_TRIANGULAR

#define RSB_FLAG_TRIANGULAR 0x000008

If set, the matrix is considered as triangular.

See also
  RSB_FLAG_LOWER,RSB_FLAG_UPPER.

## RSB_FLAG_UNIT_DIAG_IMPLICIT

#define RSB_FLAG_UNIT_DIAG_IMPLICIT 0x000040

If set, the (whole super-)matrix will not store the diagonal, which will be assumed to be unitary.

## RSB_FLAG_UPPER

#define RSB_FLAG_UPPER 0x000020

If set, the matrix will be stored in as upper (triangular or symmetric).

See also
  RSB_FLAG_LOWER

## RSB_FLAG_UPPER_HERMITIAN

#define RSB_FLAG_UPPER_HERMITIAN (RSB_FLAG_HERMITIAN | RSB_FLAG_UPPER)

Combined flags for an upper hermitian matrix.

## RSB_FLAG_UPPER_SYMMETRIC

#define RSB_FLAG_UPPER_SYMMETRIC (RSB_FLAG_SYMMETRIC | RSB_FLAG_UPPER)

Combined flags for a symmetric, upper-stored matrix.

## RSB_FLAG_UPPER_TRIANGULAR

#define RSB_FLAG_UPPER_TRIANGULAR (RSB_FLAG_TRIANGULAR | RSB_FLAG_UPPER)

Combined flags for an upper triangular matrix.

## RSB_FLAG_USE_CSR_RESERVED

#define RSB_FLAG_USE_CSR_RESERVED 0x200000

## RSB_FLAG_USE_HALFWORD_INDICES

#define RSB_FLAG_USE_HALFWORD_INDICES 0x000002

If set, the matrix will internally use a half word (16 bit) type for indices.

## RSB_FLAG_USE_HALFWORD_INDICES_COO

#define RSB_FLAG_USE_HALFWORD_INDICES_COO (RSB_FLAG_USE_HALFWORD_INDICES|RSB_FLAG_WANT_COO_STORAGE)

Combined flags for half word COO.

## RSB_FLAG_USE_HALFWORD_INDICES_CSR

#define RSB_FLAG_USE_HALFWORD_INDICES_CSR (RSB_FLAG_USE_HALFWORD_INDICES|RSB_FLAG_USE_CSR_RESERVED)

## RSB_FLAG_WANT_BCSS_STORAGE

#define RSB_FLAG_WANT_BCSS_STORAGE 0x004000

If set, the block partitioning will be fixed (BCSS: BCSR or BCSC, but no VBR).

## RSB_FLAG_WANT_COLUMN_MAJOR_ORDER

#define RSB_FLAG_WANT_COLUMN_MAJOR_ORDER 0x4000000

Used to specify multi-vector (dense matrix) operations.

## RSB_FLAG_WANT_COO_STORAGE

#define RSB_FLAG_WANT_COO_STORAGE 0x000100

If set, the matrix will use COO storage, where necessary.

## RSB_FLAG_WANT_ROW_MAJOR_ORDER

#define RSB_FLAG_WANT_ROW_MAJOR_ORDER 0x000000

Used to specify multi-vector (dense matrix) operations.

## RSB_HALF_MAX_SIGNED

#define RSB_HALF_MAX_SIGNED | ( |  | T | ) | ((T)1 << (sizeof(T)*RSB_CHAR_BIT-2))

## RSB_INVALID_COO_IDX_VAL

#define RSB_INVALID_COO_IDX_VAL ((RSB_MARKER_COO_VALUE)+1) /*< A value which is illegal for any #rsb_coo_idx_t variable. */

## RSB_INVALID_NNZ_IDX_VAL

#define RSB_INVALID_NNZ_IDX_VAL ((RSB_MARKER_NNZ_VALUE)+1) /*< A value which is illegal for any #rsb_nnz_idx_t variable. */

## RSB_IO_SPECIFIER_GET

#define RSB_IO_SPECIFIER_GET 1

Specifies to RSB_REINIT_SINGLE_VALUE that a given rsb_initopts is going to be get by the user.

## RSB_IO_SPECIFIER_SET

#define RSB_IO_SPECIFIER_SET 0

Specifies to RSB_REINIT_SINGLE_VALUE that a given rsb_initopts is going to be set by the user.

## RSB_IS_SIGNED

#define RSB_IS_SIGNED | ( |  | T | ) | (((T)0) > (((T)-1)))

## RSB_MARF_EPS

#define RSB_MARF_EPS 0x00000030

rsb_marf_t Flag value for requesting an Encapsulated Postscript rendering of a matrix (spy plot + blocks).

## RSB_MARF_EPS_B

#define RSB_MARF_EPS_B 0x00000020

rsb_marf_t Flag value for requesting an Encapsulated Postscript rendering of a matrix (blocks plot).

## RSB_MARF_EPS_L

#define RSB_MARF_EPS_L 0x00000070

rsb_marf_t Flag value for requesting an Encapsulated Postscript rendering of a matrix (spy plot + blocks + labels).

## RSB_MARF_EPS_S

#define RSB_MARF_EPS_S 0x00000010

rsb_marf_t Flag value for requesting an Encapsulated Postscript rendering of a matrix (spy plot).

## RSB_MARF_RGB

#define RSB_MARF_RGB 0x00000001

rsb_marf_t Flag value for requesting an RGB rendering of a matrix.

## RSB_MARKER_COO_VALUE

#define RSB_MARKER_COO_VALUE (RSB_MAX_MATRIX_DIM+1) /* */

## RSB_MARKER_NNZ_VALUE

#define RSB_MARKER_NNZ_VALUE (RSB_MAX_MATRIX_NNZ+1) /* */

## RSB_MAX_MATRIX_DIM

#define RSB_MAX_MATRIX_DIM (RSB_MAX_VALUE_FOR_TYPE(rsb_coo_idx_t)-RSB_NNZ_BLK_MAX-255) /*!> Maximum allowed matrix dimension. */

## RSB_MAX_MATRIX_NNZ

#define RSB_MAX_MATRIX_NNZ (RSB_MAX_VALUE_FOR_TYPE(rsb_nnz_idx_t)-RSB_NNZ_BLK_MAX) /*!> Maximum allowed matrix nonzeroes count. */

## RSB_MAX_SIGNED

#define RSB_MAX_SIGNED | ( |  | T | ) | (RSB_HALF_MAX_SIGNED(T) - 1 + RSB_HALF_MAX_SIGNED(T))

## RSB_MAX_UNSIGNED

#define RSB_MAX_UNSIGNED | ( |  | T | ) | ((T)-1)

## RSB_MAX_VALUE_FOR_TYPE

#define RSB_MAX_VALUE_FOR_TYPE | ( |  | T | ) | (RSB_IS_SIGNED(T)?RSB_MAX_SIGNED(T):RSB_MAX_UNSIGNED(T))

## RSB_MIN_MATRIX_DIM

#define RSB_MIN_MATRIX_DIM 0 /*!> Minimum allowed matrix dimension. */

## RSB_MIN_MATRIX_NNZ

#define RSB_MIN_MATRIX_NNZ 0 /*!> Minimum allowed matrix nonzeroes count. */

## rsb_mtx_get_norm

#define rsb_mtx_get_norm rsb_mtx_get_nrm

Deprecated:
  rsb_mtx_get_norm has been deprecated: use rsb_mtx_get_nrm .

## rsb_mtx_get_preconditioner

#define rsb_mtx_get_preconditioner rsb_mtx_get_prec

Deprecated:
  rsb_mtx_get_preconditioner has been deprecated: use rsb_mtx_get_prec.

## rsb_mtx_get_values

#define rsb_mtx_get_values rsb_mtx_get_vals

Deprecated:
  rsb_mtx_get_values has been deprecated: use rsb_mtx_get_vals.

## rsb_mtx_set_values

#define rsb_mtx_set_values rsb_mtx_set_vals

Deprecated:
  rsb_mtx_set_values has been deprecated: use rsb_mtx_set_vals.

## rsb_mtx_upd_values

#define rsb_mtx_upd_values rsb_mtx_upd_vals

Deprecated:
  rsb_mtx_upd_values has been deprecated: use rsb_mtx_upd_vals.

## RSB_NNZ_BLK_MAX

#define RSB_NNZ_BLK_MAX 255 /* Dense block maximal allowed size (still unused, for now internal) */

## RSB_NULL_EXIT_OPTIONS

#define RSB_NULL_EXIT_OPTIONS NULL

A valid value for specifying default (null) options to rsb_lib_exit().

## RSB_NULL_INIT_OPTIONS

#define RSB_NULL_INIT_OPTIONS NULL

A valid value for specifying default (null) options to rsb_lib_init().

## RSB_PRECF_ILU0

#define RSB_PRECF_ILU0 0x00000001

ILU-0 preconditioner request to rsb_mtx_get_prec().

## RSB_PROGRAM_ERROR

#define RSB_PROGRAM_ERROR (-1)

Program error code (int).

## RSB_PROGRAM_SUCCESS

#define RSB_PROGRAM_SUCCESS (0)

Program success error code (int).

## RSB_REINIT_SINGLE_VALUE

#define RSB_REINIT_SINGLE_VALUE | ( |  | IOF,
|  |  | IOP,
|  |  | IOS,
|  |  | ERRVAL
| ) |  | { enum rsb_opt_t keys[]={IOF}; void*values[]={(IOP)}; struct rsb_initopts io; io.action=(IOS); io.keys=keys; io.values=values; io.n_pairs=1; ERRVAL=rsb_lib_reinit(&io); }

A handy macro for invoking rsb_lib_reinit() with a single get/set specifier. An appropriate I/O flag is supplied as first parameter; a valid pointer (according to the flag) should be passed as second parameter; either RSB_IO_SPECIFIER_SET or RSB_IO_SPECIFIER_GET is passed as third parameter; a rsb_err_t variable as fourth one, in order to detect any error.

Deprecated:
  This macro has been deprecated and will be removed in a future version: use rsb_lib_set_opt or rsb_lib_get_opt instead.

## RSB_REINIT_SINGLE_VALUE_C_IOP

#define RSB_REINIT_SINGLE_VALUE_C_IOP | ( |  | IOF,
|  |  | IOP,
|  |  | IOS,
|  |  | ERRVAL
| ) |  | { enum rsb_opt_t keys[]={IOF}; const void*values[]={(IOP)}; struct rsb_initopts io; io.action=(IOS); io.keys=keys; (io.values)=(void**)values; io.n_pairs=1; ERRVAL=rsb_lib_reinit(&io); }

Like RSB_REINIT_SINGLE_VALUE, but considering `IOP` `const`.

Deprecated:
  This macro has been deprecated and will be removed in a future version: use rsb_lib_set_opt instead.

## RSB_REINIT_SINGLE_VALUE_GET

#define RSB_REINIT_SINGLE_VALUE_GET | ( |  | IOF,
|  |  | IOP,
|  |  | ERRVAL
| ) |  | RSB_REINIT_SINGLE_VALUE(IOF,IOP,RSB_IO_SPECIFIER_GET,ERRVAL)

A handy macro for invoking RSB_REINIT_SINGLE_VALUE with a single get specifier. An appropriate I/O flag is supplied as first parameter; a valid pointer (according to the flag) should be passed as second parameter; a rsb_err_t variable as third one, in order to detect any error.

Deprecated:
  This macro has been deprecated and will be removed in a future version: use rsb_lib_get_opt instead.

## RSB_REINIT_SINGLE_VALUE_SET

#define RSB_REINIT_SINGLE_VALUE_SET | ( |  | IOF,
|  |  | IOP,
|  |  | ERRVAL
| ) |  | RSB_REINIT_SINGLE_VALUE(IOF,IOP,RSB_IO_SPECIFIER_SET,ERRVAL)

A handy macro for invoking RSB_REINIT_SINGLE_VALUE with a single set specifier. An appropriate I/O flag is supplied as first parameter; a valid pointer (according to the flag) should be passed as second parameter; a rsb_err_t variable as third one, in order to detect any error.

Deprecated:
  This macro has been deprecated and will be removed in a future version: use rsb_lib_set_opt instead.

## Typedef Documentation

## rsb_blk_idx_t

typedef signed int rsb_blk_idx_t

The block arrays index type.

Could be an unsigned type. Should not overflow when indexing matrix blocks by block coordinates.

## rsb_bool_t

typedef rsb_flags_t rsb_bool_t

A boolean type.

## rsb_char_t

typedef char rsb_char_t

A type for character strings.

## rsb_coo_idx_t

typedef signed int rsb_coo_idx_t

The coordinate arrays index type.

Should not overflow when indexing matrix elements by coordinates. Legal values when specifying a matrix size should be within RSB_MIN_MATRIX_DIM and RSB_MAX_MATRIX_DIM

## rsb_err_t

typedef signed int rsb_err_t

A type specific for error flags. Should be >= 4 bytes.

A textual description of an error value may be obtained via rsb_strerror_r() or rsb_perror().

## rsb_flags_t

typedef signed int rsb_flags_t

A type for specifying matrix assembly or coordinate conversions option flags. Should be >= 4 bytes. See flags_section for possible values.

## rsb_int_t

typedef signed int rsb_int_t

An integer type declaration for interface functions. Should always be 'int'. A signed integer type

## rsb_marf_t

typedef rsb_flags_t rsb_marf_t

Matrix rendering flags (see marf_section for possible values).

## rsb_nnz_idx_t

typedef signed int rsb_nnz_idx_t

The nnz counter index type.

Should not overflow when indexing matrix elements. On most common archs sizeof(long)>=sizeof(int). Legal values when specifying a matrix size should be within RSB_MIN_MATRIX_NNZ and RSB_MAX_MATRIX_NNZ

## rsb_precf_t

typedef rsb_flags_t rsb_precf_t

Basic preconditioner flags to be used with rsb_mtx_get_prec().

## rsb_real_t

typedef double rsb_real_t

A floating point numerical type for certain functions e.g. rsb_tune_spmm. Not to be used for sparse matrices! For that, see matrix_type_symbols_section.

## rsb_time_t

typedef rsb_real_t rsb_time_t

A floating point numerical type for time measurements with rsb_time().

## rsb_trans_t

typedef rsb_flags_t rsb_trans_t

The type for specifying transposition (See matrix_transposition_flags_section)

## rsb_type_t

typedef char rsb_type_t

A type for specifying numerical type codes (See matrix_type_symbols_section for a list of valid values, corresponding to matrix_supported_numerical_types_section).