PARALUTION  1.0.0
PARALUTION
paralution::MICAcceleratorMatrixDENSE< ValueType > Class Template Reference

#include <base_matrix.hpp>

Inheritance diagram for paralution::MICAcceleratorMatrixDENSE< ValueType >:
paralution::MICAcceleratorMatrix< ValueType > paralution::AcceleratorMatrix< ValueType > paralution::BaseMatrix< ValueType >

Public Member Functions

 MICAcceleratorMatrixDENSE ()
 
 MICAcceleratorMatrixDENSE (const Paralution_Backend_Descriptor local_backend)
 
virtual ~MICAcceleratorMatrixDENSE ()
 
virtual void info (void) const
 Shows simple info about the object. More...
 
virtual unsigned int get_mat_format (void) const
 Return the matrix format id (see matrix_formats.hpp) More...
 
virtual void Clear (void)
 Clear (free) the matrix. More...
 
virtual void AllocateDENSE (const int nrow, const int ncol)
 Allocate DENSE Matrix. More...
 
virtual bool ConvertFrom (const BaseMatrix< ValueType > &mat)
 Convert the matrix from another matrix (with different structure) More...
 
virtual void CopyFrom (const BaseMatrix< ValueType > &mat)
 Copy from another matrix. More...
 
virtual void CopyTo (BaseMatrix< ValueType > *mat) const
 Copy to another matrix. More...
 
virtual void CopyFromHost (const HostMatrix< ValueType > &src)
 Copy (accelerator matrix) from host matrix. More...
 
virtual void CopyToHost (HostMatrix< ValueType > *dst) const
 Copy (accelerator matrix) to host matrix. More...
 
virtual void Apply (const BaseVector< ValueType > &in, BaseVector< ValueType > *out) const
 Apply the matrix to vector, out = this*in;. More...
 
virtual void ApplyAdd (const BaseVector< ValueType > &in, const ValueType scalar, BaseVector< ValueType > *out) const
 Apply and add the matrix to vector, out = out + scalar*this*in;. More...
 
virtual void CopyFromHostAsync (const HostMatrix< ValueType > &src)
 Async copy (accelerator matrix) from host matrix. More...
 
virtual void CopyToHostAsync (HostMatrix< ValueType > *dst) const
 Async opy (accelerator matrix) to host matrix. More...
 
int get_nrow (void) const
 Return the number of rows in the matrix. More...
 
int get_ncol (void) const
 Return the number of columns in the matrix. More...
 
int get_nnz (void) const
 Return the non-zeros of the matrix. More...
 
virtual void set_backend (const Paralution_Backend_Descriptor local_backend)
 Copy the backend descriptor information. More...
 
virtual bool Check (void) const
 
virtual void AllocateCSR (const int nnz, const int nrow, const int ncol)
 Allocate CSR Matrix. More...
 
virtual void AllocateMCSR (const int nnz, const int nrow, const int ncol)
 Allocate MCSR Matrix. More...
 
virtual void AllocateCOO (const int nnz, const int nrow, const int ncol)
 Allocate COO Matrix. More...
 
virtual void AllocateDIA (const int nnz, const int nrow, const int ncol, const int ndiag)
 Allocate DIA Matrix. More...
 
virtual void AllocateELL (const int nnz, const int nrow, const int ncol, const int max_row)
 Allocate ELL Matrix. More...
 
virtual void AllocateHYB (const int ell_nnz, const int coo_nnz, const int ell_max_row, const int nrow, const int ncol)
 Allocate HYB Matrix. More...
 
virtual void SetDataPtrCOO (int **row, int **col, ValueType **val, const int nnz, const int nrow, const int ncol)
 Initialize a COO matrix on the Host with externally allocated data. More...
 
virtual void LeaveDataPtrCOO (int **row, int **col, ValueType **val)
 Leave a COO matrix to Host pointers. More...
 
virtual void SetDataPtrCSR (int **row_offset, int **col, ValueType **val, const int nnz, const int nrow, const int ncol)
 Initialize a CSR matrix on the Host with externally allocated data. More...
 
virtual void LeaveDataPtrCSR (int **row_offset, int **col, ValueType **val)
 Leave a CSR matrix to Host pointers. More...
 
virtual void SetDataPtrELL (int **col, ValueType **val, const int nnz, const int nrow, const int ncol, const int max_row)
 Initialize an ELL matrix on the Host with externally allocated data. More...
 
virtual void LeaveDataPtrELL (int **col, ValueType **val, int &max_row)
 Leave an ELL matrix to Host pointers. More...
 
virtual void SetDataPtrDIA (int **offset, ValueType **val, const int nnz, const int nrow, const int ncol, const int num_diag)
 Initialize a DIA matrix on the Host with externally allocated data. More...
 
virtual void LeaveDataPtrDIA (int **offset, ValueType **val, int &num_diag)
 Leave a DIA matrix to Host pointers. More...
 
virtual void SetDataPtrDENSE (ValueType **val, const int nrow, const int ncol)
 Initialize a DENSE matrix on the Host with externally allocated data. More...
 
virtual void LeaveDataPtrDENSE (ValueType **val)
 Leave a DENSE matrix to Host pointers. More...
 
virtual bool Zeros (void)
 Set all the values to zero. More...
 
virtual bool Assemble (const int *i, const int *j, const ValueType *v, const int size, const int n, const int m, int **pp_assembly_rank, int **pp_assembly_irank, int **pp_assembly_loop_start, int **pp_assembly_loop_end, int &nThreads)
 Assembling. More...
 
virtual bool AssembleUpdate (const ValueType *v, const int *assembly_rank, const int *assembly_irank, const int *assembly_loop_start, const int *assembly_loop_end, const int nThreads)
 
virtual bool Scale (const ValueType alpha)
 Scale all values. More...
 
virtual bool ScaleDiagonal (const ValueType alpha)
 Scale the diagonal entries of the matrix with alpha. More...
 
virtual bool ScaleOffDiagonal (const ValueType alpha)
 Scale the off-diagonal entries of the matrix with alpha. More...
 
virtual bool AddScalar (const ValueType alpha)
 Add alpha to all values. More...
 
virtual bool AddScalarDiagonal (const ValueType alpha)
 Add alpha to the diagonal entries of the matrix. More...
 
virtual bool AddScalarOffDiagonal (const ValueType alpha)
 Add alpha to the off-diagonal entries of the matrix. More...
 
virtual bool ExtractSubMatrix (const int row_offset, const int col_offset, const int row_size, const int col_size, BaseMatrix< ValueType > *mat) const
 Extrat a sub-matrix with row/col_offset and row/col_size. More...
 
virtual bool ExtractDiagonal (BaseVector< ValueType > *vec_diag) const
 Extract the diagonal values of the matrix into a LocalVector. More...
 
virtual bool ExtractInverseDiagonal (BaseVector< ValueType > *vec_inv_diag) const
 Extract the inverse (reciprocal) diagonal values of the matrix into a LocalVector. More...
 
virtual bool ExtractU (BaseMatrix< ValueType > *U) const
 Extract the upper triangular matrix. More...
 
virtual bool ExtractUDiagonal (BaseMatrix< ValueType > *U) const
 Extract the upper triangular matrix including diagonal. More...
 
virtual bool ExtractL (BaseMatrix< ValueType > *L) const
 Extract the lower triangular matrix. More...
 
virtual bool ExtractLDiagonal (BaseMatrix< ValueType > *L) const
 Extract the lower triangular matrix including diagonal. More...
 
virtual bool Permute (const BaseVector< int > &permutation)
 Perform (forward) permutation of the matrix. More...
 
virtual bool PermuteBackward (const BaseVector< int > &permutation)
 Perform (backward) permutation of the matrix. More...
 
virtual bool CMK (BaseVector< int > *permutation) const
 Create permutation vector for CMK reordering of the matrix. More...
 
virtual bool RCMK (BaseVector< int > *permutation) const
 Create permutation vector for reverse CMK reordering of the matrix. More...
 
virtual bool MultiColoring (int &num_colors, int **size_colors, BaseVector< int > *permutation) const
 Perform multi-coloring decomposition of the matrix; Returns number of colors, the corresponding sizes (the array is allocated in the function) and the permutation. More...
 
virtual bool MaximalIndependentSet (int &size, BaseVector< int > *permutation) const
 Perform maximal independent set decomposition of the matrix; Returns the size of the maximal independent set and the corresponding permutation. More...
 
virtual bool ZeroBlockPermutation (int &size, BaseVector< int > *permutation) const
 Return a permutation for saddle-point problems (zero diagonal entries), where all zero diagonal elements are mapped to the last block; the return size is the size of the first block. More...
 
virtual void CopyFromAsync (const BaseMatrix< ValueType > &mat)
 Async copy from another matrix. More...
 
virtual void CopyToAsync (BaseMatrix< ValueType > *mat) const
 Copy to another matrix. More...
 
virtual void CopyFromCSR (const int *row_offsets, const int *col, const ValueType *val)
 Copy from CSR array (the matrix has to be allocated) More...
 
virtual void CopyToCSR (int *row_offsets, int *col, ValueType *val) const
 Copy to CSR array (the arrays have to be allocated) More...
 
virtual void CopyFromCOO (const int *row, const int *col, const ValueType *val)
 Copy from COO array (the matrix has to be allocated) More...
 
virtual void CopyToCOO (int *row, int *col, ValueType *val) const
 Copy to COO array (the arrays have to be allocated) More...
 
virtual bool CreateFromMap (const BaseVector< int > &map, const int n, const int m)
 Create a restriction matrix operator based on an int vector map. More...
 
virtual bool ReadFileMTX (const std::string filename)
 Read matrix from MTX (Matrix Market Format) file. More...
 
virtual bool WriteFileMTX (const std::string filename) const
 Write matrix to MTX (Matrix Market Format) file. More...
 
virtual bool ReadFileCSR (const std::string filename)
 Read matrix from CSR (PARALUTION binary format) file. More...
 
virtual bool WriteFileCSR (const std::string filename) const
 Write matrix to CSR (PARALUTION binary format) file. More...
 
virtual bool SymbolicPower (const int p)
 Perform symbolic computation (structure only) of |this|^p. More...
 
virtual bool SymbolicMatMatMult (const BaseMatrix< ValueType > &src)
 Perform symbolic matrix-matrix multiplication (i.e. determine the structure), this = this*src. More...
 
virtual bool SymbolicMatMatMult (const BaseMatrix< ValueType > &A, const BaseMatrix< ValueType > &B)
 Perform symbolic matrix-matrix multiplication (i.e. determine the structure), this = A*B. More...
 
virtual bool MatMatMult (const BaseMatrix< ValueType > &A, const BaseMatrix< ValueType > &B)
 Multiply two matrices, this = A * B. More...
 
virtual bool NumericMatMatMult (const BaseMatrix< ValueType > &A, const BaseMatrix< ValueType > &B)
 Perform numerical matrix-matrix multiplication (i.e. value computation), this = A*B. More...
 
virtual bool DiagonalMatrixMultR (const BaseVector< ValueType > &diag)
 Multiply the matrix with diagonal matrix (stored in LocalVector), this=this*diag (right multiplication) More...
 
virtual bool DiagonalMatrixMultL (const BaseVector< ValueType > &diag)
 Multiply the matrix with diagonal matrix (stored in LocalVector), this=diag*this (left multiplication) More...
 
virtual bool MatrixAdd (const BaseMatrix< ValueType > &mat, const ValueType alpha, const ValueType beta, const bool structure)
 Perform matrix addition, this = alpha*this + beta*mat; if structure==false the structure of the matrix is not changed, if structure==true new data structure is computed. More...
 
virtual bool ILU0Factorize (void)
 Perform ILU(0) factorization. More...
 
virtual bool LUFactorize (void)
 Perform LU factorization. More...
 
virtual bool ILUTFactorize (const double t, const int maxrow)
 Perform ILU(t,m) factorization based on threshold and maximum number of elements per row. More...
 
virtual bool ILUpFactorizeNumeric (const int p, const BaseMatrix< ValueType > &mat)
 Perform ILU(p) factorization based on power (see power(q)-pattern method, D. Lukarski "Parallel Sparse Linear Algebra for Multi-core and Many-core Platforms - Parallel Solvers and Preconditioners", PhD Thesis, 2012, KIT) More...
 
virtual bool ICFactorize (BaseVector< ValueType > *inv_diag)
 Perform IC(0) factorization. More...
 
virtual void LUAnalyse (void)
 Analyse the structure (level-scheduling) More...
 
virtual void LUAnalyseClear (void)
 Delete the analysed data (see LUAnalyse) More...
 
virtual bool LUSolve (const BaseVector< ValueType > &in, BaseVector< ValueType > *out) const
 Solve LU out = in; if level-scheduling algorithm is provided then the graph traversing is performed in parallel. More...
 
virtual void LLAnalyse (void)
 Analyse the structure (level-scheduling) More...
 
virtual void LLAnalyseClear (void)
 Delete the analysed data (see LLAnalyse) More...
 
virtual bool LLSolve (const BaseVector< ValueType > &in, BaseVector< ValueType > *out) const
 Solve LL^T out = in; if level-scheduling algorithm is provided then the graph. More...
 
virtual bool LLSolve (const BaseVector< ValueType > &in, const BaseVector< ValueType > &inv_diag, BaseVector< ValueType > *out) const
 
virtual void LAnalyse (const bool diag_unit=false)
 Analyse the structure (level-scheduling) L-part diag_unit == true the diag is 1; diag_unit == false the diag is 0;. More...
 
virtual void LAnalyseClear (void)
 Delete the analysed data (see LAnalyse) L-party. More...
 
virtual bool LSolve (const BaseVector< ValueType > &in, BaseVector< ValueType > *out) const
 Solve L out = in; if level-scheduling algorithm is provided then the graph traversing is performed in parallel. More...
 
virtual void UAnalyse (const bool diag_unit=false)
 Analyse the structure (level-scheduling) U-part; diag_unit == true the diag is 1; diag_unit == false the diag is 0;. More...
 
virtual void UAnalyseClear (void)
 Delete the analysed data (see UAnalyse) U-party. More...
 
virtual bool USolve (const BaseVector< ValueType > &in, BaseVector< ValueType > *out) const
 Solve U out = in; if level-scheduling algorithm is provided then the graph traversing is performed in parallel. More...
 
virtual bool Householder (const int idx, ValueType &beta, BaseVector< ValueType > *vec) const
 Compute Householder vector. More...
 
virtual bool QRDecompose (void)
 QR Decomposition. More...
 
virtual bool QRSolve (const BaseVector< ValueType > &in, BaseVector< ValueType > *out) const
 Solve QR out = in. More...
 
virtual bool Invert (void)
 Invert this. More...
 
virtual bool Gershgorin (ValueType &lambda_min, ValueType &lambda_max) const
 Compute the spectrum approximation with Gershgorin circles theorem. More...
 
virtual bool Compress (const double drop_off)
 Delete all entries abs(a_ij) <= drop_off; the diagonal elements are never deleted. More...
 
virtual bool Transpose (void)
 Transpose the matrix. More...
 
virtual bool Sort (void)
 Sort the matrix indices. More...
 
virtual bool ReplaceColumnVector (const int idx, const BaseVector< ValueType > &vec)
 Replace a column vector of a matrix. More...
 
virtual bool ReplaceRowVector (const int idx, const BaseVector< ValueType > &vec)
 Replace a column vector of a matrix. More...
 
virtual bool ExtractColumnVector (const int idx, BaseVector< ValueType > *vec) const
 Extract values from a column of a matrix to a vector. More...
 
virtual bool ExtractRowVector (const int idx, BaseVector< ValueType > *vec) const
 Extract values from a row of a matrix to a vector. More...
 
virtual bool AMGConnect (const ValueType eps, BaseVector< int > *connections) const
 
virtual bool AMGAggregate (const BaseVector< int > &connections, BaseVector< int > *aggregates) const
 
virtual bool AMGSmoothedAggregation (const ValueType relax, const BaseVector< int > &aggregates, const BaseVector< int > &connections, BaseMatrix< ValueType > *prolong, BaseMatrix< ValueType > *restrict) const
 
virtual bool AMGAggregation (const BaseVector< int > &aggregates, BaseMatrix< ValueType > *prolong, BaseMatrix< ValueType > *restrict) const
 
virtual bool FSAI (const int power, const BaseMatrix< ValueType > *pattern)
 Factorized Sparse Approximate Inverse assembly for given system matrix power pattern or external sparsity pattern. More...
 
virtual bool SPAI (void)
 SParse Approximate Inverse assembly for given system matrix pattern. More...
 

Protected Attributes

int nrow_
 Number of rows. More...
 
int ncol_
 Number of columns. More...
 
int nnz_
 Number of non-zero elements. More...
 
Paralution_Backend_Descriptor local_backend_
 Backend descriptor (local copy) More...
 

Private Attributes

MatrixDENSE< ValueType > mat_
 

Friends

class BaseVector< ValueType >
 
class AcceleratorVector< ValueType >
 
class MICAcceleratorVector< ValueType >
 

Constructor & Destructor Documentation

template<typename ValueType >
paralution::MICAcceleratorMatrixDENSE< ValueType >::MICAcceleratorMatrixDENSE ( )
template<typename ValueType >
paralution::MICAcceleratorMatrixDENSE< ValueType >::MICAcceleratorMatrixDENSE ( const Paralution_Backend_Descriptor  local_backend)
template<typename ValueType >
paralution::MICAcceleratorMatrixDENSE< ValueType >::~MICAcceleratorMatrixDENSE ( )
virtual

Member Function Documentation

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::AddScalar ( const ValueType  alpha)
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::AddScalarDiagonal ( const ValueType  alpha)
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::AddScalarOffDiagonal ( const ValueType  alpha)
virtualinherited
template<typename ValueType >
void paralution::BaseMatrix< ValueType >::AllocateCOO ( const int  nnz,
const int  nrow,
const int  ncol 
)
virtualinherited
template<typename ValueType >
void paralution::BaseMatrix< ValueType >::AllocateCSR ( const int  nnz,
const int  nrow,
const int  ncol 
)
virtualinherited
template<typename ValueType >
void paralution::MICAcceleratorMatrixDENSE< ValueType >::AllocateDENSE ( const int  nrow,
const int  ncol 
)
virtual
template<typename ValueType >
void paralution::BaseMatrix< ValueType >::AllocateDIA ( const int  nnz,
const int  nrow,
const int  ncol,
const int  ndiag 
)
virtualinherited
template<typename ValueType >
void paralution::BaseMatrix< ValueType >::AllocateELL ( const int  nnz,
const int  nrow,
const int  ncol,
const int  max_row 
)
virtualinherited
template<typename ValueType >
void paralution::BaseMatrix< ValueType >::AllocateHYB ( const int  ell_nnz,
const int  coo_nnz,
const int  ell_max_row,
const int  nrow,
const int  ncol 
)
virtualinherited
template<typename ValueType >
void paralution::BaseMatrix< ValueType >::AllocateMCSR ( const int  nnz,
const int  nrow,
const int  ncol 
)
virtualinherited
template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::AMGAggregate ( const BaseVector< int > &  connections,
BaseVector< int > *  aggregates 
) const
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::AMGAggregation ( const BaseVector< int > &  aggregates,
BaseMatrix< ValueType > *  prolong,
BaseMatrix< ValueType > *  restrict 
) const
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::AMGConnect ( const ValueType  eps,
BaseVector< int > *  connections 
) const
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::AMGSmoothedAggregation ( const ValueType  relax,
const BaseVector< int > &  aggregates,
const BaseVector< int > &  connections,
BaseMatrix< ValueType > *  prolong,
BaseMatrix< ValueType > *  restrict 
) const
virtualinherited
template<typename ValueType >
void paralution::MICAcceleratorMatrixDENSE< ValueType >::Apply ( const BaseVector< ValueType > &  in,
BaseVector< ValueType > *  out 
) const
virtual

Apply the matrix to vector, out = this*in;.

Implements paralution::BaseMatrix< ValueType >.

template<typename ValueType >
void paralution::MICAcceleratorMatrixDENSE< ValueType >::ApplyAdd ( const BaseVector< ValueType > &  in,
const ValueType  scalar,
BaseVector< ValueType > *  out 
) const
virtual

Apply and add the matrix to vector, out = out + scalar*this*in;.

Implements paralution::BaseMatrix< ValueType >.

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::Assemble ( const int i,
const int j,
const ValueType *  v,
const int  size,
const int  n,
const int  m,
int **  pp_assembly_rank,
int **  pp_assembly_irank,
int **  pp_assembly_loop_start,
int **  pp_assembly_loop_end,
int nThreads 
)
virtualinherited

Assembling.

Reimplemented in paralution::HostMatrixCSR< ValueType >.

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::AssembleUpdate ( const ValueType *  v,
const int assembly_rank,
const int assembly_irank,
const int assembly_loop_start,
const int assembly_loop_end,
const int  nThreads 
)
virtualinherited
template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::Check ( void  ) const
virtualinherited
template<typename ValueType >
void paralution::MICAcceleratorMatrixDENSE< ValueType >::Clear ( void  )
virtual

Clear (free) the matrix.

Implements paralution::BaseMatrix< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::CMK ( BaseVector< int > *  permutation) const
virtualinherited

Create permutation vector for CMK reordering of the matrix.

Reimplemented in paralution::HostMatrixCSR< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::Compress ( const double  drop_off)
virtualinherited

Delete all entries abs(a_ij) <= drop_off; the diagonal elements are never deleted.

Reimplemented in paralution::HostMatrixCSR< ValueType >, paralution::GPUAcceleratorMatrixCSR< ValueType >, and paralution::OCLAcceleratorMatrixCSR< ValueType >.

template<typename ValueType >
bool paralution::MICAcceleratorMatrixDENSE< ValueType >::ConvertFrom ( const BaseMatrix< ValueType > &  mat)
virtual

Convert the matrix from another matrix (with different structure)

Implements paralution::BaseMatrix< ValueType >.

template<typename ValueType >
void paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyFrom ( const BaseMatrix< ValueType > &  mat)
virtual

Copy from another matrix.

Implements paralution::BaseMatrix< ValueType >.

template<typename ValueType>
void paralution::BaseMatrix< ValueType >::CopyFromCOO ( const int row,
const int col,
const ValueType *  val 
)
virtualinherited

Copy from COO array (the matrix has to be allocated)

Reimplemented in paralution::GPUAcceleratorMatrixCOO< ValueType >, and paralution::HostMatrixCOO< ValueType >.

template<typename ValueType>
void paralution::BaseMatrix< ValueType >::CopyFromCSR ( const int row_offsets,
const int col,
const ValueType *  val 
)
virtualinherited

Copy from CSR array (the matrix has to be allocated)

Reimplemented in paralution::HostMatrixCSR< ValueType >, and paralution::GPUAcceleratorMatrixCSR< ValueType >.

template<typename ValueType >
void paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyFromHost ( const HostMatrix< ValueType > &  src)
virtual

Copy (accelerator matrix) from host matrix.

Implements paralution::AcceleratorMatrix< ValueType >.

template<typename ValueType >
void paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyTo ( BaseMatrix< ValueType > *  mat) const
virtual

Copy to another matrix.

Implements paralution::BaseMatrix< ValueType >.

template<typename ValueType>
void paralution::BaseMatrix< ValueType >::CopyToCOO ( int row,
int col,
ValueType *  val 
) const
virtualinherited

Copy to COO array (the arrays have to be allocated)

Reimplemented in paralution::GPUAcceleratorMatrixCOO< ValueType >, and paralution::HostMatrixCOO< ValueType >.

template<typename ValueType>
void paralution::BaseMatrix< ValueType >::CopyToCSR ( int row_offsets,
int col,
ValueType *  val 
) const
virtualinherited

Copy to CSR array (the arrays have to be allocated)

Reimplemented in paralution::HostMatrixCSR< ValueType >, and paralution::GPUAcceleratorMatrixCSR< ValueType >.

template<typename ValueType >
void paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyToHost ( HostMatrix< ValueType > *  dst) const
virtual

Copy (accelerator matrix) to host matrix.

Implements paralution::AcceleratorMatrix< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::CreateFromMap ( const BaseVector< int > &  map,
const int  n,
const int  m 
)
virtualinherited

Create a restriction matrix operator based on an int vector map.

Reimplemented in paralution::HostMatrixCSR< ValueType >.

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::DiagonalMatrixMultL ( const BaseVector< ValueType > &  diag)
virtualinherited

Multiply the matrix with diagonal matrix (stored in LocalVector), this=diag*this (left multiplication)

Reimplemented in paralution::HostMatrixCSR< ValueType >, paralution::GPUAcceleratorMatrixCSR< ValueType >, and paralution::OCLAcceleratorMatrixCSR< ValueType >.

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::DiagonalMatrixMultR ( const BaseVector< ValueType > &  diag)
virtualinherited

Multiply the matrix with diagonal matrix (stored in LocalVector), this=this*diag (right multiplication)

Reimplemented in paralution::HostMatrixCSR< ValueType >, paralution::GPUAcceleratorMatrixCSR< ValueType >, and paralution::OCLAcceleratorMatrixCSR< ValueType >.

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::ExtractColumnVector ( const int  idx,
BaseVector< ValueType > *  vec 
) const
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::ExtractDiagonal ( BaseVector< ValueType > *  vec_diag) const
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::ExtractInverseDiagonal ( BaseVector< ValueType > *  vec_inv_diag) const
virtualinherited

Extract the inverse (reciprocal) diagonal values of the matrix into a LocalVector.

Reimplemented in paralution::GPUAcceleratorMatrixCSR< ValueType >, paralution::HostMatrixCSR< ValueType >, and paralution::OCLAcceleratorMatrixCSR< ValueType >.

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::ExtractL ( BaseMatrix< ValueType > *  L) const
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::ExtractLDiagonal ( BaseMatrix< ValueType > *  L) const
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::ExtractRowVector ( const int  idx,
BaseVector< ValueType > *  vec 
) const
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::ExtractSubMatrix ( const int  row_offset,
const int  col_offset,
const int  row_size,
const int  col_size,
BaseMatrix< ValueType > *  mat 
) const
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::ExtractU ( BaseMatrix< ValueType > *  U) const
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::ExtractUDiagonal ( BaseMatrix< ValueType > *  U) const
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::FSAI ( const int  power,
const BaseMatrix< ValueType > *  pattern 
)
virtualinherited

Factorized Sparse Approximate Inverse assembly for given system matrix power pattern or external sparsity pattern.

Reimplemented in paralution::HostMatrixCSR< ValueType >.

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::Gershgorin ( ValueType &  lambda_min,
ValueType &  lambda_max 
) const
virtualinherited

Compute the spectrum approximation with Gershgorin circles theorem.

Reimplemented in paralution::HostMatrixCSR< ValueType >, and paralution::GPUAcceleratorMatrixCSR< ValueType >.

template<typename ValueType>
virtual unsigned int paralution::MICAcceleratorMatrixDENSE< ValueType >::get_mat_format ( void  ) const
inlinevirtual

Return the matrix format id (see matrix_formats.hpp)

Implements paralution::BaseMatrix< ValueType >.

template<typename ValueType >
int paralution::BaseMatrix< ValueType >::get_ncol ( void  ) const
inlineinherited

Return the number of columns in the matrix.

Referenced by paralution::OCLAcceleratorMatrixELL< ValueType >::ConvertFrom(), paralution::MICAcceleratorMatrixBCSR< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixMCSR< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixCSR< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixDIA< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixELL< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixCOO< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixMCSR< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixBCSR< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixHYB< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixCSR< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixCOO< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixDIA< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixELL< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixHYB< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixMCSR< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixBCSR< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixDIA< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixELL< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixCSR< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixCOO< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixMCSR< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixBCSR< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixHYB< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixCSR< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixCOO< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixDIA< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixELL< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixHYB< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixMCSR< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixBCSR< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixDIA< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixELL< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixCSR< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixCOO< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixMCSR< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixBCSR< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixHYB< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixCSR< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixCOO< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixDIA< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixELL< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixHYB< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixMCSR< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixBCSR< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixELL< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixCSR< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixDIA< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixCOO< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixMCSR< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixBCSR< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixHYB< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixCSR< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixELL< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixCOO< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixDIA< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixHYB< ValueType >::CopyToHost(), and paralution::OCLAcceleratorMatrixCSR< ValueType >::MatrixAdd().

template<typename ValueType >
int paralution::BaseMatrix< ValueType >::get_nnz ( void  ) const
inlineinherited

Return the non-zeros of the matrix.

Referenced by paralution::HostMatrixBCSR< ValueType >::ConvertFrom(), paralution::HostMatrixMCSR< ValueType >::ConvertFrom(), paralution::MICAcceleratorMatrixMCSR< ValueType >::ConvertFrom(), paralution::MICAcceleratorMatrixBCSR< ValueType >::ConvertFrom(), paralution::MICAcceleratorMatrixDENSE< ValueType >::ConvertFrom(), paralution::HostMatrixDENSE< ValueType >::ConvertFrom(), paralution::MICAcceleratorMatrixELL< ValueType >::ConvertFrom(), paralution::MICAcceleratorMatrixDIA< ValueType >::ConvertFrom(), paralution::OCLAcceleratorMatrixMCSR< ValueType >::ConvertFrom(), paralution::HostMatrixDIA< ValueType >::ConvertFrom(), paralution::HostMatrixHYB< ValueType >::ConvertFrom(), paralution::OCLAcceleratorMatrixCOO< ValueType >::ConvertFrom(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::ConvertFrom(), paralution::MICAcceleratorMatrixHYB< ValueType >::ConvertFrom(), paralution::OCLAcceleratorMatrixBCSR< ValueType >::ConvertFrom(), paralution::HostMatrixELL< ValueType >::ConvertFrom(), paralution::OCLAcceleratorMatrixCSR< ValueType >::ConvertFrom(), paralution::OCLAcceleratorMatrixDIA< ValueType >::ConvertFrom(), paralution::OCLAcceleratorMatrixELL< ValueType >::ConvertFrom(), paralution::HostMatrixCOO< ValueType >::ConvertFrom(), paralution::OCLAcceleratorMatrixHYB< ValueType >::ConvertFrom(), paralution::HostMatrixCSR< ValueType >::ConvertFrom(), paralution::MICAcceleratorMatrixMCSR< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixBCSR< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixELL< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixCSR< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixDIA< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixCOO< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixMCSR< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixHYB< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixBCSR< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixCSR< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixDIA< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixELL< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixCOO< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixHYB< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixBCSR< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixMCSR< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixELL< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixCSR< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixDIA< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixCOO< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixMCSR< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixHYB< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixBCSR< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixCSR< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixDIA< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixCOO< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixELL< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixHYB< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixMCSR< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixBCSR< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixELL< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixCSR< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixDIA< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixCOO< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixMCSR< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixBCSR< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixHYB< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixCSR< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixDIA< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixELL< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixCOO< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixHYB< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixMCSR< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixBCSR< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixELL< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixCSR< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixDIA< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixCOO< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixMCSR< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixBCSR< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixHYB< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixCSR< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixDIA< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixELL< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixCOO< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixHYB< ValueType >::CopyToHost(), and paralution::OCLAcceleratorMatrixCSR< ValueType >::MatrixAdd().

template<typename ValueType >
int paralution::BaseMatrix< ValueType >::get_nrow ( void  ) const
inlineinherited

Return the number of rows in the matrix.

Referenced by paralution::OCLAcceleratorMatrixCSR< ValueType >::Compress(), paralution::OCLAcceleratorMatrixELL< ValueType >::ConvertFrom(), paralution::MICAcceleratorMatrixBCSR< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixMCSR< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixDIA< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixCSR< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixELL< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixCOO< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixMCSR< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixBCSR< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixHYB< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixCSR< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixCOO< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixDIA< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixELL< ValueType >::CopyFrom(), paralution::OCLAcceleratorMatrixHYB< ValueType >::CopyFrom(), paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixBCSR< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixMCSR< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixDIA< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixELL< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixCSR< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixCOO< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixMCSR< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixBCSR< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixHYB< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixCSR< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixCOO< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixDIA< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixELL< ValueType >::CopyFromHost(), paralution::OCLAcceleratorMatrixHYB< ValueType >::CopyFromHost(), paralution::MICAcceleratorMatrixBCSR< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixMCSR< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixDIA< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixCSR< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixELL< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixCOO< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixMCSR< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixBCSR< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixHYB< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixCSR< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixDIA< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixCOO< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixELL< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixHYB< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixMCSR< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixBCSR< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixELL< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixDIA< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixCOO< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixMCSR< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixHYB< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixBCSR< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixCSR< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixCOO< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixDIA< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixELL< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixHYB< ValueType >::CopyToHost(), and paralution::OCLAcceleratorMatrixCSR< ValueType >::MatrixAdd().

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::Householder ( const int  idx,
ValueType &  beta,
BaseVector< ValueType > *  vec 
) const
virtualinherited

Compute Householder vector.

Reimplemented in paralution::HostMatrixDENSE< ValueType >.

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::ICFactorize ( BaseVector< ValueType > *  inv_diag)
virtualinherited
template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::ILU0Factorize ( void  )
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::ILUpFactorizeNumeric ( const int  p,
const BaseMatrix< ValueType > &  mat 
)
virtualinherited

Perform ILU(p) factorization based on power (see power(q)-pattern method, D. Lukarski "Parallel Sparse Linear Algebra for Multi-core and Many-core Platforms - Parallel Solvers and Preconditioners", PhD Thesis, 2012, KIT)

Reimplemented in paralution::HostMatrixCSR< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::ILUTFactorize ( const double  t,
const int  maxrow 
)
virtualinherited

Perform ILU(t,m) factorization based on threshold and maximum number of elements per row.

Reimplemented in paralution::HostMatrixCSR< ValueType >.

template<typename ValueType >
void paralution::MICAcceleratorMatrixDENSE< ValueType >::info ( void  ) const
virtual

Shows simple info about the object.

Implements paralution::BaseMatrix< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::Invert ( void  )
virtualinherited

Invert this.

Reimplemented in paralution::HostMatrixDENSE< ValueType >.

template<typename ValueType >
void paralution::BaseMatrix< ValueType >::LAnalyse ( const bool  diag_unit = false)
virtualinherited

Analyse the structure (level-scheduling) L-part diag_unit == true the diag is 1; diag_unit == false the diag is 0;.

Reimplemented in paralution::HostMatrixCSR< ValueType >, paralution::GPUAcceleratorMatrixCSR< ValueType >, and paralution::OCLAcceleratorMatrixCSR< ValueType >.

template<typename ValueType >
void paralution::BaseMatrix< ValueType >::LAnalyseClear ( void  )
virtualinherited
template<typename ValueType>
void paralution::BaseMatrix< ValueType >::LeaveDataPtrCOO ( int **  row,
int **  col,
ValueType **  val 
)
virtualinherited

Leave a COO matrix to Host pointers.

Reimplemented in paralution::GPUAcceleratorMatrixCOO< ValueType >, and paralution::HostMatrixCOO< ValueType >.

template<typename ValueType>
void paralution::BaseMatrix< ValueType >::LeaveDataPtrCSR ( int **  row_offset,
int **  col,
ValueType **  val 
)
virtualinherited

Leave a CSR matrix to Host pointers.

Reimplemented in paralution::GPUAcceleratorMatrixCSR< ValueType >, and paralution::HostMatrixCSR< ValueType >.

template<typename ValueType>
void paralution::BaseMatrix< ValueType >::LeaveDataPtrDENSE ( ValueType **  val)
virtualinherited

Leave a DENSE matrix to Host pointers.

Reimplemented in paralution::GPUAcceleratorMatrixDENSE< ValueType >, and paralution::HostMatrixDENSE< ValueType >.

template<typename ValueType>
void paralution::BaseMatrix< ValueType >::LeaveDataPtrDIA ( int **  offset,
ValueType **  val,
int num_diag 
)
virtualinherited

Leave a DIA matrix to Host pointers.

Reimplemented in paralution::GPUAcceleratorMatrixDIA< ValueType >, and paralution::HostMatrixDIA< ValueType >.

template<typename ValueType>
void paralution::BaseMatrix< ValueType >::LeaveDataPtrELL ( int **  col,
ValueType **  val,
int max_row 
)
virtualinherited

Leave an ELL matrix to Host pointers.

Reimplemented in paralution::GPUAcceleratorMatrixELL< ValueType >, and paralution::HostMatrixELL< ValueType >.

template<typename ValueType >
void paralution::BaseMatrix< ValueType >::LLAnalyse ( void  )
virtualinherited
template<typename ValueType >
void paralution::BaseMatrix< ValueType >::LLAnalyseClear ( void  )
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::LLSolve ( const BaseVector< ValueType > &  in,
BaseVector< ValueType > *  out 
) const
virtualinherited

Solve LL^T out = in; if level-scheduling algorithm is provided then the graph.

Reimplemented in paralution::HostMatrixCSR< ValueType >, and paralution::GPUAcceleratorMatrixCSR< ValueType >.

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::LLSolve ( const BaseVector< ValueType > &  in,
const BaseVector< ValueType > &  inv_diag,
BaseVector< ValueType > *  out 
) const
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::LSolve ( const BaseVector< ValueType > &  in,
BaseVector< ValueType > *  out 
) const
virtualinherited

Solve L out = in; if level-scheduling algorithm is provided then the graph traversing is performed in parallel.

Reimplemented in paralution::HostMatrixCSR< ValueType >, and paralution::GPUAcceleratorMatrixCSR< ValueType >.

template<typename ValueType >
void paralution::BaseMatrix< ValueType >::LUAnalyse ( void  )
virtualinherited
template<typename ValueType >
void paralution::BaseMatrix< ValueType >::LUAnalyseClear ( void  )
virtualinherited
template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::LUFactorize ( void  )
virtualinherited

Perform LU factorization.

Reimplemented in paralution::HostMatrixDENSE< ValueType >.

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::LUSolve ( const BaseVector< ValueType > &  in,
BaseVector< ValueType > *  out 
) const
virtualinherited

Solve LU out = in; if level-scheduling algorithm is provided then the graph traversing is performed in parallel.

Reimplemented in paralution::HostMatrixCSR< ValueType >, paralution::GPUAcceleratorMatrixCSR< ValueType >, paralution::HostMatrixDENSE< ValueType >, and paralution::HostMatrixMCSR< ValueType >.

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::MatMatMult ( const BaseMatrix< ValueType > &  A,
const BaseMatrix< ValueType > &  B 
)
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::MatrixAdd ( const BaseMatrix< ValueType > &  mat,
const ValueType  alpha,
const ValueType  beta,
const bool  structure 
)
virtualinherited

Perform matrix addition, this = alpha*this + beta*mat; if structure==false the structure of the matrix is not changed, if structure==true new data structure is computed.

Reimplemented in paralution::HostMatrixCSR< ValueType >, paralution::GPUAcceleratorMatrixCSR< ValueType >, and paralution::OCLAcceleratorMatrixCSR< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::MaximalIndependentSet ( int size,
BaseVector< int > *  permutation 
) const
virtualinherited

Perform maximal independent set decomposition of the matrix; Returns the size of the maximal independent set and the corresponding permutation.

Reimplemented in paralution::GPUAcceleratorMatrixCSR< ValueType >, paralution::HostMatrixCSR< ValueType >, and paralution::OCLAcceleratorMatrixCSR< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::MultiColoring ( int num_colors,
int **  size_colors,
BaseVector< int > *  permutation 
) const
virtualinherited

Perform multi-coloring decomposition of the matrix; Returns number of colors, the corresponding sizes (the array is allocated in the function) and the permutation.

Reimplemented in paralution::GPUAcceleratorMatrixCSR< ValueType >, paralution::HostMatrixCSR< ValueType >, and paralution::OCLAcceleratorMatrixCSR< ValueType >.

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::NumericMatMatMult ( const BaseMatrix< ValueType > &  A,
const BaseMatrix< ValueType > &  B 
)
virtualinherited

Perform numerical matrix-matrix multiplication (i.e. value computation), this = A*B.

Reimplemented in paralution::HostMatrixCSR< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::PermuteBackward ( const BaseVector< int > &  permutation)
virtualinherited
template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::QRDecompose ( void  )
virtualinherited

QR Decomposition.

Reimplemented in paralution::HostMatrixDENSE< ValueType >.

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::QRSolve ( const BaseVector< ValueType > &  in,
BaseVector< ValueType > *  out 
) const
virtualinherited

Solve QR out = in.

Reimplemented in paralution::HostMatrixDENSE< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::RCMK ( BaseVector< int > *  permutation) const
virtualinherited

Create permutation vector for reverse CMK reordering of the matrix.

Reimplemented in paralution::HostMatrixCSR< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::ReadFileCSR ( const std::string  filename)
virtualinherited

Read matrix from CSR (PARALUTION binary format) file.

Reimplemented in paralution::HostMatrixCSR< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::ReadFileMTX ( const std::string  filename)
virtualinherited

Read matrix from MTX (Matrix Market Format) file.

Reimplemented in paralution::HostMatrixCOO< ValueType >.

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::ReplaceRowVector ( const int  idx,
const BaseVector< ValueType > &  vec 
)
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::Scale ( const ValueType  alpha)
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::ScaleDiagonal ( const ValueType  alpha)
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::ScaleOffDiagonal ( const ValueType  alpha)
virtualinherited
template<typename ValueType >
void paralution::BaseMatrix< ValueType >::set_backend ( const Paralution_Backend_Descriptor  local_backend)
virtualinherited

Copy the backend descriptor information.

Referenced by paralution::MICAcceleratorMatrixBCSR< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixMCSR< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixDIA< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixCSR< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixELL< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixCOO< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixMCSR< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixBCSR< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixHYB< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixCSR< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixCOO< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixDIA< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixELL< ValueType >::CopyTo(), paralution::OCLAcceleratorMatrixHYB< ValueType >::CopyTo(), paralution::MICAcceleratorMatrixMCSR< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixBCSR< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixDENSE< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixDIA< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixCSR< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixELL< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixCOO< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixMCSR< ValueType >::CopyToHost(), paralution::MICAcceleratorMatrixHYB< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixBCSR< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixCSR< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixELL< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixDIA< ValueType >::CopyToHost(), paralution::OCLAcceleratorMatrixCOO< ValueType >::CopyToHost(), and paralution::OCLAcceleratorMatrixHYB< ValueType >::CopyToHost().

template<typename ValueType>
void paralution::BaseMatrix< ValueType >::SetDataPtrCOO ( int **  row,
int **  col,
ValueType **  val,
const int  nnz,
const int  nrow,
const int  ncol 
)
virtualinherited

Initialize a COO matrix on the Host with externally allocated data.

Reimplemented in paralution::GPUAcceleratorMatrixCOO< ValueType >, and paralution::HostMatrixCOO< ValueType >.

template<typename ValueType>
void paralution::BaseMatrix< ValueType >::SetDataPtrCSR ( int **  row_offset,
int **  col,
ValueType **  val,
const int  nnz,
const int  nrow,
const int  ncol 
)
virtualinherited

Initialize a CSR matrix on the Host with externally allocated data.

Reimplemented in paralution::GPUAcceleratorMatrixCSR< ValueType >, and paralution::HostMatrixCSR< ValueType >.

template<typename ValueType>
void paralution::BaseMatrix< ValueType >::SetDataPtrDENSE ( ValueType **  val,
const int  nrow,
const int  ncol 
)
virtualinherited

Initialize a DENSE matrix on the Host with externally allocated data.

Reimplemented in paralution::GPUAcceleratorMatrixDENSE< ValueType >, and paralution::HostMatrixDENSE< ValueType >.

template<typename ValueType>
void paralution::BaseMatrix< ValueType >::SetDataPtrDIA ( int **  offset,
ValueType **  val,
const int  nnz,
const int  nrow,
const int  ncol,
const int  num_diag 
)
virtualinherited

Initialize a DIA matrix on the Host with externally allocated data.

Reimplemented in paralution::GPUAcceleratorMatrixDIA< ValueType >, and paralution::HostMatrixDIA< ValueType >.

template<typename ValueType>
void paralution::BaseMatrix< ValueType >::SetDataPtrELL ( int **  col,
ValueType **  val,
const int  nnz,
const int  nrow,
const int  ncol,
const int  max_row 
)
virtualinherited

Initialize an ELL matrix on the Host with externally allocated data.

Reimplemented in paralution::GPUAcceleratorMatrixELL< ValueType >, and paralution::HostMatrixELL< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::Sort ( void  )
virtualinherited

Sort the matrix indices.

Reimplemented in paralution::HostMatrixCSR< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::SPAI ( void  )
virtualinherited

SParse Approximate Inverse assembly for given system matrix pattern.

Reimplemented in paralution::HostMatrixCSR< ValueType >.

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::SymbolicMatMatMult ( const BaseMatrix< ValueType > &  src)
virtualinherited

Perform symbolic matrix-matrix multiplication (i.e. determine the structure), this = this*src.

Reimplemented in paralution::HostMatrixCSR< ValueType >.

template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::SymbolicMatMatMult ( const BaseMatrix< ValueType > &  A,
const BaseMatrix< ValueType > &  B 
)
virtualinherited

Perform symbolic matrix-matrix multiplication (i.e. determine the structure), this = A*B.

Reimplemented in paralution::HostMatrixCSR< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::SymbolicPower ( const int  p)
virtualinherited

Perform symbolic computation (structure only) of |this|^p.

Reimplemented in paralution::HostMatrixCSR< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::Transpose ( void  )
virtualinherited
template<typename ValueType >
void paralution::BaseMatrix< ValueType >::UAnalyse ( const bool  diag_unit = false)
virtualinherited

Analyse the structure (level-scheduling) U-part; diag_unit == true the diag is 1; diag_unit == false the diag is 0;.

Reimplemented in paralution::HostMatrixCSR< ValueType >, paralution::GPUAcceleratorMatrixCSR< ValueType >, and paralution::OCLAcceleratorMatrixCSR< ValueType >.

template<typename ValueType >
void paralution::BaseMatrix< ValueType >::UAnalyseClear ( void  )
virtualinherited
template<typename ValueType>
bool paralution::BaseMatrix< ValueType >::USolve ( const BaseVector< ValueType > &  in,
BaseVector< ValueType > *  out 
) const
virtualinherited

Solve U out = in; if level-scheduling algorithm is provided then the graph traversing is performed in parallel.

Reimplemented in paralution::HostMatrixCSR< ValueType >, and paralution::GPUAcceleratorMatrixCSR< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::WriteFileCSR ( const std::string  filename) const
virtualinherited

Write matrix to CSR (PARALUTION binary format) file.

Reimplemented in paralution::HostMatrixCSR< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::WriteFileMTX ( const std::string  filename) const
virtualinherited

Write matrix to MTX (Matrix Market Format) file.

Reimplemented in paralution::HostMatrixCOO< ValueType >.

template<typename ValueType >
bool paralution::BaseMatrix< ValueType >::ZeroBlockPermutation ( int size,
BaseVector< int > *  permutation 
) const
virtualinherited

Return a permutation for saddle-point problems (zero diagonal entries), where all zero diagonal elements are mapped to the last block; the return size is the size of the first block.

Reimplemented in paralution::HostMatrixCSR< ValueType >.

Friends And Related Function Documentation

template<typename ValueType>
friend class AcceleratorVector< ValueType >
friend
template<typename ValueType>
friend class BaseVector< ValueType >
friend
template<typename ValueType>
friend class MICAcceleratorVector< ValueType >
friend

Field Documentation

template<typename ValueType>
Paralution_Backend_Descriptor paralution::BaseMatrix< ValueType >::local_backend_
protectedinherited

Backend descriptor (local copy)

template<typename ValueType>
MatrixDENSE<ValueType> paralution::MICAcceleratorMatrixDENSE< ValueType >::mat_
private

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