ug4
CRS Algebra

Modules

 CPU Algebra
 

Classes

struct  ug::CPUBlockAlgebra< TBlockSize >
 
struct  ug::CPUVariableBlockAlgebra
 
class  ug::GPUVector< TValueType >
 

Typedefs

typedef ParallelMatrix< SparseMatrix< double > > ug::CPUAlgebra::matrix_type
 
typedef ParallelMatrix< SparseMatrix< DenseMatrix< FixedArray2< double, TBlockSize, TBlockSize > > > > ug::CPUBlockAlgebra< TBlockSize >::matrix_type
 
typedef ParallelMatrix< SparseMatrix< DenseMatrix< VariableArray2< double > > > > ug::CPUVariableBlockAlgebra::matrix_type
 
typedef ParallelVector< Vector< double > > ug::CPUAlgebra::vector_type
 
typedef ParallelVector< Vector< DenseVector< FixedArray1< double, TBlockSize > > > > ug::CPUBlockAlgebra< TBlockSize >::vector_type
 
typedef ParallelVector< Vector< DenseVector< VariableArray1< double > > > > ug::CPUVariableBlockAlgebra::vector_type
 

Functions

SmartPtr< vector_typeug::GPUVector< TValueType >::clone () const
 clones the vector (deep-copy) including values More...
 
SmartPtr< vector_typeug::GPUVector< TValueType >::clone_without_values () const
 clones the vector (deep-copy) excluding values More...
 
static AlgebraType ug::CPUAlgebra::get_type ()
 
static AlgebraType ug::CPUBlockAlgebra< TBlockSize >::get_type ()
 
static AlgebraType ug::CPUVariableBlockAlgebra::get_type ()
 
void ug::SparseMatrix< TValueType >::print (const char *const name=NULL) const
 
void ug::GPUSparseMatrix< TValueType >::print (const char *const name=NULL) const
 
void ug::SparseMatrix< TValueType >::printrow (size_t row) const
 
void ug::GPUSparseMatrix< TValueType >::printrow (size_t row) const
 
void ug::SparseMatrix< TValueType >::printtype () const
 
void ug::GPUSparseMatrix< TValueType >::printtype () const
 
template<typename T >
void ug::VecAssign (GPUVector< T > &dest, const GPUVector< T > &v1)
 sets dest = v1 entrywise More...
 
template<typename T >
double ug::VecNormSquared (const GPUVector< T > &a, const GPUVector< T > &b)
 returns norm_2^2(a) More...
 
template<typename T >
void ug::VecNormSquaredAdd (const GPUVector< T > &a, const GPUVector< T > &b, double &sum)
 calculates s += norm_2^2(a) More...
 
template<typename T >
double ug::VecProd (const GPUVector< T > &v1, const GPUVector< T > &v2)
 returns scal<a, b> More...
 
template<typename T >
void ug::VecProd (const GPUVector< T > &v1, const GPUVector< T > &v2, double &res)
 calculates s += scal<a, b> More...
 
template<typename T >
void ug::VecScaleAdd (GPUVector< T > &dest, double alpha1, const GPUVector< T > &v1, double alpha2, const GPUVector< T > &v2)
 calculates dest = alpha1*v1 + alpha2*v2 More...
 
template<typename T >
void ug::VecScaleAdd (GPUVector< T > &dest, double alpha1, const GPUVector< T > &v1, double alpha2, const GPUVector< T > &v2, double alpha3, const GPUVector< T > &v3)
 calculates dest = alpha1*v1 + alpha2*v2 + alpha3*v3 More...
 
template<typename T >
void ug::VecScaleAssign (GPUVector< T > &dest, double alpha1, const GPUVector< T > &v1)
 calculates dest = alpha1*v1 More...
 
virtual vector_typeug::GPUVector< TValueType >::virtual_clone () const
 virtual clone using covariant return type More...
 
virtual vector_typeug::GPUVector< TValueType >::virtual_clone_without_values () const
 virtual clone using covariant return type excluding values More...
 

Variables

static const int ug::CPUAlgebra::blockSize = 1
 
static const int ug::CPUBlockAlgebra< TBlockSize >::blockSize = TBlockSize
 
static const int ug::CPUVariableBlockAlgebra::blockSize = AlgebraType::VariableBlockSize
 

Detailed Description

Typedef Documentation

◆ matrix_type [1/3]

◆ matrix_type [2/3]

template<int TBlockSize>
typedef ParallelMatrix<SparseMatrix<DenseMatrix<FixedArray2<double, TBlockSize, TBlockSize> > > > ug::CPUBlockAlgebra< TBlockSize >::matrix_type

◆ matrix_type [3/3]

◆ vector_type [1/3]

◆ vector_type [2/3]

template<int TBlockSize>
typedef ParallelVector<Vector<DenseVector<FixedArray1<double, TBlockSize> > > > ug::CPUBlockAlgebra< TBlockSize >::vector_type

◆ vector_type [3/3]

Function Documentation

◆ clone()

template<typename value_type >
SmartPtr< GPUVector< value_type > > ug::GPUVector< value_type >::clone

clones the vector (deep-copy) including values

◆ clone_without_values()

template<typename value_type >
SmartPtr< GPUVector< value_type > > ug::GPUVector< value_type >::clone_without_values

clones the vector (deep-copy) excluding values

◆ get_type() [1/3]

static AlgebraType ug::CPUAlgebra::get_type ( )
inlinestatic

References ug::AlgebraType::CPU.

◆ get_type() [2/3]

template<int TBlockSize>
static AlgebraType ug::CPUBlockAlgebra< TBlockSize >::get_type ( )
inlinestatic

References ug::AlgebraType::CPU.

◆ get_type() [3/3]

static AlgebraType ug::CPUVariableBlockAlgebra::get_type ( )
inlinestatic

◆ print() [1/2]

template<typename T >
void SparseMatrix< T >::print ( const char *const  text = NULL) const

◆ print() [2/2]

template<typename T >
void ug::GPUSparseMatrix< T >::print ( const char *const  text = NULL) const

print to console whole GPUSparseMatrix

References num_cols(), num_rows(), and UG_LOG.

Referenced by ug::GPUSparseMatrix< TValueType >::p().

◆ printrow() [1/2]

template<typename T >
void SparseMatrix< T >::printrow ( size_t  row) const

print the row row to the console

References begin_row(), end_row(), and UG_LOG.

Referenced by ug::SparseMatrix< TValueType >::pr().

◆ printrow() [2/2]

template<typename T >
void ug::GPUSparseMatrix< T >::printrow ( size_t  row) const

print the row row to the console

References begin_row(), end_row(), and UG_LOG.

Referenced by ug::GPUSparseMatrix< TValueType >::pr().

◆ printtype() [1/2]

template<typename T >
void SparseMatrix< T >::printtype

◆ printtype() [2/2]

template<typename T >
void ug::GPUSparseMatrix< T >::printtype

◆ VecAssign()

template<typename T >
void ug::VecAssign ( GPUVector< T > &  dest,
const GPUVector< T > &  v1 
)
inline

sets dest = v1 entrywise

References ug::GPUVector< TValueType >::size(), and UG_LOG.

◆ VecNormSquared()

template<typename T >
double ug::VecNormSquared ( const GPUVector< T > &  a,
const GPUVector< T > &  b 
)
inline

returns norm_2^2(a)

References UG_LOG, and ug::VecNormSquaredAdd().

◆ VecNormSquaredAdd()

template<typename T >
void ug::VecNormSquaredAdd ( const GPUVector< T > &  a,
const GPUVector< T > &  b,
double &  sum 
)
inline

calculates s += norm_2^2(a)

References ug::GPUVector< TValueType >::size(), UG_LOG, and ug::VecNormSquaredAdd().

◆ VecProd() [1/2]

template<typename T >
double ug::VecProd ( const GPUVector< T > &  v1,
const GPUVector< T > &  v2 
)
inline

returns scal<a, b>

References ug::VecProd().

◆ VecProd() [2/2]

template<typename T >
void ug::VecProd ( const GPUVector< T > &  v1,
const GPUVector< T > &  v2,
double &  res 
)
inline

◆ VecScaleAdd() [1/2]

template<typename T >
void ug::VecScaleAdd ( GPUVector< T > &  dest,
double  alpha1,
const GPUVector< T > &  v1,
double  alpha2,
const GPUVector< T > &  v2 
)
inline

calculates dest = alpha1*v1 + alpha2*v2

References CUDA_VecAdd_2(), ug::GPUVector< TValueType >::get_dev_ptr(), and ug::GPUVector< TValueType >::size().

◆ VecScaleAdd() [2/2]

template<typename T >
void ug::VecScaleAdd ( GPUVector< T > &  dest,
double  alpha1,
const GPUVector< T > &  v1,
double  alpha2,
const GPUVector< T > &  v2,
double  alpha3,
const GPUVector< T > &  v3 
)
inline

calculates dest = alpha1*v1 + alpha2*v2 + alpha3*v3

References CUDA_VecAdd_3(), ug::GPUVector< TValueType >::get_dev_ptr(), and ug::GPUVector< TValueType >::size().

◆ VecScaleAssign()

template<typename T >
void ug::VecScaleAssign ( GPUVector< T > &  dest,
double  alpha1,
const GPUVector< T > &  v1 
)
inline

calculates dest = alpha1*v1

References ug::GPUVector< TValueType >::size(), UG_LOG, and ug::VecScaleAssign().

◆ virtual_clone()

template<typename value_type >
GPUVector< value_type > * ug::GPUVector< value_type >::virtual_clone
protectedvirtual

virtual clone using covariant return type

Reimplemented from ug::Vector< TValueType >.

◆ virtual_clone_without_values()

template<typename value_type >
GPUVector< value_type > * ug::GPUVector< value_type >::virtual_clone_without_values
protectedvirtual

virtual clone using covariant return type excluding values

Reimplemented from ug::Vector< TValueType >.

Variable Documentation

◆ blockSize [1/3]

const int ug::CPUAlgebra::blockSize = 1
static

◆ blockSize [2/3]

template<int TBlockSize>
const int ug::CPUBlockAlgebra< TBlockSize >::blockSize = TBlockSize
static

◆ blockSize [3/3]

const int ug::CPUVariableBlockAlgebra::blockSize = AlgebraType::VariableBlockSize
static