#include <oski/common.h>
#include <oski/config.h>
#include <oski/blas.h>
#include <oski/blas_names.h>
Functions | |
void | BLAS_xSCAL (const oski_index_t *restrict len, oski_value_t *restrict alpha, oski_value_t *restrict x, const oski_index_t *restrict stride) |
This implementation assumes a general (*alpha). | |
void | BLAS_xAXPY (const oski_index_t *restrict len, const oski_value_t *restrict alpha, const oski_value_t *restrict x, const oski_index_t *restrict incx, oski_value_t *restrict y, const oski_index_t *restrict incy) |
This implementation assumes a general (*alpha). | |
static void | ZeroDenseMatRowmaj (oski_value_t *x, oski_index_t m, oski_index_t n, oski_index_t stride) |
Set all elements of a dense matrix, stored using row-major layout, to 0. | |
static void | ZeroDenseMatColmaj (oski_value_t *x, oski_index_t m, oski_index_t n, oski_index_t stride) |
Set all elements of a dense matrix, stored using column-major layout, to 0. | |
int | oski_ZeroVecView (oski_vecview_t x) |
Set all elements of a vector view ![]() | |
int | oski_ScaleVecView (oski_vecview_t x, oski_value_t alpha) |
Computes ![]() | |
int | oski_RectScaledIdentityMult (oski_value_t alpha, const oski_vecview_t x, oski_vecview_t y) |
Computes ![]() ![]() ![]() ![]() ![]() | |
int | oski_AXPYVecView (const oski_vecview_t x, oski_value_t alpha, oski_vecview_t y) |
Computes ![]() | |
int | oski_ConjVecView (oski_vecview_t x) |
Computes the complex conjugate of a vector view, i.e., ![]() |
void BLAS_xAXPY | ( | const oski_index_t *restrict | len, | |
const oski_value_t *restrict | alpha, | |||
const oski_value_t *restrict | x, | |||
const oski_index_t *restrict | incx, | |||
oski_value_t *restrict | y, | |||
const oski_index_t *restrict | incy | |||
) |
This implementation assumes a general (*alpha).
The caller should implement special tests when alpha is a special value (e.g., 0, 1, -1).
Considers the following special cases:
References VAL_MAC.
void BLAS_xSCAL | ( | const oski_index_t *restrict | len, | |
oski_value_t *restrict | alpha, | |||
oski_value_t *restrict | x, | |||
const oski_index_t *restrict | stride | |||
) |
int oski_RectScaledIdentityMult | ( | oski_value_t | alpha, | |
const oski_vecview_t | x, | |||
oski_vecview_t | y | |||
) |
Computes , where
is an
matrix such that
for all
.
References oski_vecstruct_t::colinc, oski_vecstruct_t::num_cols, oski_vecstruct_t::num_rows, oski_vecstruct_t::orient, oski_vecstruct_t::rowinc, oski_vecstruct_t::stride, and oski_vecstruct_t::val.
int oski_ScaleVecView | ( | oski_vecview_t | x, | |
oski_value_t | alpha | |||
) |
Computes .
[in,out] | x | A valid vector view. |
[in] | alpha | Scalar multiplier. |
References ERR_NOT_IMPLEMENTED, IS_VAL_ONE, IS_VAL_ZERO, LAYOUT_COLMAJ, LAYOUT_ROWMAJ, oski_vecstruct_t::num_cols, oski_vecstruct_t::num_rows, oski_vecstruct_t::orient, OSKI_ERR_NOT_IMPLEMENTED, oski_vecstruct_t::stride, and oski_vecstruct_t::val.
int oski_ZeroVecView | ( | oski_vecview_t | x | ) |
Set all elements of a vector view to zero.
[in] | x | Valid vector view. |
References ERR_BAD_VECVIEW, INVALID_VEC, LAYOUT_COLMAJ, LAYOUT_ROWMAJ, oski_vecstruct_t::num_cols, oski_vecstruct_t::num_rows, oski_vecstruct_t::orient, OSKI_ERR_BAD_VEC, oski_vecstruct_t::stride, oski_vecstruct_t::val, ZeroDenseMatColmaj(), and ZeroDenseMatRowmaj().
static void ZeroDenseMatColmaj | ( | oski_value_t * | x, | |
oski_index_t | m, | |||
oski_index_t | n, | |||
oski_index_t | stride | |||
) | [static] |
Set all elements of a dense matrix, stored using column-major layout, to 0.
[in,out] | x | Array storing the matrix. |
[in] | m | Logical number of logical rows. |
[in] | n | Logical number of logical columns. |
[in] | stride | Leading-dimension. |
References oski_ZeroMem(), VAL_SET_ZERO, and VECCM_GET.
Referenced by oski_ZeroVecView().
static void ZeroDenseMatRowmaj | ( | oski_value_t * | x, | |
oski_index_t | m, | |||
oski_index_t | n, | |||
oski_index_t | stride | |||
) | [static] |
Set all elements of a dense matrix, stored using row-major layout, to 0.
[in,out] | x | Array storing the matrix. |
[in] | m | Logical number of logical rows. |
[in] | n | Logical number of logical columns. |
[in] | stride | Leading-dimension. |
References oski_ZeroMem(), VAL_SET_ZERO, and VECRM_GET.
Referenced by oski_ZeroVecView().