#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/CSR/module.h>
#include <oski/BDIAG1/format.h>
Defines | |
#define | STORE_SINGLE 0 |
Store specified element only. | |
#define | STORE_CONJ 1 |
Store the conjugate only. | |
#define | STORE_SYMM 2 |
Store element and its symmetric image. | |
#define | STORE_HERM 3 |
Store element and its Hermitian image. | |
Functions | |
static int | GetEntryRaw (const oski_matBDIAG1_t *A, oski_index_t i0, oski_index_t j0, oski_value_t *p_value) |
Reads a matrix entry. | |
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 | SetEntryRaw (oski_matBDIAG1_t *A, int store_op, oski_index_t i0, oski_index_t j0, oski_value_t new_val) |
Changes a matrix entry to a given value. | |
int | oski_SetMatReprEntry (void *mat, const oski_matcommon_t *props, oski_index_t row, oski_index_t col, oski_value_t new_val) |
static int GetEntryRaw | ( | const oski_matBDIAG1_t * | A, | |
oski_index_t | i0, | |||
oski_index_t | j0, | |||
oski_value_t * | p_value | |||
) | [static] |
Reads a matrix entry.
[in,out] | A | BDIAG1 matrix. Must be non-NULL. |
[in] | i0 | Row of element (0-based). |
[in] | j0 | Column of element (0-based). |
[in] | p_value | Pointer to buffer to store return value. Must be non-NULL. |
References oski_matBDIAG1_t::block_size, oski_matBDIAG1_t::diag, ERR_BAD_MAT, oski_matBDIAG1_t::num_full_blocks, oski_matBDIAG1_t::rem_block_size, VAL_ASSIGN, and VAL_SET_ZERO.
Referenced by oski_GetMatReprEntry().
int oski_GetMatReprEntry | ( | const void * | mat, | |
const oski_matcommon_t * | props, | |||
oski_index_t | row, | |||
oski_index_t | col, | |||
oski_value_t * | p_value | |||
) |
References ERR_BAD_ARG, GetEntryRaw(), MACRO_TO_STRING, and oski_HandleError.
int oski_SetMatReprEntry | ( | void * | mat, | |
const oski_matcommon_t * | props, | |||
oski_index_t | row, | |||
oski_index_t | col, | |||
oski_value_t | new_val | |||
) |
References oski_matcommon_t::is_herm, oski_matcommon_t::is_symm, OSKI_ERR_ZERO_ENTRY_COMPLEX, OSKI_ERR_ZERO_ENTRY_REAL, oski_matcommon_t::pattern, SetEntryRaw(), STORE_HERM, STORE_SINGLE, and STORE_SYMM.
static int SetEntryRaw | ( | oski_matBDIAG1_t * | A, | |
int | store_op, | |||
oski_index_t | i0, | |||
oski_index_t | j0, | |||
oski_value_t | new_val | |||
) | [static] |
Changes a matrix entry to a given value.
[in,out] | A | BDIAG1 matrix. Must be non-NULL. |
[in] | store_op | What to store: STORE_SINGLE, STORE_CONJ, STORE_SYMM, and STORE_HERM. |
[in] | i0 | Row of element (0-based). |
[in] | j0 | Column of element (0-based). |
[in] | new_val | New value. |
References oski_matBDIAG1_t::block_size, oski_matBDIAG1_t::diag, ERR_BAD_MAT, ERR_ZERO_ENTRY, oski_matBDIAG1_t::num_full_blocks, oski_matBDIAG1_t::rem_block_size, STORE_CONJ, STORE_HERM, STORE_SINGLE, STORE_SYMM, VAL_ASSIGN, and VAL_ASSIGN_CONJ.
Referenced by oski_SetMatReprEntry().