BeBOP Optimized Sparse Kernel Interface Library  1.0.1h
Functions

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

#include <oski/config.h>
#include <oski/common.h>
#include <oski/mattypes.h>
#include <oski/modloader.h>
#include <oski/MBCSR/format.h>
#include <oski/MBCSR/module.h>

Functions

const char * oski_GetShortDesc (void)
 Method: Returns a short string description of the module.
const char * oski_GetLongDesc (void)
 Method: Returns a "long" string description of the module.
void oski_InitModule (void)
 Method: Initialize the module.
void oski_CloseModule (void)
 Method: Shutdown the module.
void * MBCSR_GetSubmatKernel (const oski_submatMBCSR_t *A, const char *name)
 This routine loads the requested method if it exists, and caches the $r\times c$ module if it has not yet been loaded.
void MBCSR_InitSubVecView (const oski_vecview_t x, oski_index_t row_start, oski_index_t len, oski_vecview_t x_sub)
 Initializes the fields of an allocated vector view $x'$ to point to a subset of the rows of an existing view $x$.

Detailed Description

Modified block compressed sparse row (MBCSR) module.


Function Documentation

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

This routine loads the requested method if it exists, and caches the $r\times c$ module if it has not yet been loaded.

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 
)

Initializes the fields of an allocated vector view $x'$ to point to a subset of the rows of an existing view $x$.

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.