librsb
1.3
|
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... | |
Typedefs | |
typedef rsb_flags_t | rsb_marf_t |
typedef rsb_flags_t | rsb_precf_t |
Type definitions | |
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 |
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) |
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)).
#define RSB_BOOL_FALSE 0 |
A "false" value for rsb_bool_t.
#define RSB_BOOL_TRUE 1 |
A "true" value for rsb_bool_t.
#define RSB_CHAR_BIT 8 /* bits per byte; if not 8, librsb compilation should fail */ |
#define RSB_DEFAULT_BLOCKING 1 |
A safe value for column blocking (reserved for future use).
#define RSB_DEFAULT_COL_BLOCKING 1 |
Reserved for future use.
#define RSB_DEFAULT_ROW_BLOCKING 1 |
Reserved for future use.
#define RSB_DO_FLAG_ADD | ( | V, | |
F | |||
) | (V) |= (F) |
The flag variable V
gets the logical OR value with flag F
.
#define RSB_DO_FLAG_DEL | ( | V, | |
F | |||
) | (V) &= ~(F) |
The flag variable V
gets the logical NAND value with flag F
.
#define RSB_DO_FLAG_FILTERONLY | ( | V, | |
F | |||
) | ((V) & (F)) |
The flag variable V
after logical AND value with flag F
.
#define RSB_DO_FLAG_FILTEROUT | ( | V, | |
F | |||
) | ((V) & ~(F)) |
The flag variable V
after logical NAND value with flag F
.
#define RSB_DO_FLAG_HAS | ( | V, | |
F | |||
) | ((((V)&(F))==(F))?RSB_BOOL_TRUE:RSB_BOOL_FALSE) |
Presence check for flag F
.
#define RSB_DO_FLAG_HAS_INTERSECTION | ( | V, | |
F | |||
) | (((V)&(F))?RSB_BOOL_TRUE:RSB_BOOL_FALSE) |
Presence check for flag F
.
#define RSB_ERR_BADARGS RSB_ERR_CAST(0x020) |
The user supplied corrupt or inconsistent data as argument.
#define RSB_ERR_CAST | ( | E | ) | (-(E)) |
A macro for the error code value.
#define RSB_ERR_CORRUPT_INPUT_DATA RSB_ERR_CAST(0x1000) |
User-supplied data (e.g.: from file) was corrupt.
#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.
#define RSB_ERR_ELEMENT_NOT_FOUND RSB_ERR_CAST(0x40000000) |
Element not found by rsb_mtx_get_vals() or rsb_mtx_set_vals().
#define RSB_ERR_ENOMEM RSB_ERR_CAST(0x040) |
There is not enough dynamical memory to perform the requested operation.
#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.
#define RSB_ERR_FORTRAN_ERROR RSB_ERR_GENERIC_ERROR |
A Fortran-specific error occurred.
#define RSB_ERR_GENERIC_ERROR RSB_ERR_CAST(0x001) |
An unspecified, generic error occurred.
#define RSB_ERR_INTERNAL_ERROR RSB_ERR_CAST(0x010) |
An error occurred which is not apparently caused by a user's fault (internal error).
#define RSB_ERR_INVALID_NUMERICAL_DATA RSB_ERR_CAST(0x10000) |
User gave some input with invalid numerical data.
#define RSB_ERR_LIMITS RSB_ERR_CAST(0x200) |
The requested operation could not be executed, or index overflow will happen.
#define RSB_ERR_MEMORY_LEAK RSB_ERR_CAST(0x20000) |
Probable memory leak (user did not deallocate librsb structures before calling rsb_lib_exit()).
#define RSB_ERR_NO_ERROR RSB_ERR_CAST(0x000) |
No error occurred (success). The return value that means function operation success, in most cases.
#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.
#define RSB_ERR_NO_USER_CONFIGURATION RSB_ERR_CAST(0x800) |
A file containing user set configuration was not present.
#define RSB_ERR_TO_PROGRAM_ERROR | ( | E | ) | ((E)==(RSB_ERR_NO_ERROR)?RSB_PROGRAM_SUCCESS:RSB_PROGRAM_ERROR) |
Program error code (int).
#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).
#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.
#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).
#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).
#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).
#define RSB_ERRS_UNSUPPORTED_FEATURES (RSB_ERR_UNSUPPORTED_FEATURE|RSB_ERR_NO_STREAM_OUTPUT_CONFIGURED_OUT) |
Collation of "unsupported" type errors.
#define rsb_file_mtx_get_dimensions rsb_file_mtx_get_dims |
#define rsb_file_mtx_render rsb_file_mtx_rndr |
#define RSB_FLAG_ASSEMBLED_IN_COO_ARRAYS 0x040000 |
If set, matrices will be fit in the three input coo arrays, after conversion.
#define RSB_FLAG_C_INDICES_INTERFACE 0x000000 |
If set, the input/output coordinate indices will be assumed to be 0 based (default).
#define RSB_FLAG_DEFAULT_COO_MATRIX_FLAGS RSB_FLAG_WANT_COO_STORAGE |
A flag combination specifying a pure COO matrix.
#define RSB_FLAG_DEFAULT_CSR_MATRIX_FLAGS RSB_FLAG_WANT_BCSS_STORAGE |
A flag combination specifying a pure CSR matrix.
#define RSB_FLAG_DEFAULT_MATRIX_FLAGS RSB_FLAG_DEFAULT_RSB_MATRIX_FLAGS |
A flag combination specifying a matrix in a default, supported format.
#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.
#define RSB_FLAG_DEFAULT_STORAGE_FLAGS (RSB_FLAG_WANT_BCSS_STORAGE|RSB_FLAG_WANT_COO_STORAGE) |
Default storage flags.
#define RSB_FLAG_DIAGONAL (RSB_FLAG_UPPER_TRIANGULAR | RSB_FLAG_LOWER_TRIANGULAR) |
Combined flags for a diagonal matrix.
#define RSB_FLAG_DISCARD_ZEROS 0x000400 |
If set, explicit zeros will not be inserted
#define RSB_FLAG_DUPLICATES_DEFAULT_HANDLE 0x000000 |
The default nonzeroes duplicates handling.
#define RSB_FLAG_DUPLICATES_KEEP_LAST 0x000000 |
Keep the last nonzero duplicate, at matrix assembly time.
#define RSB_FLAG_DUPLICATES_SUM 0x000200 |
Compute and keep the sum of nonzero duplicates, at matrix assembly time.
#define RSB_FLAG_EXPERIMENTAL_IN_PLACE_PERMUTATION_SORT 0x080000 |
#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.
#define RSB_FLAG_FORTRAN_INDICES_INTERFACE 0x000001 |
If set, the input/output coordinate indices will be assumed to be 1 based.
#define RSB_FLAG_HERMITIAN 0x800000 |
If set, the input matrix will be treated as symmetric hermitian (stored as a lower triangular one).
#define RSB_FLAG_IDENTICAL_FLAGS RSB_FLAG_NOFLAGS |
The identical flag (used in cloning function rsb_mtx_clone).
#define RSB_FLAG_LOWER 0x000010 |
If set, the matrix will be stored in as lower (triangular or symmetric).
#define RSB_FLAG_LOWER_HERMITIAN (RSB_FLAG_HERMITIAN | RSB_FLAG_LOWER) |
Combined flags for a lower hermitian matrix.
#define RSB_FLAG_LOWER_SYMMETRIC (RSB_FLAG_SYMMETRIC | RSB_FLAG_LOWER) |
Combined flags for a symmetric, lower-stored matrix.
#define RSB_FLAG_LOWER_TRIANGULAR (RSB_FLAG_TRIANGULAR | RSB_FLAG_LOWER) |
Combined flags for a lower triangular matrix.
#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).
#define RSB_FLAG_NOFLAGS 0x000000 |
The null (empty) flag.
#define RSB_FLAG_QUAD_PARTITIONING 0x002000 |
If set, matrix will be organized as a quad tree of submatrices.
#define RSB_FLAG_RECURSIVE_MORE_LEAVES_THAN_THREADS 0x1000000 |
If set, recursion on small matrices will last at least the number of active threads.
#define RSB_FLAG_RECURSIVE_SUBDIVIDE_MORE_ON_DIAG 0x8000000 |
If set, the matrix will be subdivided at a finer grain on diagonal blocks.
#define RSB_FLAG_SORTED_INPUT 0x000004 |
If set, the code will assume the input nonzeroes as sorted.
#define RSB_FLAG_SYMMETRIC 0x400000 |
If set, the input matrix will be treated as symmetric (stored as a lower triangular one by default).
#define RSB_FLAG_TRIANGULAR 0x000008 |
If set, the matrix is considered as triangular.
#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.
#define RSB_FLAG_UPPER 0x000020 |
If set, the matrix will be stored in as upper (triangular or symmetric).
#define RSB_FLAG_UPPER_HERMITIAN (RSB_FLAG_HERMITIAN | RSB_FLAG_UPPER) |
Combined flags for an upper hermitian matrix.
#define RSB_FLAG_UPPER_SYMMETRIC (RSB_FLAG_SYMMETRIC | RSB_FLAG_UPPER) |
Combined flags for a symmetric, upper-stored matrix.
#define RSB_FLAG_UPPER_TRIANGULAR (RSB_FLAG_TRIANGULAR | RSB_FLAG_UPPER) |
Combined flags for an upper triangular matrix.
#define RSB_FLAG_USE_CSR_RESERVED 0x200000 |
#define RSB_FLAG_USE_HALFWORD_INDICES 0x000002 |
If set, the matrix will internally use a half word (16 bit) type for indices.
#define RSB_FLAG_USE_HALFWORD_INDICES_COO (RSB_FLAG_USE_HALFWORD_INDICES|RSB_FLAG_WANT_COO_STORAGE) |
Combined flags for half word COO.
#define RSB_FLAG_USE_HALFWORD_INDICES_CSR (RSB_FLAG_USE_HALFWORD_INDICES|RSB_FLAG_USE_CSR_RESERVED) |
#define RSB_FLAG_WANT_BCSS_STORAGE 0x004000 |
If set, the block partitioning will be fixed (BCSS: BCSR or BCSC, but no VBR).
#define RSB_FLAG_WANT_COLUMN_MAJOR_ORDER 0x4000000 |
Used to specify multi-vector (dense matrix) operations.
#define RSB_FLAG_WANT_COO_STORAGE 0x000100 |
If set, the matrix will use COO storage, where necessary.
#define RSB_FLAG_WANT_ROW_MAJOR_ORDER 0x000000 |
Used to specify multi-vector (dense matrix) operations.
#define RSB_HALF_MAX_SIGNED | ( | T | ) | ((T)1 << (sizeof(T)*RSB_CHAR_BIT-2)) |
#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. */ |
#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.
#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.
#define RSB_IS_SIGNED | ( | T | ) | (((T)0) > (((T)-1))) |
#define RSB_MARF_EPS 0x00000030 |
rsb_marf_t Flag value for requesting an Encapsulated Postscript rendering of a matrix (spy plot + blocks).
#define RSB_MARF_EPS_B 0x00000020 |
rsb_marf_t Flag value for requesting an Encapsulated Postscript rendering of a matrix (blocks plot).
#define RSB_MARF_EPS_L 0x00000070 |
rsb_marf_t Flag value for requesting an Encapsulated Postscript rendering of a matrix (spy plot + blocks + labels).
#define RSB_MARF_EPS_S 0x00000010 |
rsb_marf_t Flag value for requesting an Encapsulated Postscript rendering of a matrix (spy plot).
#define RSB_MARF_RGB 0x00000001 |
rsb_marf_t Flag value for requesting an RGB rendering of a matrix.
#define RSB_MARKER_COO_VALUE (RSB_MAX_MATRIX_DIM+1) /* */ |
#define RSB_MARKER_NNZ_VALUE (RSB_MAX_MATRIX_NNZ+1) /* */ |
#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_MAX_SIGNED | ( | T | ) | (RSB_HALF_MAX_SIGNED(T) - 1 + RSB_HALF_MAX_SIGNED(T)) |
#define RSB_MAX_UNSIGNED | ( | T | ) | ((T)-1) |
#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_mtx_get_norm rsb_mtx_get_nrm |
#define rsb_mtx_get_preconditioner rsb_mtx_get_prec |
#define rsb_mtx_get_values rsb_mtx_get_vals |
#define rsb_mtx_set_values rsb_mtx_set_vals |
#define rsb_mtx_upd_values rsb_mtx_upd_vals |
#define RSB_NNZ_BLK_MAX 255 /* Dense block maximal allowed size (still unused, for now internal) */ |
#define RSB_NULL_EXIT_OPTIONS NULL |
A valid value for specifying default (null) options to rsb_lib_exit().
#define RSB_NULL_INIT_OPTIONS NULL |
A valid value for specifying default (null) options to rsb_lib_init().
#define RSB_PRECF_ILU0 0x00000001 |
ILU-0 preconditioner request to rsb_mtx_get_prec().
#define RSB_PROGRAM_ERROR (-1) |
Program error code (int).
#define RSB_PROGRAM_SUCCESS (0) |
Program success error code (int).
#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.
#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
.
#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.
#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.
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.
typedef rsb_flags_t rsb_bool_t |
A boolean type.
typedef char rsb_char_t |
A type for character strings.
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
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().
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.
typedef signed int rsb_int_t |
An integer type declaration for interface functions. Should always be 'int'.A signed integer type
typedef rsb_flags_t rsb_marf_t |
Matrix rendering flags (see marf_section for possible values).
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
typedef rsb_flags_t rsb_precf_t |
Basic preconditioner flags to be used with rsb_mtx_get_prec().
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.
typedef rsb_real_t rsb_time_t |
A floating point numerical type for time measurements with rsb_time().
typedef rsb_flags_t rsb_trans_t |
The type for specifying transposition (See matrix_transposition_flags_section)
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).