BeBOP Optimized Sparse Kernel Interface Library  1.0.1h
Defines | Functions
ata.c File Reference

Sparse $A^TA\cdot x$ implementation. More...

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

Defines

#define MatTransMatMultDefault   MANGLE_(MatTransMatMultDefault)
 Mangled name for default sparse $A^TA\cdot x$ implementation.

Functions

static int MatTransMatMultDefault (const oski_matrix_t A_tunable, oski_ataop_t op, oski_value_t alpha, const oski_vecview_t x, oski_value_t beta, oski_vecview_t y, oski_vecview_t t0)
 A default implementation of the sparse $A^TA\cdot x$ kernel based on multiple calls to sparse matrix-vector multiply.
int oski_CheckArgsMatTransMatMult (const oski_matrix_t A_tunable, oski_ataop_t op, 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 input arguments for a routine with a signature like oski_MatTransMatMult().
int oski_MatTransMatMult (const oski_matrix_t A_tunable, 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)
 Computes $y \leftarrow \alpha\cdot\mathrm{op}(A)x + \beta\cdot y$, where $\mathrm{op}(A) \in \{AA^T, A^TA, AA^H, A^HA\}$.
void oski_MakeArglistMatTransMatMult (oski_ataop_t op, 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_MatTransMatMult_t *args)
 Initialize a static argument signature for oski_MatTransMatMult.

Detailed Description

Sparse $A^TA\cdot x$ implementation.

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


Define Documentation

Mangled name for default sparse $A^TA\cdot x$ implementation.

Referenced by MatTransMatMultDefault(), and oski_MatTransMatMult().


Function Documentation

static int MatTransMatMultDefault ( const oski_matrix_t  A_tunable,
oski_ataop_t  op,
oski_value_t  alpha,
const oski_vecview_t  x,
oski_value_t  beta,
oski_vecview_t  y,
oski_vecview_t  t0 
) [static]

A default implementation of the sparse $A^TA\cdot x$ kernel based on multiple calls to sparse matrix-vector multiply.

This implementation provides a fall-back code in the event that no tuned implementation exists.

Precondition:
A_tunable != INVALID_VEC

References ERR_BAD_ARG, ERR_OUT_OF_MEMORY, INVALID_VEC, LAYOUT_COLMAJ, MatTransMatMultDefault, oski_matcommon_t::num_cols, oski_vecstruct_t::num_cols, oski_matcommon_t::num_rows, OP_A_AH, OP_A_AT, OP_AH_A, OP_AT_A, OP_CONJ_TRANS, OP_NORMAL, OP_TRANS, OSKI_ERR, OSKI_ERR_BAD_ATAOP, oski_Free, oski_Malloc, and oski_matstruct_t::props.

int oski_CheckArgsMatTransMatMult ( const oski_matrix_t  A_tunable,
oski_ataop_t  op,
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 input arguments for a routine with a signature like oski_MatTransMatMult().

Returns:
0 if all arguments are OK, or an error code (plus a call to the error handler) otherwise.

References ERR_BAD_ARG, ERR_BAD_MAT, ERR_BAD_VECVIEW, ERR_DIM_MISMATCH, INVALID_MAT, INVALID_VEC, MACRO_TO_STRING, OP_A_AH, OP_A_AT, OP_AH_A, OP_AT_A, OSKI_CHECK_ATAOP, OSKI_ERR_BAD_ATAOP_MS, OSKI_ERR_BAD_MAT_MS, OSKI_ERR_BAD_VEC_MS, OSKI_ERR_DIM_MISMATCH_OBJ_MS, OSKI_ERR_DIM_MISMATCH_TRANS_OBJ_MS, OSKI_MATMULT_COMPAT_OBJ_DIMS, OSKI_MATTRANSMULT_COMPAT_OBJ_DIMS, and oski_matstruct_t::props.