Kernels (matrix type-independent implementations).
[Public Interface]


Functions

int oski_MatMultAndMatTransMult (const oski_matrix_t A_tunable, oski_value_t alpha, const oski_vecview_t x_view, oski_value_t beta, oski_vecview_t y_view, oski_matop_t opA, oski_value_t omega, const oski_vecview_t w_view, oski_value_t zeta, oski_vecview_t z_view)
 Computes $y \leftarrow \alpha\cdot Ax + \beta\cdot y$ and $z \leftarrow \omega\cdot\mathrm{op}(A)x + \zeta\cdot z$, where $\mathrm{op}(A) \in \{A, A^T, A^H\}$.
int oski_MatTransMatMult (const oski_matrix_t A_tunable, oski_ataop_t op, oski_value_t alpha, const oski_vecview_t x_view, oski_value_t beta, oski_vecview_t y_view, oski_vecview_t t_view)
 Computes $y \leftarrow \alpha\cdot\mathrm{op}(A)x + \beta\cdot y$, where $\mathrm{op}(A) \in \{AA^T, A^TA, AA^H, A^HA\}$.
int oski_MatMult (const oski_matrix_t A_tunable, oski_matop_t opA, oski_value_t alpha, const oski_vecview_t x_view, oski_value_t beta, oski_vecview_t y_view)
 Computes $y \leftarrow \alpha\cdot\mathrm{op}(A)x + \beta\cdot y$, where $\mathrm{op}(A) \in \{A, A^T, A^H\}$.
int oski_MatPowMult (const oski_matrix_t A_tunable, oski_matop_t opA, int power, oski_value_t alpha, const oski_vecview_t x_view, oski_value_t beta, oski_vecview_t y_view, oski_vecview_t T_view)
 Computes a power of a matrix times a vector, or $y \leftarrow \alpha\cdot\mathrm{op}(A)^\rho x + \beta\cdot y$.
int oski_MatTrisolve (const oski_matrix_t T_tunable, oski_matop_t opT, oski_value_t alpha, oski_vecview_t x_view)
 Computes $x \leftarrow \alpha\cdot\mathrm{op}(T^{-1})x$, where $T$ is a triangular matrix.


Function Documentation

int oski_MatMult const oski_matrix_t  A_tunable,
oski_matop_t  opA,
oski_value_t  alpha,
const oski_vecview_t  x_view,
oski_value_t  beta,
const oski_vecview_t  y_view
 

Computes $y \leftarrow \alpha\cdot\mathrm{op}(A)x + \beta\cdot y$, where $\mathrm{op}(A) \in \{A, A^T, A^H\}$.

Parameters:
[in] A_tunable Sparse matrix object, $A$.
[in] opA Specifies the transpose operation, $op(A)$.
[in] alpha Scalar multiplier, $\alpha$.
[in] x_view Vector view object, $x$.
[in] beta Scalar multiplier, $\beta$.
[in,out] y_view Vector view object, $y$.
Returns:
0 on success, or an error code.

int oski_MatMultAndMatTransMult const oski_matrix_t  A_tunable,
oski_value_t  alpha,
const oski_vecview_t  x_view,
oski_value_t  beta,
oski_vecview_t  y_view,
oski_matop_t  op,
oski_value_t  omega,
const oski_vecview_t  w_view,
oski_value_t  zeta,
oski_vecview_t  z_view
 

Computes $y \leftarrow \alpha\cdot Ax + \beta\cdot y$ and $z \leftarrow \omega\cdot\mathrm{op}(A)x + \zeta\cdot z$, where $\mathrm{op}(A) \in \{A, A^T, A^H\}$.

Parameters:
[in] A_tunable Sparse matrix object, $A$.
[in] op Specifies the transpose operation, $\mathrm{op}(A)$.
[in] alpha Scalar multiplier, $\alpha$.
[in] x_view Vector view object, $x$.
[in] beta Scalar multiplier, $\beta$.
[in] y_view Vector view object, $y$.
[in] omega Scalar multiplier, $\omega$.
[in] w_view Vector view object, $w$.
[in] zeta Scalar multiplier, $\zeta$.
[in] z_view Vector view object, $z$.
Returns:
0 on success, or an error code.

int oski_MatPowMult const oski_matrix_t  A_tunable,
oski_matop_t  opA,
int  power,
oski_value_t  alpha,
const oski_vecview_t  x_view,
oski_value_t  beta,
oski_vecview_t  y_view,
oski_vecview_t  T_view
 

Computes a power of a matrix times a vector, or $y \leftarrow \alpha\cdot\mathrm{op}(A)^\rho x + \beta\cdot y$.

Parameters:
[in] A_tunable The $m\times n$ matrix object $A$.
[in] opA Transpose option, $op(A)$.
[in] power Non-negative matrix power $k$.
[in] alpha Scalar multiplier $\alpha$.
[in] x_view Single vector object $x$.
[in] beta Scalar multiplier $\alpha$.
[in,out] y_view Single vector object $y$.
[in,out] T_view Multivector object $T$ consisting of $\max\{k-1,0\}$ column vectors in which to store intermediate results.
Returns:
Computes $y, T$ and returns 0 on success, or an error code otherwise.

int oski_MatTransMatMult const oski_matrix_t  A_tunable,
oski_ataop_t  op,
oski_value_t  alpha,
const oski_vecview_t  x_view,
oski_value_t  beta,
oski_vecview_t  y_view,
oski_vecview_t  t_view
 

Computes $y \leftarrow \alpha\cdot\mathrm{op}(A)x + \beta\cdot y$, where $\mathrm{op}(A) \in \{AA^T, A^TA, AA^H, A^HA\}$.

Parameters:
[in] A_tunable Sparse matrix object, $A$.
[in] op Specifies the transpose operation, $op(A)$.
[in] alpha Scalar multiplier, $\alpha$.
[in] x_view Vector view object, $x$.
[in] beta Scalar multiplier, $\beta$.
[in] y_view Vector view object, $y$.
[in] t_view Vector view object, $t$. The caller may set t_view == INVALID_VEC if no intermediate result is desired.
Returns:
0 on success, or an error code.

int oski_MatTrisolve const oski_matrix_t  T,
oski_matop_t  opT,
oski_value_t  alpha,
oski_vecview_t  x
 

Computes $x \leftarrow \alpha\cdot\mathrm{op}(T^{-1})x$, where $T$ is a triangular matrix.

Parameters:
[in] T_tunable Triangular sparse matrix object, $T$.
[in] opT Specifies the transpose operation, $op(T)$.
[in] alpha Scalar multiplier, $\alpha$.
[in,out] x_view Vector view object, $x$.
Returns:
0 on success, or an error code.
Todo:
For efficiency, this routine does not attempt to pre-scan the matrix data structure and ensure there are no zero diagonals. At least for CSR and CSC input matrices, we should add some kind of check somewhere (e.g., at matrix handle creation time). A similar to-do appears elsewhere in this source.


Generated on Wed Sep 19 16:41:24 2007 for BeBOP Optimized Sparse Kernel Interface Library by  doxygen 1.4.6