QUDA  v1.1.0
A library for QCD on GPUs
Macros | Functions
svd_quda.h File Reference
#include <float.h>

Go to the source code of this file.

Macros

#define DEVICEHOST   __device__ __host__
 
#define SVDPREC   1e-11
 
#define LOG2   0.69314718055994530942
 
#define INVALID_DOUBLE   (-DBL_MAX)
 

Functions

template<class Cmplx >
DEVICEHOST std::remove_reference< decltype(Cmplx::x)>::type cabs (const Cmplx &z)
 
template<class T , class U >
DEVICEHOST PromoteTypeId< T, U >::type quadSum (const T &a, const U &b)
 
DEVICEHOST float getNorm (const Array< complex< float >, 3 > &a)
 
DEVICEHOST double getNorm (const Array< complex< double >, 3 > &a)
 
template<class T , class V >
DEVICEHOST auto constructHHMat (const T &tau, const V &v)
 
template<class Real >
DEVICEHOST void getLambdaMax (const Matrix< Real, 3 > &b, Real &lambda_max)
 
template<class Real >
DEVICEHOST void getGivensRotation (const Real &alpha, const Real &beta, Real &c, Real &s)
 
template<class Real >
DEVICEHOST void accumGivensRotation (int index, const Real &c, const Real &s, Matrix< Real, 3 > &m)
 
template<class Real >
DEVICEHOST void assignGivensRotation (const Real &c, const Real &s, Matrix< Real, 2 > &m)
 
template<class Real >
DEVICEHOST void swap (Real &a, Real &b)
 
template<class Real >
DEVICEHOST void smallSVD (Matrix< Real, 2 > &u, Matrix< Real, 2 > &v, Matrix< Real, 2 > &m)
 
template<class Float >
DEVICEHOST void getRealBidiagMatrix (const Matrix< complex< Float >, 3 > &mat, Matrix< complex< Float >, 3 > &u, Matrix< complex< Float >, 3 > &v)
 
template<class Real >
DEVICEHOST void bdSVD (Matrix< Real, 3 > &u, Matrix< Real, 3 > &v, Matrix< Real, 3 > &b, int max_it)
 
template<class Float >
DEVICEHOST void computeSVD (const Matrix< complex< Float >, 3 > &m, Matrix< complex< Float >, 3 > &u, Matrix< complex< Float >, 3 > &v, Float singular_values[3])
 

Macro Definition Documentation

◆ DEVICEHOST

#define DEVICEHOST   __device__ __host__

Definition at line 5 of file svd_quda.h.

◆ INVALID_DOUBLE

#define INVALID_DOUBLE   (-DBL_MAX)

Definition at line 8 of file svd_quda.h.

◆ LOG2

#define LOG2   0.69314718055994530942

Definition at line 7 of file svd_quda.h.

◆ SVDPREC

#define SVDPREC   1e-11

Definition at line 6 of file svd_quda.h.

Function Documentation

◆ accumGivensRotation()

template<class Real >
DEVICEHOST void accumGivensRotation ( int  index,
const Real &  c,
const Real &  s,
Matrix< Real, 3 > &  m 
)
inline

Definition at line 110 of file svd_quda.h.

◆ assignGivensRotation()

template<class Real >
DEVICEHOST void assignGivensRotation ( const Real &  c,
const Real &  s,
Matrix< Real, 2 > &  m 
)
inline

Definition at line 124 of file svd_quda.h.

◆ bdSVD()

template<class Real >
DEVICEHOST void bdSVD ( Matrix< Real, 3 > &  u,
Matrix< Real, 3 > &  v,
Matrix< Real, 3 > &  b,
int  max_it 
)

Definition at line 385 of file svd_quda.h.

◆ cabs()

template<class Cmplx >
DEVICEHOST std::remove_reference<decltype(Cmplx::x)>::type cabs ( const Cmplx &  z)
inline

Definition at line 15 of file svd_quda.h.

◆ computeSVD()

template<class Float >
DEVICEHOST void computeSVD ( const Matrix< complex< Float >, 3 > &  m,
Matrix< complex< Float >, 3 > &  u,
Matrix< complex< Float >, 3 > &  v,
Float  singular_values[3] 
)

Definition at line 610 of file svd_quda.h.

◆ constructHHMat()

template<class T , class V >
DEVICEHOST auto constructHHMat ( const T &  tau,
const V v 
)
inline

Definition at line 54 of file svd_quda.h.

◆ getGivensRotation()

template<class Real >
DEVICEHOST void getGivensRotation ( const Real &  alpha,
const Real &  beta,
Real &  c,
Real &  s 
)
inline

Definition at line 91 of file svd_quda.h.

◆ getLambdaMax()

template<class Real >
DEVICEHOST void getLambdaMax ( const Matrix< Real, 3 > &  b,
Real &  lambda_max 
)
inline

Definition at line 73 of file svd_quda.h.

◆ getNorm() [1/2]

DEVICEHOST double getNorm ( const Array< complex< double >, 3 > &  a)
inline

Definition at line 45 of file svd_quda.h.

◆ getNorm() [2/2]

DEVICEHOST float getNorm ( const Array< complex< float >, 3 > &  a)
inline

Definition at line 34 of file svd_quda.h.

◆ getRealBidiagMatrix()

template<class Float >
DEVICEHOST void getRealBidiagMatrix ( const Matrix< complex< Float >, 3 > &  mat,
Matrix< complex< Float >, 3 > &  u,
Matrix< complex< Float >, 3 > &  v 
)

Definition at line 255 of file svd_quda.h.

◆ quadSum()

template<class T , class U >
DEVICEHOST PromoteTypeId<T, U>::type quadSum ( const T &  a,
const U &  b 
)
inline

Definition at line 24 of file svd_quda.h.

◆ smallSVD()

template<class Real >
DEVICEHOST void smallSVD ( Matrix< Real, 2 > &  u,
Matrix< Real, 2 > &  v,
Matrix< Real, 2 > &  m 
)
inline

Definition at line 143 of file svd_quda.h.

◆ swap()

template<class Real >
DEVICEHOST void swap ( Real &  a,
Real &  b 
)
inline

Definition at line 134 of file svd_quda.h.