BeBOP Optimized Sparse Kernel Interface Library
1.0.1h
|
Multivector view module. More...
#include <oski/vector.h>
Go to the source code of this file.
Defines | |
#define | INC_OSKI_VECVIEW_H |
oski/vecview.h included. | |
#define | STRIDE_UNIT ((oski_index_t)1) |
Symbolic constant for "unit stride". | |
Name mangling. | |
#define | oski_vecview_t MANGLE_(oski_vecview_t) |
#define | SYMBOLIC_VEC MANGLE_(SYMBOLIC_VEC) |
#define | SYMBOLIC_MULTIVEC MANGLE_(SYMBOLIC_MULTIVEC) |
#define | oski_CreateVecView MANGLE_(oski_CreateVecView) |
#define | oski_CreateMultiVecView MANGLE_(oski_CreateMultiVecView) |
#define | oski_DestroyVecView MANGLE_(oski_DestroyVecView) |
#define | oski_CopyVecView MANGLE_(oski_CopyVecView) |
#define | oski_PrintDebugVecView MANGLE_(oski_PrintDebugVecView) |
#define | oski_CalcVecViewInfNorm MANGLE_(oski_CalcVecViewInfNorm) |
#define | oski_CalcVecViewInfNormDiff MANGLE_(oski_CalcVecViewInfNormDiff) |
#define | oski_InitSubVecView MANGLE_(oski_InitSubVecView) |
Typedefs | |
typedef oski_vecstruct_t * | oski_vecview_t |
Multivector view handle. | |
Functions | |
oski_vecview_t | oski_CreateVecView (oski_value_t *x, oski_index_t length, oski_index_t inc) |
Creates a valid view on a single dense column vector ![]() | |
oski_vecview_t | oski_CreateMultiVecView (oski_value_t *X, oski_index_t length, oski_index_t num_vecs, oski_storage_t orient, oski_index_t stride) |
Creates a multivector view on ![]() ![]() | |
int | oski_DestroyVecView (oski_vecview_t x) |
Destroy an existing vector view. | |
oski_vecview_t | oski_CopyVecView (const oski_vecview_t x) |
Creates a copy of the given (multi)vector view. | |
void | oski_PrintDebugVecView (const oski_vecview_t x, const char *val_fmt) |
Dump a vector view object to the debug log (FOR DEBUGGING ONLY). | |
double | oski_CalcVecViewInfNorm (const oski_vecview_t x, oski_index_t j) |
Compute the infinity norm of a specified column vector of a vector view. | |
double | oski_CalcVecViewInfNormDiff (const oski_vecview_t x0, oski_index_t j0, const oski_vecview_t x1, oski_index_t j1) |
Compute the infinity norm of the difference between two vectors. | |
int | oski_InitSubVecView (const oski_vecview_t x, oski_index_t i0, oski_index_t j0, oski_index_t R, oski_index_t C, oski_vecstruct_t *y) |
Given an ![]() ![]() ![]() | |
Variables | |
Symbolic vector views. | |
These constants are used by the hint routines (see Set explicit workload hints.). | |
const oski_vecview_t | SYMBOLIC_VEC |
Symbolic single-vector view. | |
const oski_vecview_t | SYMBOLIC_MULTIVEC |
Symbolic multiple-vector view. |
Multivector view module.
This module defines the basic single- and multivector view data structures.
#define INC_OSKI_VECVIEW_H |
oski/vecview.h included.
double oski_CalcVecViewInfNorm | ( | const oski_vecview_t | x, |
oski_index_t | j | ||
) |
Compute the infinity norm of a specified column vector of a vector view.
[in] | x | A valid vector view. |
[in] | j | Column for which to compute the infinity norm (in 1-based indices). |
References _IM, _RE, oski_vecstruct_t::colinc, ERR_BAD_ARG, INVALID_VEC, IS_VAL_IN_RANGE, oski_vecstruct_t::num_cols, OSKI_ERR_BAD_VEC, oski_HandleError, oski_vecstruct_t::rowinc, oski_vecstruct_t::val, and VAL_ASSIGN.
double oski_CalcVecViewInfNormDiff | ( | const oski_vecview_t | x0, |
oski_index_t | j0, | ||
const oski_vecview_t | x1, | ||
oski_index_t | j1 | ||
) |
Compute the infinity norm of the difference between two vectors.
[in] | x0 | A valid vector view. |
[in] | j0 | Column of x0 to use (1-based). |
[in] | x1 | A valid vector view. |
[in] | j1 | Column of x1 to use (1-based). |
References _IM, _RE, oski_vecstruct_t::colinc, ERR_BAD_ARG, INVALID_VEC, IS_VAL_IN_RANGE, MACRO_TO_STRING, oski_vecstruct_t::num_cols, oski_vecstruct_t::num_rows, OSKI_ERR_BAD_VEC, oski_HandleError, oski_vecstruct_t::rowinc, oski_vecstruct_t::val, VAL_ASSIGN, and VAL_DEC.
int oski_InitSubVecView | ( | const oski_vecview_t | x, |
oski_index_t | i, | ||
oski_index_t | j, | ||
oski_index_t | R, | ||
oski_index_t | C, | ||
oski_vecstruct_t * | y | ||
) |
Given an multivector object
, returns a shallow copy submatrix
.
[in] | x | The multivector object, ![]() |
[in] | i | Starting row (1-based index). |
[in] | j | Starting column (1-based index). |
[in] | R | Number of rows in the submatrix, or 0 to include all rows. |
[in] | C | Number of columns in the submatrix, or 0 to include all columns. |
[in,out] | y | Pointer to a structure in which to store the shallow copy of the submatrix. |
References oski_vecstruct_t::colinc, ERR_BAD_ARG, INVALID_VEC, MIN, oski_vecstruct_t::num_cols, oski_vecstruct_t::num_rows, oski_vecstruct_t::orient, OSKI_ERR_BAD_ROW, OSKI_ERR_BAD_VEC, oski_vecstruct_t::rowinc, oski_vecstruct_t::stride, and oski_vecstruct_t::val.
void oski_PrintDebugVecView | ( | const oski_vecview_t | x, |
const char * | val_fmt | ||
) |
Dump a vector view object to the debug log (FOR DEBUGGING ONLY).
[in] | x | Vector view object. |
[in] | val_fmt | Format string to use when displaying values. |
This format string MUST contain the following fields, in this order: "%f", "%c". That is, the implementation will print a single character to the right of the value. If val_mft is NULL, then the routines uses the default format of "%5.2f%c".
If oski_value_t is complex, then the format string must contain "%f", "%f", and "%c", to display the real and imaginary parts.
The extra fields are used to print special characters to distinguish between values of the logical matrix, and values lying in the "padding" when the stride is not equal to the matrix dimension.
References _IM, _RE, INVALID_VEC, LAYOUT_COLMAJ, LAYOUT_ROWMAJ, oski_vecstruct_t::num_cols, oski_vecstruct_t::num_rows, oski_vecstruct_t::orient, oski_PrintDebugMessage(), oski_PrintDebugMessageShort(), oski_vecstruct_t::stride, oski_vecstruct_t::val, VECCM_GET, VECRM_GET, and VECVIEW_GET.
Symbolic multiple-vector view.
const oski_vecview_t SYMBOLIC_VEC |
Symbolic single-vector view.