Ensign
Low-rank framework for multi-core CPUs and GPUs
Loading...
Searching...
No Matches
lr.hpp File Reference

Provides two-factor (i.e. matrix) low-rank types and their operations. More...

Go to the source code of this file.

Classes

struct  Ensign::lr2< T >
 Class to store the low-rank factors (X, S, V) that are used in the computation. More...
 
struct  Ensign::orthogonalize
 Orthogonalizes Q and returns the corresponding upper triangular matrix R. More...
 

Namespaces

namespace  Ensign
 Core namespace for Ensign's numerical algorithms and data structures.
 

Functions

template<class T , class IP >
void Ensign::lr_add (T alpha, const lr2< T > &A, T beta, const lr2< T > &B, lr2< T > &out, IP inner_product_X, IP inner_product_V, const Ensign::Matrix::blas_ops &blas)
 Add two low-rank representations together.
 
template<class T , class IP >
void Ensign::lr_add (T alpha, const lr2< T > &A, T beta, const lr2< T > &B, T gamma, const lr2< T > &C, lr2< T > &out, IP inner_product_X, IP inner_product_V, const Ensign::Matrix::blas_ops &blas)
 Add three low-rank representations together.
 
template<class T , class IP >
void Ensign::lr_mul (const lr2< T > &A, const lr2< T > &B, lr2< T > &out, IP inner_product_X, IP inner_product_V, const Ensign::Matrix::blas_ops &blas)
 Multiplies two low-rank representations together.
 
template<class T >
void Ensign::lr_truncate (const lr2< T > &in, lr2< T > &out, const Ensign::Matrix::blas_ops &blas)
 Truncate a low-rank representation inplace to a fixed rank r.
 
template<class T >
double Ensign::lr_inner_product (const lr2< T > &A, const lr2< T > &B, T w, const Ensign::Matrix::blas_ops &blas)
 Computes the inner product of two low-rank representations.
 
template<class T >
double Ensign::lr_norm_sq (const lr2< T > &A, const Ensign::Matrix::blas_ops &blas)
 Computes the norm of a low-rank representations.
 
template<class T , class IP >
void Ensign::initialize (lr2< T > &lr, vector< const T * > X, vector< const T * > V, IP inner_product_X, IP inner_product_V, const Ensign::Matrix::blas_ops &blas)
 Initializes (an already allocated) lr2 to \(\sum_i X_i V_i\).
 
template<class T >
void Ensign::initialize (lr2< T > &lr, vector< const T * > X, vector< const T * > V, array< double, 3 > h_xx, array< double, 3 > h_vv, const Ensign::Matrix::blas_ops &blas)
 
template<class T >
std::function< T(T *, T *)> Ensign::inner_product_from_const_weight (T w, Index N)
 Return an inner product function object for use in, e.g., in gram_schmidt.
 
template<class T >
std::function< T(T *, T *)> Ensign::inner_product_from_weight (const T *w, Index N)
 Return an inner product function object for use in, e.g., in gram_schmidt.
 

Detailed Description

Provides two-factor (i.e. matrix) low-rank types and their operations.

Definition in file lr.hpp.