BeBOP Optimized Sparse Kernel Interface Library  1.0.1h
Functions

Compressed sparse column (CSC) implementation. More...

#include <oski/config.h>
#include <oski/common.h>
#include <oski/matrix.h>
#include <oski/CSC/format.h>
#include <oski/CSC/module.h>
#include <oski/CSR/module.h>
#include <oski/xforms_internal.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.
void oski_DestroyMatRepr (void *mat)
 Method: Destroy matrix type-specific representation.
void * oski_CopyMatRepr (const void *mat, const oski_matcommon_t *props)
 Method: Duplicate a matrix representation.
oski_matCSC_toski_WrapCSC (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)
 This routine wraps a oski_matCSC_t data structure around an existing, pre-assembled raw CSC 3-array representation.
void * oski_CreateMatReprFromCSR (const oski_matCSR_t *mat, const oski_matcommon_t *props,...)
 Method: Instantiate from an existing CSR representation.
oski_matCSR_toski_ConvertMatReprToCSR (const void *mat, const oski_matcommon_t *props)
 Method: Convert to CSR format.
int oski_CreateLuaMatReprFromCSR (lua_State *L)
 Matrix-type specific method to convert from a CSR matrix, with arguments passed on the Lua stack.

Detailed Description

Compressed sparse column (CSC) implementation.


Function Documentation

int oski_CreateLuaMatReprFromCSR ( lua_State *  L)

Matrix-type specific method to convert from a CSR matrix, with arguments passed on the Lua stack.

Matrix-type specific method to convert from a CSR matrix, with arguments passed on the Lua stack.

  1. Destination matrix type ('BCSR')
  2. Source matrix ('CSR')
  3. Row block size ('r')
  4. Column block size ('c')

Matrix-type specific method to convert from a CSR matrix, with arguments passed on the Lua stack.

  1. Destination matrix type ('MBCSR')
  2. Source matrix ('CSR')
  3. Row block size ('r')
  4. Column block size ('c')
oski_matCSC_t* oski_WrapCSC ( 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 
)

This routine wraps a oski_matCSC_t data structure around an existing, pre-assembled raw CSC 3-array representation.

Create a new CSC-specific wrapper around a raw CSC array representation.

If any of the asserted properties can be strengthened, then the parameter props (below) is changed accordingly. See oski_CheckCSR() for details.

Parameters:
[out]out_propsMatrix type-independent properties, derived from the input properties props.
[in]AptrRow pointers.
[in]AindColumn indices.
[in]AvalNon-zero values.
[in,out]propsSemantic properties of the matrix represented by
[in]num_rowsNumber of rows.
[in]num_colsNumber of columns. Aptr, Aind, and Aval.
[in]modeSpecify the copy mode for the returned representation.
Precondition:
All pointer arguments are non-NULL
num_rows, num_cols are non-negative
mode is a legal value.
See also:
oski_WrapCSC_funcpt
Returns:
A matrix type-specific representation of the input matrix, or NULL on error.

References oski_matCSC_t::mat_trans, oski_DestroyMatRepr, OSKI_ERR_NOT_IMPLEMENTED, oski_Malloc, OSKI_MATTYPE_METHOD, and oski_inmatpropset_t::pattern.