matpow.c File Reference

Sparse matrix-power-vector multiply implementation. More...

#include <oski/common.h>
#include <oski/matrix.h>
#include <oski/blas.h>

Functions

int oski_CheckArgsMatPowMult (const oski_matrix_t A_tunable, oski_matop_t opA, int power, oski_value_t alpha, const oski_vecview_t x_view, oski_value_t beta, const oski_vecview_t y_view, const oski_vecview_t T_view, const char *caller)
 Check arguments passed to oski_MatPowMult().
static void SplitVecsColwise (oski_vecview_t T, oski_index_t na, oski_vecview_t A, oski_vecview_t x, oski_index_t nb, oski_vecview_t B)
 Logically partition the columns of a multivector object into three.
static int DefaultMatPowMult (const oski_matrix_t A_tunable, 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)
 Default matrix-power-vector multiply routine.
int oski_MatPowMult (const oski_matrix_t A_tunable, 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)
 Computes a power of a matrix times a vector, or $y \leftarrow \alpha\cdot\mathrm{op}(A)^\rho x + \beta\cdot y$.
void oski_MakeArglistMatPowMult (oski_matop_t opA, int power, oski_value_t alpha, const oski_vecview_t x_view, oski_value_t beta, const oski_vecview_t y_view, const oski_vecview_t T_view, oski_traceargs_MatPowMult_t *args)
 Initialize a static argument signature for a call to oski_MatPowMult().


Detailed Description

Sparse matrix-power-vector multiply implementation.

This module implements the matrix type-independent version, which performs error-checking first and then calls the the appropriate kernel implementation.


Function Documentation

static int DefaultMatPowMult ( const oski_matrix_t  A_tunable,
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 
) [static]

Default matrix-power-vector multiply routine.

This routine does not perform any argument error checking. If T_view is NULL, this routine may quietly attempt to allocate memory for one temporary vector, deleted before returning.

References oski_vecstruct_t::colinc, ERR_BAD_ARG, ERR_OUT_OF_MEMORY, INVALID_VEC, LAYOUT_COLMAJ, oski_vecstruct_t::num_cols, oski_vecstruct_t::num_rows, oski_vecstruct_t::orient, oski_Free, oski_Malloc, oski_vecstruct_t::rowinc, SplitVecsColwise(), oski_vecstruct_t::stride, and oski_vecstruct_t::val.

Referenced by oski_MatPowMult().

int oski_CheckArgsMatPowMult ( const oski_matrix_t  A_tunable,
oski_matop_t  opA,
int  power,
oski_value_t  alpha,
const oski_vecview_t  x_view,
oski_value_t  beta,
const oski_vecview_t  y_view,
const oski_vecview_t  T_view,
const char *  caller 
)

Check arguments passed to oski_MatPowMult().

Returns:
0 if all arguments are OK, or an error code (plus a call to the error handler) otherwise.
Todo:
Need more verbose error messages in the event that the vectors have improper dimensions.

References ERR_BAD_ARG, ERR_BAD_MAT, ERR_BAD_VECVIEW, INVALID_MAT, INVALID_VEC, MACRO_TO_STRING, oski_vecstruct_t::num_cols, oski_matcommon_t::num_rows, oski_vecstruct_t::num_rows, OSKI_CHECK_MATOP, OSKI_ERR_BAD_MAT_MS, OSKI_ERR_BAD_MATOP_MS, OSKI_ERR_BAD_POWER_MS, OSKI_ERR_BAD_VEC_MS, OSKI_ERR_MAT_NOTSQUARE_MS, OSKI_ERR_VEC1_ONLY, OSKI_ERR_VEC_FEW_MS, OSKI_MATPROP_IS_SQUARE, and oski_matstruct_t::props.


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