QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Public Attributes | Private Types | Private Member Functions | List of all members
quda::Matrix< T, N > Class Template Reference

#include <quda_matrix.h>

Collaboration diagram for quda::Matrix< T, N >:
Collaboration graph
[legend]

Public Member Functions

__device__ __host__ constexpr int size () const
 
__device__ __host__ Matrix ()
 
__device__ __host__ Matrix (const Matrix< T, N > &a)
 
template<class U >
__device__ __host__ Matrix (const Matrix< U, N > &a)
 
__device__ __host__ Matrix (const T data_[])
 
__device__ __host__ Matrix (const HMatrix< real, N > &a)
 
__device__ __host__ T const & operator() (int i, int j) const
 
__device__ __host__ T & operator() (int i, int j)
 
__device__ __host__ T const & operator() (int i) const
 
__device__ __host__ T & operator() (int i)
 
template<class U >
__device__ __host__ void operator= (const Matrix< U, N > &b)
 
template<typename S >
__device__ __host__ Matrix (const gauge_wrapper< real, S > &s)
 
template<typename S >
__device__ __host__ void operator= (const gauge_wrapper< real, S > &s)
 
template<typename S >
__device__ __host__ Matrix (const gauge_ghost_wrapper< real, S > &s)
 
template<typename S >
__device__ __host__ void operator= (const gauge_ghost_wrapper< real, S > &s)
 
__device__ __host__ real L1 ()
 Compute the matrix L1 norm - this is the maximum of the absolute column sums. More...
 
__device__ __host__ real L2 ()
 Compute the matrix L2 norm. We actually compute the Frobenius norm which is an upper bound on the L2 norm. More...
 
__device__ __host__ real Linf ()
 Compute the matrix Linfinity norm - this is the maximum of the absolute row sums. More...
 
__device__ __host__ uint64_t checksum () const
 
__device__ __host__ bool isUnitary (double max_error) const
 
template<typename S >
__device__ __host__ void operator= (const gauge_wrapper< typename RealType< T >::type, S > &a)
 Copy constructor for the Matrix class with a gauge_wrapper input. More...
 
template<typename S >
__device__ __host__ Matrix (const gauge_wrapper< typename RealType< T >::type, S > &a)
 Assignment operator for the Matrix class with a gauge_wrapper input. More...
 
template<typename S >
__device__ __host__ void operator= (const gauge_ghost_wrapper< typename RealType< T >::type, S > &a)
 Copy constructor for the Matrix class with a gauge_ghost_wrapper input. More...
 
template<typename S >
__device__ __host__ Matrix (const gauge_ghost_wrapper< typename RealType< T >::type, S > &a)
 Assignment operator for the Matrix class with a gauge_ghost_wrapper input. More...
 

Public Attributes

data [N *N]
 

Private Types

typedef RealType< T >::type real
 

Private Member Functions

__device__ __host__ int index (int i, int j) const
 

Detailed Description

template<class T, int N>
class quda::Matrix< T, N >

Definition at line 64 of file quda_matrix.h.

Member Typedef Documentation

◆ real

template<class T, int N>
typedef RealType<T>::type quda::Matrix< T, N >::real
private

Definition at line 66 of file quda_matrix.h.

Constructor & Destructor Documentation

◆ Matrix() [1/9]

template<int N, class T >
Matrix< N, T >::Matrix ( )
inline

Definition at line 76 of file quda_matrix.h.

References quda::zero().

Referenced by quda::HMatrix< T, N >::print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Matrix() [2/9]

template<class T, int N>
__device__ __host__ quda::Matrix< T, N >::Matrix ( const Matrix< T, N > &  a)
inline

Definition at line 81 of file quda_matrix.h.

References quda::Matrix< T, N >::data.

◆ Matrix() [3/9]

template<class T, int N>
template<class U >
__device__ __host__ quda::Matrix< T, N >::Matrix ( const Matrix< U, N > &  a)
inline

Definition at line 86 of file quda_matrix.h.

References quda::Matrix< T, N >::data.

◆ Matrix() [4/9]

template<class T, int N>
__device__ __host__ quda::Matrix< T, N >::Matrix ( const T  data_[])
inline

Definition at line 92 of file quda_matrix.h.

◆ Matrix() [5/9]

template<class T, int N>
__device__ __host__ quda::Matrix< T, N >::Matrix ( const HMatrix< real, N > &  a)
inline

◆ Matrix() [6/9]

template<class T, int N>
template<typename S >
__device__ __host__ quda::Matrix< T, N >::Matrix ( const gauge_wrapper< real, S > &  s)
inline

◆ Matrix() [7/9]

template<class T, int N>
template<typename S >
__device__ __host__ quda::Matrix< T, N >::Matrix ( const gauge_ghost_wrapper< real, S > &  s)
inline

◆ Matrix() [8/9]

template<class T, int N>
template<typename S >
__device__ __host__ quda::Matrix< T, N >::Matrix ( const gauge_wrapper< typename RealType< T >::type, S > &  a)
inline

Assignment operator for the Matrix class with a gauge_wrapper input.

Parameters
[in]aInput gauge_wrapper that we use to fill in this matrix instance

Definition at line 93 of file gauge_field_order.h.

◆ Matrix() [9/9]

template<class T, int N>
template<typename S >
__device__ __host__ quda::Matrix< T, N >::Matrix ( const gauge_ghost_wrapper< typename RealType< T >::type, S > &  a)
inline

Assignment operator for the Matrix class with a gauge_ghost_wrapper input.

Parameters
[in]aInput gauge_wrapper that we use to fill in this matrix instance

Definition at line 159 of file gauge_field_order.h.

References quda::gauge_wrapper< Float, T >::gauge.

Member Function Documentation

◆ checksum()

template<class T, int N>
__device__ __host__ uint64_t quda::Matrix< T, N >::checksum ( ) const
inline

Return 64-bit XOR checksum computed from the elements of the matrix. Compute the checksum on each 64-bit word that constitutes the Matrix

Definition at line 198 of file quda_matrix.h.

References length.

Referenced by quda::siteChecksum().

Here is the caller graph for this function:

◆ index()

template<class T, int N>
__device__ __host__ int quda::Matrix< T, N >::index ( int  i,
int  j 
) const
inlineprivate

Definition at line 69 of file quda_matrix.h.

◆ isUnitary()

template<class T, int N>
__device__ __host__ bool quda::Matrix< T, N >::isUnitary ( double  max_error) const
inline

Definition at line 209 of file quda_matrix.h.

References quda::conj().

Referenced by quda::isUnitary().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ L1()

template<class T, int N>
__device__ __host__ real quda::Matrix< T, N >::L1 ( )
inline

Compute the matrix L1 norm - this is the maximum of the absolute column sums.

Returns
Compute L1 norm

Definition at line 143 of file quda_matrix.h.

References quda::abs().

Referenced by quda::computeMomAction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ L2()

template<class T, int N>
__device__ __host__ real quda::Matrix< T, N >::L2 ( )
inline

Compute the matrix L2 norm. We actually compute the Frobenius norm which is an upper bound on the L2 norm.

Returns
Computed L2 norm

Definition at line 162 of file quda_matrix.h.

References l2(), quda::norm(), and quda::sqrt().

Referenced by quda::computeMomAction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Linf()

template<class T, int N>
__device__ __host__ real quda::Matrix< T, N >::Linf ( )
inline

Compute the matrix Linfinity norm - this is the maximum of the absolute row sums.

Returns
Computed Linfinity norm

Definition at line 179 of file quda_matrix.h.

References quda::abs().

Here is the call graph for this function:

◆ operator()() [1/4]

template<int N, class T >
const T & Matrix< N, T >::operator() ( int  i,
int  j 
) const
inline

Definition at line 100 of file quda_matrix.h.

References index().

Here is the call graph for this function:

◆ operator()() [2/4]

template<int N, class T >
T & Matrix< N, T >::operator() ( int  i,
int  j 
)
inline

Definition at line 104 of file quda_matrix.h.

References index().

Here is the call graph for this function:

◆ operator()() [3/4]

template<class T, int N>
__device__ __host__ T const& quda::Matrix< T, N >::operator() ( int  i) const
inline

Definition at line 108 of file quda_matrix.h.

References index().

Here is the call graph for this function:

◆ operator()() [4/4]

template<class T, int N>
__device__ __host__ T& quda::Matrix< T, N >::operator() ( int  i)
inline

Definition at line 114 of file quda_matrix.h.

References index().

Here is the call graph for this function:

◆ operator=() [1/5]

template<class T, int N>
template<typename S >
__device__ __host__ void quda::Matrix< T, N >::operator= ( const gauge_wrapper< typename RealType< T >::type, S > &  a)
inline

Copy constructor for the Matrix class with a gauge_wrapper input.

Parameters
[in]aInput gauge_wrapper that we use to fill in this matrix instance

Definition at line 83 of file gauge_field_order.h.

◆ operator=() [2/5]

template<class T, int N>
template<class U >
__device__ __host__ void quda::Matrix< T, N >::operator= ( const Matrix< U, N > &  b)
inline

Definition at line 121 of file quda_matrix.h.

References quda::Matrix< T, N >::data.

◆ operator=() [3/5]

template<class T, int N>
template<typename S >
__device__ __host__ void quda::Matrix< T, N >::operator= ( const gauge_wrapper< real, S > &  s)
inline

◆ operator=() [4/5]

template<class T, int N>
template<typename S >
__device__ __host__ void quda::Matrix< T, N >::operator= ( const gauge_ghost_wrapper< real, S > &  s)
inline

◆ operator=() [5/5]

template<class T, int N>
template<typename S >
__device__ __host__ void quda::Matrix< T, N >::operator= ( const gauge_ghost_wrapper< typename RealType< T >::type, S > &  a)
inline

Copy constructor for the Matrix class with a gauge_ghost_wrapper input.

Parameters
[in]aInput gauge_wrapper that we use to fill in this matrix instance

Definition at line 149 of file gauge_field_order.h.

◆ size()

template<class T, int N>
__device__ __host__ constexpr int quda::Matrix< T, N >::size ( ) const
inline

Definition at line 74 of file quda_matrix.h.

Referenced by quda::checkUnitary(), and quda::checkUnitaryPrint().

Here is the caller graph for this function:

Member Data Documentation

◆ data

template<class T, int N>
T quda::Matrix< T, N >::data[N *N]

The documentation for this class was generated from the following files: