BeBOP Optimized Sparse Kernel Interface Library  1.0.1h
Functions

BCSR implementation of SpMV. More...

#include <assert.h>
#include <oski/config.h>
#include <oski/common.h>
#include <oski/blas.h>
#include <oski/blas_names.h>
#include <oski/modloader.h>
#include <oski/matrix.h>
#include <oski/BCSR/format.h>
#include <oski/BCSR/module.h>

Functions

static int MatMultDefault_Normal (const oski_matBCSR_t *A, oski_value_t alpha, const oski_vecview_t x_view, oski_vecview_t y_view)
 Performs $y \leftarrow y + \alpha A\cdot x$ on the fully blocked part of $A$.
static int MatMultDefault_Trans (const oski_matBCSR_t *A, oski_value_t alpha, const oski_vecview_t x_view, oski_vecview_t y_view)
 Performs $y \leftarrow y + \alpha A^T\cdot x$ on the fully blocked part of $A$.
static int MatMultDefault (const oski_matBCSR_t *A, oski_matop_t opA, oski_value_t alpha, const oski_vecview_t x_view, oski_vecview_t y_view)
 Default register blocked implementation in which the block multiply is replaced by a call to GEMV.
static int MatReprMultCore (const oski_matBCSR_t *A, oski_matop_t opA, oski_value_t alpha, const oski_vecview_t x_view, oski_vecview_t y_view)
 Performs $y \leftarrow y + \alpha\cdot \mathrm{op}(A)\cdot x$, using just the main stored portion of $A$, i.e., ignoring any implicit structure (diagonal).
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.

Detailed Description

BCSR implementation of SpMV.


Function Documentation

static int MatMultDefault ( const oski_matBCSR_t A,
oski_matop_t  opA,
oski_value_t  alpha,
const oski_vecview_t  x_view,
oski_vecview_t  y_view 
) [static]

Default register blocked implementation in which the block multiply is replaced by a call to GEMV.

This implementation is needed in case the user requests multiplication by a block size that is not available.

References tagBebop_matBCSR_t::col_block_size, ERR_NOT_IMPLEMENTED, MatMultDefault_Normal(), MatMultDefault_Trans(), OP_CONJ, OP_CONJ_TRANS, OP_NORMAL, OP_TRANS, oski_HandleError, and tagBebop_matBCSR_t::row_block_size.

Referenced by MatReprMultCore().

static int MatMultDefault_Normal ( const oski_matBCSR_t A,
oski_value_t  alpha,
const oski_vecview_t  x_view,
oski_vecview_t  y_view 
) [static]
static int MatMultDefault_Trans ( const oski_matBCSR_t A,
oski_value_t  alpha,
const oski_vecview_t  x_view,
oski_vecview_t  y_view 
) [static]
static int MatReprMultCore ( const oski_matBCSR_t A,
oski_matop_t  opA,
oski_value_t  alpha,
const oski_vecview_t  x_view,
oski_vecview_t  y_view 
) [static]

Performs $y \leftarrow y + \alpha\cdot \mathrm{op}(A)\cdot x$, using just the main stored portion of $A$, i.e., ignoring any implicit structure (diagonal).

This routine calls itself recursively to multiply by the leftover rows, adjusting the vectors accordingly.

References MatMultDefault(), oski_vecstruct_t::num_rows, OP_CONJ, OP_CONJ_TRANS, OP_NORMAL, OP_TRANS, oski_CopyMem, oski_vecstruct_t::rowinc, and oski_vecstruct_t::val.

Referenced by oski_MatReprMult().