BeBOP Optimized Sparse Kernel Interface Library
1.0.1h
|
MBCSR get/set value routines. More...
#include <assert.h>
#include <stdio.h>
#include <oski/config.h>
#include <oski/common.h>
#include <oski/matrix.h>
#include <oski/getset.h>
#include <oski/CSR/format.h>
#include <oski/MBCSR/module.h>
Defines | |
#define | STORE_NORMAL 0 |
#define | STORE_CONJ 1 |
#define | STORE_SYMM 2 |
#define | STORE_HERM 3 |
Functions | |
static const oski_value_t * | GetBlockDiagEntryRaw (const oski_submatMBCSR_t *A, oski_index_t i, oski_index_t j) |
Returns a pointer to an entry in the diagonal block. | |
static const oski_value_t * | GetSubmatEntryRaw (const oski_submatMBCSR_t *A, oski_index_t i, oski_index_t j) |
Returns a pointer to an entry in an MBCSR submatrix, or NULL if no explicitly stored entry exists. | |
static int | GetBCSREntryRaw (const oski_matBCSR_t *A, oski_index_t i, oski_index_t j, oski_value_t *p_value) |
Returns an element from a given BCSR submatrix. | |
static int | SetBCSREntryRaw (oski_matBCSR_t *A, oski_index_t i, oski_index_t j, oski_value_t new_value) |
Sets an element from a given BCSR submatrix. | |
int | oski_GetMatReprEntry (const void *mat, const oski_matcommon_t *props, oski_index_t row, oski_index_t col, oski_value_t *p_value) |
static int | SetEntry (oski_matMBCSR_t *A, oski_index_t i0, oski_index_t j0, oski_value_t new_val, int store_mode) |
int | oski_SetMatReprEntry (void *mat, const oski_matcommon_t *props, oski_index_t row, oski_index_t col, oski_value_t new_val) |
MBCSR get/set value routines.
static int GetBCSREntryRaw | ( | const oski_matBCSR_t * | A, |
oski_index_t | i, | ||
oski_index_t | j, | ||
oski_value_t * | p_value | ||
) | [static] |
Returns an element from a given BCSR submatrix.
[in] | A | BCSR submatrix. |
[in] | i | Row index (0-based). |
[in] | j | Row index (0-based). |
[in,out] | p_value | Pointer to buffer into which value should be returned. |
References ERR_BAD_ARG, ERR_NOT_IMPLEMENTED, and OSKI_MATTYPE_METHOD.
static const oski_value_t* GetBlockDiagEntryRaw | ( | const oski_submatMBCSR_t * | A, |
oski_index_t | i, | ||
oski_index_t | j | ||
) | [static] |
Returns a pointer to an entry in the diagonal block.
[in] | A | MBCSR submatrix. |
[in] | i | Row index (0-based). |
[in] | j | Column index (0-based). |
References tagOski_submatMBCSR_t::bdiag, tagOski_submatMBCSR_t::num_block_rows, tagOski_submatMBCSR_t::offset, and tagOski_submatMBCSR_t::r.
Referenced by GetSubmatEntryRaw().
static const oski_value_t* GetSubmatEntryRaw | ( | const oski_submatMBCSR_t * | A, |
oski_index_t | i, | ||
oski_index_t | j | ||
) | [static] |
Returns a pointer to an entry in an MBCSR submatrix, or NULL if no explicitly stored entry exists.
[in] | A | MBCSR submatrix. |
[in] | i | Row index (0-based). |
[in] | j | Row index (0-based). |
References tagOski_submatMBCSR_t::bind, tagOski_submatMBCSR_t::bptr, tagOski_submatMBCSR_t::bval, tagOski_submatMBCSR_t::c, GetBlockDiagEntryRaw(), and tagOski_submatMBCSR_t::r.
int oski_SetMatReprEntry | ( | void * | mat, |
const oski_matcommon_t * | props, | ||
oski_index_t | row, | ||
oski_index_t | col, | ||
oski_value_t | new_val | ||
) |
References ERR_ZERO_ENTRY, oski_matcommon_t::is_herm, oski_matcommon_t::is_symm, oski_matcommon_t::is_tri_lower, oski_matcommon_t::is_tri_upper, oski_matcommon_t::pattern, STORE_HERM, STORE_SYMM, tagBebop_matMBCSR_t::stored, and VAL_CONJ.
static int SetBCSREntryRaw | ( | oski_matBCSR_t * | A, |
oski_index_t | i, | ||
oski_index_t | j, | ||
oski_value_t | new_value | ||
) | [static] |
Sets an element from a given BCSR submatrix.
[in] | A | BCSR submatrix. |
[in] | i | Row index (0-based). |
[in] | j | Row index (0-based). |
[in,out] | p_value | Pointer to buffer into which value should be returned. |
References ERR_BAD_ARG, ERR_NOT_IMPLEMENTED, and OSKI_MATTYPE_METHOD.