Ensign
Low-rank framework for multi-core CPUs and GPUs
Loading...
Searching...
No Matches
Ensign::lr2< T > Struct Template Reference

Class to store the low-rank factors (X, S, V) that are used in the computation. More...

#include <lr.hpp>

Public Member Functions

 lr2 (stloc sl=stloc::host)
 
 lr2 (Index r, array< Index, 2 > N, stloc sl=stloc::host)
 
 lr2 (Index r, Index r_max, array< Index, 2 > N, stloc sl=stloc::host)
 
void resize (Index r, array< Index, 2 > N)
 
void update_info (Index r)
 
Index size_X () const
 
Index size_V () const
 
Index rank () const
 
void set_zero ()
 
multi_array< T, 2 > full (const Ensign::Matrix::blas_ops &blas) const
 Computes the full matrix (can be very expensive and should not be used in production code)
 

Public Attributes

multi_array< T, 2 > S
 
multi_array< T, 2 > X
 
multi_array< T, 2 > V
 

Detailed Description

template<class T>
struct Ensign::lr2< T >

Class to store the low-rank factors (X, S, V) that are used in the computation.

The low-rank factors can reside either on the host (CPU) or the device (GPU) depending on the value of stloc (either stloc::host or stloc::device).

Definition at line 21 of file lr.hpp.

Constructor & Destructor Documentation

◆ lr2() [1/3]

template<class T >
Ensign::lr2< T >::lr2 ( stloc  sl = stloc::host)
inline

Definition at line 26 of file lr.hpp.

◆ lr2() [2/3]

template<class T >
Ensign::lr2< T >::lr2 ( Index  r,
array< Index, 2 >  N,
stloc  sl = stloc::host 
)
inline

Definition at line 28 of file lr.hpp.

◆ lr2() [3/3]

template<class T >
Ensign::lr2< T >::lr2 ( Index  r,
Index  r_max,
array< Index, 2 >  N,
stloc  sl = stloc::host 
)
inline

Definition at line 30 of file lr.hpp.

Member Function Documentation

◆ full()

template<class T >
multi_array< T, 2 > Ensign::lr2< T >::full ( const Ensign::Matrix::blas_ops &  blas) const
inline

Computes the full matrix (can be very expensive and should not be used in production code)

Definition at line 60 of file lr.hpp.

◆ rank()

template<class T >
Index Ensign::lr2< T >::rank ( ) const
inline

Definition at line 50 of file lr.hpp.

◆ resize()

template<class T >
void Ensign::lr2< T >::resize ( Index  r,
array< Index, 2 >  N 
)
inline

Definition at line 32 of file lr.hpp.

◆ set_zero()

template<class T >
void Ensign::lr2< T >::set_zero ( )
inline

Definition at line 54 of file lr.hpp.

◆ size_V()

template<class T >
Index Ensign::lr2< T >::size_V ( ) const
inline

Definition at line 47 of file lr.hpp.

◆ size_X()

template<class T >
Index Ensign::lr2< T >::size_X ( ) const
inline

Definition at line 44 of file lr.hpp.

◆ update_info()

template<class T >
void Ensign::lr2< T >::update_info ( Index  r)
inline

Definition at line 38 of file lr.hpp.

Member Data Documentation

◆ S

template<class T >
multi_array<T, 2> Ensign::lr2< T >::S

Definition at line 22 of file lr.hpp.

◆ V

template<class T >
multi_array<T, 2> Ensign::lr2< T >::V

Definition at line 24 of file lr.hpp.

◆ X

template<class T >
multi_array<T, 2> Ensign::lr2< T >::X

Definition at line 23 of file lr.hpp.


The documentation for this struct was generated from the following file: