Template Numerical Library  version develop:5fd0ca953
Classes | Functions
TNL::Matrices Namespace Reference

Namespace for matrix formats. More...

Classes

struct  BinaryMatrix
 
struct  BinarySymmetricMatrix
 
class  COOMatrix
 
class  COOMatrixDeviceDependentCode
 
class  COOMatrixDeviceDependentCode< Devices::Host >
 
class  DenseMatrix
 Implementation of dense matrix, i.e. matrix storing explicitly all of its elements including zeros. More...
 
class  DenseMatrixRowView
 RowView is a simple structure for accessing rows of dense matrix. More...
 
class  DenseMatrixView
 Implementation of dense matrix view. More...
 
class  DenseRow
 
class  DistributedMatrix
 
class  DistributedSpMV
 
struct  enable_if_type
 
struct  GeneralMatrix
 
struct  has_communicator
 
struct  has_communicator< T, typename enable_if_type< typename T::CommunicatorType >::type >
 
class  LambdaMatrix
 "Matrix-free" matrix based on lambda functions. More...
 
struct  LambdaMatrixFactory
 Helper class for creating instances of LambdaMatrix. More...
 
class  Matrix
 
struct  MatrixInfo
 
struct  MatrixInfo< DenseMatrix< Real, Device, Index, Organization, RealAllocator > >
 
struct  MatrixInfo< DenseMatrixView< Real, Device, Index, Organization > >
 
struct  MatrixInfo< Legacy::BiEllpack< Real, Device, Index > >
 
struct  MatrixInfo< Legacy::ChunkedEllpack< Real, Device, Index > >
 
struct  MatrixInfo< Legacy::CSR< Real, Device, Index, Legacy::CSRAdaptive > >
 
struct  MatrixInfo< Legacy::CSR< Real, Device, Index, Legacy::CSRLight > >
 
struct  MatrixInfo< Legacy::CSR< Real, Device, Index, Legacy::CSRScalar > >
 
struct  MatrixInfo< Legacy::CSR< Real, Device, Index, Legacy::CSRStream > >
 
struct  MatrixInfo< Legacy::CSR< Real, Device, Index, Legacy::CSRVector > >
 
struct  MatrixInfo< Legacy::Ellpack< Real, Device, Index > >
 
struct  MatrixInfo< Legacy::SlicedEllpack< Real, Device, Index, SliceSize > >
 
struct  MatrixInfo< SparseMatrix< Real, Device, Index, MatrixType, Segments, RealAllocator, IndexAllocator > >
 
struct  MatrixInfo< SparseMatrixView< Real, Device, Index, MatrixType, SegmentsView > >
 
class  MatrixOperations
 
class  MatrixOperations< Devices::Cuda >
 
class  MatrixReader
 
class  MatrixReaderDeviceDependentCode
 
class  MatrixReaderDeviceDependentCode< Devices::Cuda >
 
class  MatrixReaderDeviceDependentCode< Devices::Host >
 
class  MatrixSetter
 
class  MatrixSetterTraverserUserData
 
struct  MatrixType
 
class  MatrixView
 
class  MatrixWriter
 
class  Multidiagonal
 
class  MultidiagonalDeviceDependentCode
 
class  MultidiagonalMatrixRowView
 
class  MultidiagonalMatrixView
 
class  SparseMatrix
 
class  SparseMatrixRowView
 
class  SparseMatrixView
 
struct  SymmetricBinaryMatrix
 
struct  SymmetricMatrix
 
class  Tridiagonal
 
class  TridiagonalDeviceDependentCode
 
class  TridiagonalMatrixRowView
 
class  TridiagonalMatrixView
 

Functions

template<typename Matrix , typename AdjacencyMatrix >
void copyAdjacencyStructure (const Matrix &A, AdjacencyMatrix &B, bool has_symmetric_pattern=false, bool ignore_diagonal=true)
 
template<typename Matrix1 , typename Matrix2 >
void copySparseMatrix (Matrix1 &A, const Matrix2 &B)
 
template<typename Matrix1 , typename Matrix2 >
std::enable_if< std::is_same< typename Matrix1::DeviceType, typename Matrix2::DeviceType >::value >::type copySparseMatrix_impl (Matrix1 &A, const Matrix2 &B)
 
template<typename Matrix1 , typename Matrix2 >
std::enable_if< ! std::is_same< typename Matrix1::DeviceType, typename Matrix2::DeviceType >::value &&std::is_same< typename Matrix2::DeviceType, Devices::Host >::value >::type copySparseMatrix_impl (Matrix1 &A, const Matrix2 &B)
 
template<typename Matrix1 , typename Matrix2 >
std::enable_if< ! std::is_same< typename Matrix1::DeviceType, typename Matrix2::DeviceType >::value &&std::is_same< typename Matrix2::DeviceType, Devices::Cuda >::value >::type copySparseMatrix_impl (Matrix1 &A, const Matrix2 &B)
 
template<typename Real , typename Index , ElementsOrganization Organization, typename RealAllocator , typename Matrix1 , typename Matrix2 , int tileDim, int tileRowBlockSize>
__global__ void DenseMatrixProductKernel (DenseMatrix< Real, Devices::Cuda, Index > *resultMatrix, const Matrix1 *matrixA, const Matrix2 *matrixB, const Real matrixAMultiplicator, const Real matrixBMultiplicator, const Index gridIdx_x, const Index gridIdx_y)
 
template<typename Real , typename Index , typename Matrix , ElementsOrganization Organization, typename RealAllocator , int tileDim, int tileRowBlockSize>
__global__ void DenseTranspositionAlignedKernel (DenseMatrix< Real, Devices::Cuda, Index > *resultMatrix, const Matrix *inputMatrix, const Real matrixMultiplicator, const Index gridIdx_x, const Index gridIdx_y)
 
template<typename Real , typename Index , ElementsOrganization Organization, typename RealAllocator , typename Matrix , int tileDim, int tileRowBlockSize>
__global__ void DenseTranspositionNonAlignedKernel (DenseMatrix< Real, Devices::Cuda, Index > *resultMatrix, const Matrix *inputMatrix, const Real matrixMultiplicator, const Index gridIdx_x, const Index gridIdx_y)
 
template<typename RealType , typename IndexType >
__global__ void GeamCudaKernel (const IndexType m, const IndexType n, const RealType alpha, const RealType *A, const IndexType lda, const RealType beta, const RealType *B, const IndexType ldb, RealType *C, const IndexType ldc)
 
template<typename RealType , typename IndexType >
__global__ void GemvCudaKernel (const IndexType m, const IndexType n, const RealType alpha, const RealType *A, const IndexType lda, const RealType *x, const RealType beta, RealType *y)
 
template<typename Real , typename Real2 , typename Index , typename Index2 >
__global__ void MultidiagonalTranspositionCudaKernel (const Multidiagonal< Real2, Devices::Cuda, Index2 > *inMatrix, Multidiagonal< Real, Devices::Cuda, Index > *outMatrix, const Real matrixMultiplicator, const Index gridIdx)
 
template<typename Real , typename Device , typename Index , ElementsOrganization Organization, typename RealAllocator >
std::ostreamoperator<< (std::ostream &str, const DenseMatrix< Real, Device, Index, Organization, RealAllocator > &matrix)
 Insertion operator for dense matrix and output stream. More...
 
template<typename Real , typename Device , typename Index >
std::ostreamoperator<< (std::ostream &str, const Matrix< Real, Device, Index > &m)
 
template<typename Real , typename Device , typename Index >
std::ostreamoperator<< (std::ostream &str, const MatrixView< Real, Device, Index > &m)
 
template<typename SegmentView , typename ValuesView , typename ColumnsIndexesView , bool isBinary_>
std::ostreamoperator<< (std::ostream &str, const SparseMatrixRowView< SegmentView, ValuesView, ColumnsIndexesView, isBinary_ > &row)
 
template<typename Array1 , typename Array2 , typename PermutationArray >
void reorderArray (const Array1 &src, Array2 &dest, const PermutationArray &perm)
 
template<typename Matrix1 , typename Matrix2 , typename PermutationArray >
void reorderSparseMatrix (const Matrix1 &A, Matrix2 &A_perm, const PermutationArray &perm, const PermutationArray &iperm)
 
template<typename Matrix1 , typename Matrix2 >
__global__ void SparseMatrixCopyKernel (Matrix1 *A, const Matrix2 *B, const typename Matrix2::IndexType *rowLengths, typename Matrix2::IndexType rows)
 
template<typename Vector , typename Matrix >
__global__ void SparseMatrixSetRowLengthsVectorKernel (Vector *rowLengths, const Matrix *matrix, typename Matrix::IndexType rows, typename Matrix::IndexType cols)
 
template<typename Real , typename Real2 , typename Index , typename Index2 >
__global__ void TridiagonalTranspositionCudaKernel (const Tridiagonal< Real2, Devices::Cuda, Index2 > *inMatrix, Tridiagonal< Real, Devices::Cuda, Index > *outMatrix, const Real matrixMultiplicator, const Index gridIdx)
 

Detailed Description

Namespace for matrix formats.

Function Documentation

◆ operator<<()

template<typename Real , typename Device , typename Index , ElementsOrganization Organization, typename RealAllocator >
std::ostream & TNL::Matrices::operator<< ( std::ostream str,
const DenseMatrix< Real, Device, Index, Organization, RealAllocator > &  matrix 
)

Insertion operator for dense matrix and output stream.

Parameters
stris the output stream.
matrixis the dense matrix.
Returns
reference to the stream.