numerics 0.1.0
Loading...
Searching...
No Matches
num::kernel::dense Namespace Reference

Functions

void ger (real alpha, const Vector &x, const Vector &y, Matrix &A, seq_t) noexcept
 Sequential rank-1 update: calls raw::ger (routes to cblas_dger when BLAS available; otherwise vectorizable row-update loop).
 
void ger (real alpha, const Vector &x, const Vector &y, Matrix &A, par_t)
 Parallel rank-1 update: OMP parallel-for over rows. Each row update A[i,:] += alpha*x[i]*y is independent.
 
void ger (real alpha, const Vector &x, const Vector &y, Matrix &A)
 Default policy.
 
void trsv_lower (const Matrix &L, const Vector &b, Vector &x)
 Forward substitution: solve Lx = b.
 
void trsv_upper (const Matrix &U, const Vector &b, Vector &x)
 Back substitution: solve Ux = b.
 

Function Documentation

◆ ger() [1/3]

void num::kernel::dense::ger ( real  alpha,
const Vector x,
const Vector y,
Matrix A 
)
inline

Default policy.

Definition at line 46 of file dense.hpp.

References ger().

◆ ger() [2/3]

void num::kernel::dense::ger ( real  alpha,
const Vector x,
const Vector y,
Matrix A,
par_t   
)

Parallel rank-1 update: OMP parallel-for over rows. Each row update A[i,:] += alpha*x[i]*y is independent.

Definition at line 25 of file dense.cpp.

References num::Matrix::data(), num::BasicVector< T >::data(), ger(), and num::BasicVector< T >::size().

◆ ger() [3/3]

void num::kernel::dense::ger ( real  alpha,
const Vector x,
const Vector y,
Matrix A,
seq_t   
)
noexcept

Sequential rank-1 update: calls raw::ger (routes to cblas_dger when BLAS available; otherwise vectorizable row-update loop).

A must be (x.size() x y.size()) row-major.

Definition at line 20 of file dense.cpp.

References num::kernel::raw::ger().

Referenced by ger(), and ger().

◆ trsv_lower()

void num::kernel::dense::trsv_lower ( const Matrix L,
const Vector b,
Vector x 
)

Forward substitution: solve Lx = b.

L must be square. x is allocated to L.rows() if x.size() != L.rows(). No policy parameter: the outer loop has a serial dependency. Dispatches to cblas_dtrsv via raw:: when NUMERICS_HAS_BLAS.

Definition at line 49 of file dense.cpp.

References num::Matrix::cols(), num::Matrix::data(), num::BasicVector< T >::data(), num::Matrix::rows(), num::BasicVector< T >::size(), and num::kernel::raw::trsv_lower().

◆ trsv_upper()

void num::kernel::dense::trsv_upper ( const Matrix U,
const Vector b,
Vector x 
)

Back substitution: solve Ux = b.

U must be square. x is allocated to U.rows() if x.size() != U.rows(). No policy parameter: serial outer dependency. Dispatches to cblas_dtrsv via raw:: when NUMERICS_HAS_BLAS.

Definition at line 64 of file dense.cpp.

References num::Matrix::cols(), num::Matrix::data(), num::BasicVector< T >::data(), num::Matrix::rows(), num::BasicVector< T >::size(), and num::kernel::raw::trsv_upper().