Matrix Type Interface
[Matrix Types]


Detailed Description

This interface defines the list of possible routines the library expects a matrix type may implement.


Files

file  matmodexport.h
 Declares prototypes for the 'standard' set of dynamically exportable methods stored in matrix type modules.

Default base names for shared methods.

typedef void(* oski_simple_funcpt )(void)
 Pointer to a function that takes no arguments and returns nothing.

Typedefs

typedef int(* oski_GetMatReprEntry_funcpt )(const void *mat, const oski_matcommon_t *props, oski_index_t row, oski_index_t col, oski_value_t *p_value)
 Matrix type-specific implementation of oski_GetMatEntry().
typedef int(* oski_SetMatReprEntry_funcpt )(void *mat, const oski_matcommon_t *props, oski_index_t row, oski_index_t col, oski_value_t new_val)
 Matrix type-specific implementation of oski_SetMatEntry().
typedef int(* oski_GetMatReprClique_funcpt )(const void *mat, const oski_matcommon_t *props, const oski_index_t *rows, oski_index_t num_rows, const oski_index_t *cols, oski_index_t num_cols, oski_vecview_t vals)
 Matrix type-specific implementation of oski_GetMatClique().
typedef int(* oski_SetMatReprClique_funcpt )(void *mat, const oski_matcommon_t *props, const oski_index_t *rows, oski_index_t num_rows, const oski_index_t *cols, oski_index_t num_cols, const oski_vecview_t vals)
 Matrix type-specific implementation of oski_SetMatClique().
typedef int(* oski_GetMatReprDiagValues_funcpt )(const void *mat, const oski_matcommon_t *props, oski_index_t diag_num, oski_vecview_t vals)
 Matrix type-specific implementation of oski_GetMatDiagValues().
typedef int(* oski_SetMatReprDiagValues_funcpt )(void *mat, const oski_matcommon_t *props, oski_index_t diag_num, const oski_vecview_t vals)
 Matrix type-specific implementation of oski_SetMatDiagValues().

Functions

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_toski_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.
int oski_MatReprMult (const void *A, const oski_matcommon_t *props, oski_matop_t opA, oski_value_t alpha, const oski_vecview_t x_view, oski_value_t beta, oski_vecview_t y_view)
 Matrix type-specific implementation of sparse matrix-vector multiply.
int oski_MatReprTrisolve (const void *T, const oski_matcommon_t *props, oski_matop_t opT, oski_value_t alpha, oski_vecview_t x_view)
 Matrix type specific implementation of oski_MatTrisolve().
int oski_MatReprTransMatReprMult (const void *A, const oski_matcommon_t *props, oski_ataop_t op, oski_value_t alpha, const oski_vecview_t x_view, oski_value_t beta, oski_vecview_t y_view, oski_vecview_t t_view)
 Matrix type specific implementation of oski_MatTransMatMult().
int oski_MatReprMultAndMatReprTransMult (const void *A, const oski_matcommon_t *props, oski_value_t alpha, const oski_vecview_t x_view, oski_value_t beta, oski_vecview_t y_view, oski_matop_t opA, oski_value_t omega, const oski_vecview_t w_view, oski_value_t zeta, oski_vecview_t z_view)
 Matrix type specific implementation of oski_MatMultAndMatTransMult().
int oski_MatReprPowMult (const void *A, const oski_matcommon_t *props, oski_matop_t opA, int power, oski_value_t alpha, const oski_vecview_t x_view, oski_value_t beta, oski_vecview_t y_view, oski_vecview_t T_view)
 Matrix type specific implementation of oski_MatPowMult().


Function Documentation

oski_matCSR_t* oski_ConvertMatReprToCSR const void *  mat,
const oski_matcommon_t props
 

Method: Convert to CSR format.

Parameters:
[in] mat Matrix type-specific representation in the current module's format.
[in] props Additional global properties of the matrix, mat.
Returns:
A CSR representation.
Precondition:
props != NULL
See also:
oski_CreateMatCSR, oski_CreateMatCSC, oski_ConvertMatReprToCSR_funcpt

void* oski_CopyMatRepr const void *  mat,
const oski_matcommon_t props
 

Method: Duplicate a matrix representation.

Note:
Ignores 'props'.

void* oski_CreateMatReprFromCSR const oski_matCSR_t mat,
const oski_matcommon_t props,
  ...
 

Method: Instantiate from an existing CSR representation.

  1. $\rho_c$: Block-column partitioning threshold.

Returns:
A pointer to a new oski_matVBR_t object containing the input matrix in VBR format, or NULL on error.

void oski_DestroyMatRepr void *  mat  ) 
 

Method: Destroy matrix type-specific representation.

If the underlying array representation is not shared, they are also freed.

Parameters:
[in,out] mat A oski_matCSR_t object.

int oski_MatReprMult const void *  pA,
const oski_matcommon_t props,
oski_matop_t  opA,
oski_value_t  alpha,
const oski_vecview_t  x_view,
oski_value_t  beta,
oski_vecview_t  y_view
 

Matrix type-specific implementation of sparse matrix-vector multiply.

Precondition:
All arguments have legal values and meet basic dimensionality compatibility requirements.
Note:
'props' is not required unless the matrix is stored using symmetric/Hermitian half-storage. Otherwise, the caller may set props to NULL.

int oski_MatReprMultAndMatReprTransMult const void *  pA,
const oski_matcommon_t props,
oski_value_t  alpha,
const oski_vecview_t  x_view,
oski_value_t  beta,
oski_vecview_t  y_view,
oski_matop_t  opA,
oski_value_t  omega,
const oski_vecview_t  w_view,
oski_value_t  zeta,
oski_vecview_t  z_view
 

Matrix type specific implementation of oski_MatMultAndMatTransMult().

Note:
'props' is not required unless the matrix is stored using symmetric/Hermitian half-storage. That is, the caller may set props to NULL.
Todo:
What to do here if either of these calls fails?

int oski_MatReprPowMult const void *  A,
const oski_matcommon_t props,
oski_matop_t  opA,
int  power,
oski_value_t  alpha,
const oski_vecview_t  x_view,
oski_value_t  beta,
oski_vecview_t  y_view,
oski_vecview_t  T_view
 

Matrix type specific implementation of oski_MatPowMult().

See also:
oski_MatPowMult, oski_MatReprPowMult_funcpt

int oski_MatReprTransMatReprMult const void *  pA,
const oski_matcommon_t props,
oski_ataop_t  opA,
oski_value_t  alpha,
const oski_vecview_t  x_view,
oski_value_t  beta,
oski_vecview_t  y_view,
oski_vecview_t  t_view
 

Matrix type specific implementation of oski_MatTransMatMult().

Note:
'props' is not required unless the matrix is stored using symmetric/Hermitian half-storage. That is, the caller may set props to NULL.

int oski_MatReprTrisolve const void *  pT,
const oski_matcommon_t props,
oski_matop_t  opT,
oski_value_t  alpha,
const oski_vecview_t  x_view
 

Matrix type specific implementation of oski_MatTrisolve().

Note:
'props' is not required unless the matrix is stored using symmetric/Hermitian half-storage. That is, the caller may set props to NULL.


Generated on Wed Sep 19 16:41:23 2007 for BeBOP Optimized Sparse Kernel Interface Library by  doxygen 1.4.6