#include <math.h>
#include <string.h>
#include <oski/config.h>
#include <oski/common.h>
#include <oski/matrix.h>
#include <oski/CSR/module.h>
Functions | |
const char * | oski_GetShortDesc (void) |
Method: Returns a short string description of the module. | |
const char * | oski_GetLongDesc (void) |
Method: Returns a "long" string description of the module. | |
void | oski_InitModule (void) |
Method: Initialize the module. | |
void | oski_CloseModule (void) |
Method: Shutdown the module. | |
static int | CopyPointers (oski_matCSR_t *A, oski_copymode_t mode, oski_index_t *ptr, oski_index_t *ind, oski_value_t *val, oski_index_t m, oski_index_t index_base) |
Copy raw CSR representation to a concrete CSR matrix type representation. | |
static oski_index_t | CountDiagElems (const oski_index_t *ptr, const oski_index_t *ind, oski_index_t m, oski_index_t b) |
Returns the number of explicitly stored diagonal elements. | |
static void | SetCommonProps (oski_matcommon_t *out_props, const oski_index_t *ptr, const oski_index_t *ind, oski_index_t m, oski_index_t n, const oski_inmatpropset_t *props) |
Translate asserted properties of the input matrix into common properties of the output matrix. | |
static void | SetMatTypeProps (oski_matCSR_t *A_csr, const oski_matcommon_t *out_props, const oski_inmatpropset_t *props) |
Set CSR properties based on common properties and asserted input matrix properties. | |
oski_matCSR_t * | oski_WrapCSR (oski_matcommon_t *out_props, oski_index_t *Aptr, oski_index_t *Aind, oski_value_t *Aval, oski_index_t num_rows, oski_index_t num_cols, oski_inmatpropset_t *props, oski_copymode_t mode) |
Create a new CSR-specific wrapper around a raw CSR array representation. | |
void | oski_DestroyMatRepr (void *mat) |
Method: Destroy matrix type-specific representation. | |
void * | oski_CreateMatReprFromCSR (const oski_matCSR_t *mat, const oski_matcommon_t *props,...) |
Method: Instantiate from an existing CSR representation. | |
oski_matCSR_t * | oski_ConvertMatReprToCSR (const void *mat, const oski_matcommon_t *props) |
Method: Convert to CSR format. | |
void * | oski_CopyMatRepr (const void *mat, const oski_matcommon_t *props) |
Method: Duplicate a matrix representation. | |
double | oski_StreamMatRepr (const void *mat, const oski_matcommon_t *props) |
Stream through a matrix. | |
void | oski_ChangeIndexBase (oski_matCSR_t *A, const oski_matcommon_t *props, const oski_index_t new_base) |
Change the index base of a matrix. | |
double | oski_CalcMatRepr1Norm (const void *mat, const oski_matcommon_t *props) |
Method: Compute the 1-norm. | |
oski_index_t | oski_CountZeroRowsCSR (const oski_matCSR_t *A, const oski_matcommon_t *props) |
Returns the number of rows in a given CSR matrix that contain no structural non-zeros. |
|
Copy raw CSR representation to a concrete CSR matrix type representation.
|
|
Method: Compute the 1-norm.
|
|
Stream through a matrix. This routine streams through the matrix data structure, performs some dummy computations, and returns the results. We use this routine to help estimate the cost of a matrix-vector multiply operation on a given matrix without actually having to perform matrix-vector multiply. |
|
Create a new CSR-specific wrapper around a raw CSR array representation. If any of the asserted properties can be strengthened, then the parameter props (below) is changed accordingly. See oski_CheckCSR() for details.
Basic steps:
|
|
Translate asserted properties of the input matrix into common properties of the output matrix.
|
|
Set CSR properties based on common properties and asserted input matrix properties.
|