QUDA  v1.1.0
A library for QCD on GPUs
Public Member Functions | Public Attributes | List of all members
quda::Matrix< T, N > Class Template Reference

#include <quda_matrix.h>

Public Member Functions

__device__ constexpr __host__ 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]
 

Detailed Description

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

Definition at line 62 of file quda_matrix.h.

Constructor & Destructor Documentation

◆ Matrix() [1/9]

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

Definition at line 74 of file quda_matrix.h.

◆ Matrix() [2/9]

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

Definition at line 76 of file quda_matrix.h.

◆ 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 82 of file quda_matrix.h.

◆ Matrix() [4/9]

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

Definition at line 88 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.

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 194 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 204 of file quda_matrix.h.

◆ 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 139 of file quda_matrix.h.

◆ 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 158 of file quda_matrix.h.

◆ 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 175 of file quda_matrix.h.

◆ operator()() [1/4]

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

Definition at line 110 of file quda_matrix.h.

◆ operator()() [2/4]

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

Definition at line 104 of file quda_matrix.h.

◆ operator()() [3/4]

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

Definition at line 100 of file quda_matrix.h.

◆ operator()() [4/4]

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

Definition at line 96 of file quda_matrix.h.

◆ operator=() [1/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=() [2/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.

◆ 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_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=() [5/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 117 of file quda_matrix.h.

◆ size()

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

Definition at line 72 of file quda_matrix.h.

Member Data Documentation

◆ data

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

Definition at line 70 of file quda_matrix.h.


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