BeBOP Optimized Sparse Kernel Interface Library  1.0.1h
Defines | Typedefs | Functions

Modified block compressed sparse row (MBCSR) implementation. More...

#include <oski/matmodexport.h>
#include <oski/MBCSR/format.h>

Go to the source code of this file.

Defines

#define INC_OSKI_MBCSR_MODULE_H
 oski/MBCSR/module.h included.
Name mangling.
#define MBCSR_GetSubmatKernel   MANGLE_(MBCSR_GetSubmatKernel)
#define MBCSR_InitSubVecView   MANGLE_(MBCSR_InitSubVecView)
#define MBCSR_SubmatReprMult_funcpt   MANGLE_(MBCSR_SubmatReprMult_funcpt)
#define oski_EnableMBCSRMatMultAndMatMult   MANGLE_(oski_EnableMBCSRMatMultAndMatMult)
#define oski_EnableMBCSRMatMultAndMatTransMult   MANGLE_(oski_EnableMBCSRMatMultAndMatTransMult)
#define oski_EnableMBCSRMatTransMatMult   MANGLE_(oski_EnableMBCSRMatTransMatMult)
#define oski_EnableMBCSRMatPowMult   MANGLE_(oski_EnableMBCSRMatPowMult)
#define oski_EnableMBCSRMatTransPowMult   MANGLE_(oski_EnableMBCSRMatTransPowMult)

Typedefs

typedef int(* MBCSR_SubmatReprMult_funcpt )(const oski_submatMBCSR_t *A, oski_matop_t opA, oski_value_t alpha, const oski_vecview_t x_view, oski_vecview_t y_view)
 Function pointer to a core MBCSR matrix-vector multiply kernel.
typedef int(* MBCSR_SubmatReprTransSubmatReprMult_funcpt )(const oski_submatMBCSR_t *A, oski_value_t alpha, const oski_vecview_t x, oski_vecview_t y, oski_vecview_t t)
 Function pointer to a core MBCSR A^T*A*x kernel.
typedef int(* MBCSR_SymmSubmatReprMult_funcpt )(const oski_submatMBCSR_t *A, int is_herm, oski_matop_t opA, oski_value_t alpha, const oski_vecview_t x_view, oski_vecview_t y_view)
 Function pointer to a core MBCSR symmetric/Hermitian mat-vec.
typedef int(* MBCSR_SubmatReprTrisolve_funcpt )(const oski_submatMBCSR_t *T, int is_lower, oski_matop_t opT, oski_value_t alpha, oski_vecview_t x)
 Function pointer to a core MBCSR sparse triangular solve routine.
typedef int(* MBCSR_SubmatReprMultAndSubmatReprTransMult_funcpt )(const oski_submatMBCSR_t *A, oski_value_t alpha, const oski_vecview_t x, oski_vecview_t y, oski_matop_t opA, oski_value_t omega, const oski_vecview_t w, oski_vecview_t z)
 Function pointer to a core MBCSR $A$ and $\mathrm{op}(A)$ multiply routine.

Functions

void * MBCSR_GetSubmatKernel (const oski_submatMBCSR_t *A, const char *name)
 Returns a pointer to the requested submodule method.
void MBCSR_InitSubVecView (const oski_vecview_t x, oski_index_t row_start, oski_index_t len, oski_vecview_t x_sub)
 Returns a subset of the rows of a vector view.
Routines to enable/disable individual kernel implementations.
void oski_EnableMBCSRMatTransMatMult (oski_matMBCSR_t *A, int v)
void oski_EnableMBCSRMatMultAndMatMult (oski_matMBCSR_t *A, int v)
void oski_EnableMBCSRMatMultAndMatTransMult (oski_matMBCSR_t *A, int v)
void oski_EnableMBCSRMatPowMult (oski_matMBCSR_t *A, int v)
void oski_EnableMBCSRMatTransPowMult (oski_matMBCSR_t *A, int v)

Detailed Description

Modified block compressed sparse row (MBCSR) implementation.


Define Documentation


Function Documentation

void* MBCSR_GetSubmatKernel ( const oski_submatMBCSR_t A,
const char *  name 
)

Returns a pointer to the requested submodule method.

Returns a pointer to the requested submodule method.

Parameters:
[in]AAn $r\times c$ MBCSR matrix representation.
[in]nameName of the method to load from the $r\times c$ submodule.
Returns:
A pointer to the requested method, or NULL if none could be found.

References tagOski_submatMBCSR_t::c, tagOski_submatMBCSR_t::mod_cached, tagOski_submatMBCSR_t::mod_name, oski_Free, oski_LoadModule(), oski_LookupModuleMethod(), oski_StringPrintf(), and tagOski_submatMBCSR_t::r.

void MBCSR_InitSubVecView ( const oski_vecview_t  x,
oski_index_t  row_start,
oski_index_t  len,
oski_vecview_t  x_sub 
)

Returns a subset of the rows of a vector view.

Returns a subset of the rows of a vector view.

Parameters:
[in]xA vector view $x$.
[in]row_startRow offset in x (0-based).
[in]lenNumber of rows to select.
[in,out]x_subOutput view.
Precondition:
x_sub != INVALID_VEC. If x == INVALID_VEC, then x_sub is simply initialized to a zero vector.
Note:
This routine makes a shallow copy of the source vector view x, and so the caller should not destroy x_sub by a call to oski_DestroyVecView(). We recommend the caller allocate x_sub as a oski_vecstruct_t object on the stack.

References INVALID_VEC, oski_vecstruct_t::num_rows, oski_CopyMem, oski_ZeroMem(), oski_vecstruct_t::rowinc, and oski_vecstruct_t::val.