getset.c File Reference

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)


Detailed Description

MBCSR get/set value routines.


Function Documentation

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.

Parameters:
[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.

Parameters:
[in] A MBCSR submatrix.
[in] i Row index (0-based).
[in] j Column index (0-based).
Returns:
If the specified entry lies in the block diagonal, returns a pointer to the entry. Otherwise, returns NULL.

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.

Parameters:
[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 
)

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.

Parameters:
[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.


Generated on Fri Apr 8 22:35:19 2011 for BeBOP Optimized Sparse Kernel Interface Library by  doxygen 1.5.9