PARALUTION  1.0.0
PARALUTION
paralution::AcceleratorVector< ValueType > Class Template Referenceabstract

#include <backend_manager.hpp>

Inheritance diagram for paralution::AcceleratorVector< ValueType >:
paralution::BaseVector< ValueType > paralution::GPUAcceleratorVector< ValueType > paralution::MICAcceleratorVector< ValueType > paralution::OCLAcceleratorVector< ValueType >

Public Member Functions

 AcceleratorVector ()
 
virtual ~AcceleratorVector ()
 
virtual void CopyFromHost (const HostVector< ValueType > &src)=0
 Copy (accelerator vector) from host vector. More...
 
virtual void CopyToHost (HostVector< ValueType > *dst) const =0
 Copy (host vector) from accelerator vector. More...
 
virtual void CopyFromHostAsync (const HostVector< ValueType > &src)
 Async copy (accelerator vector) from host vector. More...
 
virtual void CopyToHostAsync (HostVector< ValueType > *dst) const
 Async copy (host vector) from accelerator vector. More...
 
virtual void info (void) const =0
 Shows info about the object. More...
 
int get_size (void) const
 Returns the size of the vector. More...
 
void set_backend (const Paralution_Backend_Descriptor local_backend)
 Copy the backend descriptor information. More...
 
virtual bool Check (void) const
 Check if everything is ok. More...
 
virtual void Allocate (const int n)=0
 Allocate a local vector with name and size. More...
 
virtual void SetDataPtr (ValueType **ptr, const int size)=0
 Initialize a vector with externally allocated data. More...
 
virtual void LeaveDataPtr (ValueType **ptr)=0
 Get a pointer from the vector data and free the vector object. More...
 
virtual void Assemble (const int *i, const ValueType *v, int size, const int n)
 Assembling. More...
 
virtual void Clear (void)=0
 Clear (free) the vector. More...
 
virtual void Zeros (void)=0
 Set the values of the vector to zero. More...
 
virtual void Ones (void)=0
 Set the values of the vector to one. More...
 
virtual void SetValues (const ValueType val)=0
 Set the values of the vector to given argument. More...
 
virtual void Permute (const BaseVector< int > &permutation)=0
 Perform inplace permutation (forward) of the vector. More...
 
virtual void PermuteBackward (const BaseVector< int > &permutation)=0
 Perform inplace permutation (backward) of the vector. More...
 
virtual void CopyFrom (const BaseVector< ValueType > &vec)=0
 Copy values from another vector. More...
 
virtual void CopyFrom (const BaseVector< ValueType > &src, const int src_offset, const int dst_offset, const int size)=0
 Copy data (not entire vector) from another vector with specified src/dst offsets and size. More...
 
virtual void CopyFromAsync (const BaseVector< ValueType > &vec)
 Async copy values from another vector. More...
 
virtual void CopyFromFloat (const BaseVector< float > &vec)
 Copy values from another (float) vector. More...
 
virtual void CopyFromDouble (const BaseVector< double > &vec)
 Copy values from another (double) vector. More...
 
virtual void CopyTo (BaseVector< ValueType > *vec) const =0
 Copy values to another vector. More...
 
virtual void CopyToAsync (BaseVector< ValueType > *vec) const
 Async copy values to another vector. More...
 
virtual void CopyFromPermute (const BaseVector< ValueType > &src, const BaseVector< int > &permutation)=0
 Copy a vector under specified permutation (forward permutation) More...
 
virtual void CopyFromPermuteBackward (const BaseVector< ValueType > &src, const BaseVector< int > &permutation)=0
 Copy a vector under specified permutation (backward permutation) More...
 
virtual void CopyFromData (const ValueType *data)
 
virtual void CopyToData (ValueType *data) const
 
virtual bool Restriction (const BaseVector< ValueType > &vec_fine, const BaseVector< int > &map)
 Restriction operator based on restriction mapping vector. More...
 
virtual bool Prolongation (const BaseVector< ValueType > &vec_coarse, const BaseVector< int > &map)
 Prolongation operator based on restriction(!) mapping vector. More...
 
virtual void AddScale (const BaseVector< ValueType > &x, const ValueType alpha)=0
 Perform vector update of type this = this + alpha*x. More...
 
virtual void ScaleAdd (const ValueType alpha, const BaseVector< ValueType > &x)=0
 Perform vector update of type this = alpha*this + x. More...
 
virtual void ScaleAddScale (const ValueType alpha, const BaseVector< ValueType > &x, const ValueType beta)=0
 Perform vector update of type this = alpha*this + x*beta. More...
 
virtual void ScaleAddScale (const ValueType alpha, const BaseVector< ValueType > &x, const ValueType beta, const int src_offset, const int dst_offset, const int size)=0
 
virtual void ScaleAdd2 (const ValueType alpha, const BaseVector< ValueType > &x, const ValueType beta, const BaseVector< ValueType > &y, const ValueType gamma)=0
 Perform vector update of type this = alpha*this + x*beta + y*gamma. More...
 
virtual void Scale (const ValueType alpha)=0
 Perform vector scaling this = alpha*this. More...
 
virtual void PartialSum (const BaseVector< ValueType > &x)=0
 Compute partial sum. More...
 
virtual ValueType Dot (const BaseVector< ValueType > &x) const =0
 Compute dot (scalar) product, return this^T y. More...
 
virtual ValueType DotNonConj (const BaseVector< ValueType > &x) const =0
 Compute non-conjugated dot (scalar) product, return this^T y. More...
 
virtual ValueType Norm (void) const =0
 Compute L2 norm of the vector, return = srqt(this^T this) More...
 
virtual ValueType Reduce (void) const =0
 Reduce vector. More...
 
virtual ValueType Asum (void) const =0
 Compute sum of absolute values of the vector (L1 norm), return = sum(|this|) More...
 
virtual int Amax (ValueType &value) const =0
 Compute the absolute max value of the vector, return = max(|this|) More...
 
virtual void PointWiseMult (const BaseVector< ValueType > &x)=0
 Perform point-wise multiplication (element-wise) of type this = this * x. More...
 
virtual void PointWiseMult (const BaseVector< ValueType > &x, const BaseVector< ValueType > &y)=0
 Perform point-wise multiplication (element-wise) of type this = x*y. More...
 
virtual void Power (const double power)=0
 

Protected Attributes

int size_
 The size of the vector. More...
 
Paralution_Backend_Descriptor local_backend_
 Backend descriptor (local copy) More...
 

Constructor & Destructor Documentation

template<typename ValueType >
paralution::AcceleratorVector< ValueType >::AcceleratorVector ( )
template<typename ValueType >
paralution::AcceleratorVector< ValueType >::~AcceleratorVector ( )
virtual

Member Function Documentation

template<typename ValueType>
virtual void paralution::BaseVector< ValueType >::AddScale ( const BaseVector< ValueType > &  x,
const ValueType  alpha 
)
pure virtualinherited
template<typename ValueType>
virtual int paralution::BaseVector< ValueType >::Amax ( ValueType &  value) const
pure virtualinherited
template<typename ValueType>
void paralution::BaseVector< ValueType >::Assemble ( const int i,
const ValueType *  v,
int  size,
const int  n 
)
virtualinherited
template<typename ValueType >
bool paralution::BaseVector< ValueType >::Check ( void  ) const
virtualinherited
template<typename ValueType>
virtual void paralution::BaseVector< ValueType >::CopyFrom ( const BaseVector< ValueType > &  src,
const int  src_offset,
const int  dst_offset,
const int  size 
)
pure virtualinherited
template<typename ValueType>
void paralution::BaseVector< ValueType >::CopyFromAsync ( const BaseVector< ValueType > &  vec)
virtualinherited

Async copy values from another vector.

Reimplemented in paralution::GPUAcceleratorVector< ValueType >.

Referenced by paralution::LocalVector< ValueType >::MoveToHostAsync().

template<typename ValueType>
void paralution::BaseVector< ValueType >::CopyFromData ( const ValueType *  data)
virtualinherited
template<typename ValueType>
virtual void paralution::AcceleratorVector< ValueType >::CopyFromHost ( const HostVector< ValueType > &  src)
pure virtual
template<typename ValueType>
void paralution::AcceleratorVector< ValueType >::CopyFromHostAsync ( const HostVector< ValueType > &  src)
virtual

Async copy (accelerator vector) from host vector.

Reimplemented in paralution::GPUAcceleratorVector< ValueType >.

template<typename ValueType>
virtual void paralution::BaseVector< ValueType >::CopyFromPermute ( const BaseVector< ValueType > &  src,
const BaseVector< int > &  permutation 
)
pure virtualinherited
template<typename ValueType>
virtual void paralution::BaseVector< ValueType >::CopyFromPermuteBackward ( const BaseVector< ValueType > &  src,
const BaseVector< int > &  permutation 
)
pure virtualinherited
template<typename ValueType>
void paralution::BaseVector< ValueType >::CopyToAsync ( BaseVector< ValueType > *  vec) const
virtualinherited

Async copy values to another vector.

Reimplemented in paralution::GPUAcceleratorVector< ValueType >.

template<typename ValueType>
void paralution::BaseVector< ValueType >::CopyToData ( ValueType *  data) const
virtualinherited
template<typename ValueType>
virtual void paralution::AcceleratorVector< ValueType >::CopyToHost ( HostVector< ValueType > *  dst) const
pure virtual
template<typename ValueType>
void paralution::AcceleratorVector< ValueType >::CopyToHostAsync ( HostVector< ValueType > *  dst) const
virtual

Async copy (host vector) from accelerator vector.

Reimplemented in paralution::GPUAcceleratorVector< ValueType >.

template<typename ValueType>
virtual ValueType paralution::BaseVector< ValueType >::Dot ( const BaseVector< ValueType > &  x) const
pure virtualinherited
template<typename ValueType>
virtual ValueType paralution::BaseVector< ValueType >::DotNonConj ( const BaseVector< ValueType > &  x) const
pure virtualinherited
template<typename ValueType >
int paralution::BaseVector< ValueType >::get_size ( void  ) const
inlineinherited

Returns the size of the vector.

Referenced by paralution::MICAcceleratorVector< ValueType >::AddScale(), paralution::OCLAcceleratorVector< ValueType >::AddScale(), paralution::HostMatrixCSR< ValueType >::AMGAggregation(), paralution::HostMatrixCSR< ValueType >::AMGSmoothedAggregation(), paralution::HostStencilLaplace2D< ValueType >::Apply(), paralution::HostMatrixBCSR< ValueType >::Apply(), paralution::HostMatrixDENSE< ValueType >::Apply(), paralution::MICAcceleratorMatrixMCSR< ValueType >::Apply(), paralution::HostMatrixDIA< ValueType >::Apply(), paralution::HostMatrixHYB< ValueType >::Apply(), paralution::MICAcceleratorMatrixCSR< ValueType >::Apply(), paralution::MICAcceleratorMatrixDIA< ValueType >::Apply(), paralution::MICAcceleratorMatrixELL< ValueType >::Apply(), paralution::HostMatrixELL< ValueType >::Apply(), paralution::HostMatrixMCSR< ValueType >::Apply(), paralution::MICAcceleratorMatrixCOO< ValueType >::Apply(), paralution::OCLAcceleratorMatrixMCSR< ValueType >::Apply(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::Apply(), paralution::MICAcceleratorMatrixHYB< ValueType >::Apply(), paralution::OCLAcceleratorMatrixCOO< ValueType >::Apply(), paralution::OCLAcceleratorMatrixDIA< ValueType >::Apply(), paralution::OCLAcceleratorMatrixELL< ValueType >::Apply(), paralution::OCLAcceleratorMatrixHYB< ValueType >::Apply(), paralution::HostMatrixCOO< ValueType >::Apply(), paralution::OCLAcceleratorMatrixCSR< ValueType >::Apply(), paralution::HostMatrixCSR< ValueType >::Apply(), paralution::HostStencilLaplace2D< ValueType >::ApplyAdd(), paralution::HostMatrixBCSR< ValueType >::ApplyAdd(), paralution::HostMatrixDENSE< ValueType >::ApplyAdd(), paralution::MICAcceleratorMatrixMCSR< ValueType >::ApplyAdd(), paralution::HostMatrixDIA< ValueType >::ApplyAdd(), paralution::HostMatrixHYB< ValueType >::ApplyAdd(), paralution::MICAcceleratorMatrixCSR< ValueType >::ApplyAdd(), paralution::MICAcceleratorMatrixDIA< ValueType >::ApplyAdd(), paralution::MICAcceleratorMatrixELL< ValueType >::ApplyAdd(), paralution::HostMatrixELL< ValueType >::ApplyAdd(), paralution::HostMatrixMCSR< ValueType >::ApplyAdd(), paralution::MICAcceleratorMatrixCOO< ValueType >::ApplyAdd(), paralution::OCLAcceleratorMatrixMCSR< ValueType >::ApplyAdd(), paralution::MICAcceleratorMatrixHYB< ValueType >::ApplyAdd(), paralution::OCLAcceleratorMatrixCOO< ValueType >::ApplyAdd(), paralution::OCLAcceleratorMatrixDIA< ValueType >::ApplyAdd(), paralution::OCLAcceleratorMatrixELL< ValueType >::ApplyAdd(), paralution::OCLAcceleratorMatrixHYB< ValueType >::ApplyAdd(), paralution::HostMatrixCOO< ValueType >::ApplyAdd(), paralution::OCLAcceleratorMatrixCSR< ValueType >::ApplyAdd(), paralution::HostMatrixCSR< ValueType >::ApplyAdd(), paralution::MICAcceleratorVector< ValueType >::CopyFrom(), paralution::OCLAcceleratorVector< ValueType >::CopyFrom(), paralution::OCLAcceleratorVector< ValueType >::CopyFromDouble(), paralution::OCLAcceleratorVector< ValueType >::CopyFromFloat(), paralution::MICAcceleratorVector< ValueType >::CopyFromHost(), paralution::OCLAcceleratorVector< ValueType >::CopyFromHost(), paralution::MICAcceleratorVector< ValueType >::CopyFromPermute(), paralution::OCLAcceleratorVector< ValueType >::CopyFromPermute(), paralution::MICAcceleratorVector< ValueType >::CopyFromPermuteBackward(), paralution::OCLAcceleratorVector< ValueType >::CopyFromPermuteBackward(), paralution::MICAcceleratorVector< ValueType >::CopyTo(), paralution::OCLAcceleratorVector< ValueType >::CopyTo(), paralution::MICAcceleratorVector< ValueType >::CopyToHost(), paralution::OCLAcceleratorVector< ValueType >::CopyToHost(), paralution::HostMatrixCSR< ValueType >::CreateFromMap(), paralution::OCLAcceleratorMatrixCSR< ValueType >::DiagonalMatrixMultL(), paralution::HostMatrixCSR< ValueType >::DiagonalMatrixMultL(), paralution::OCLAcceleratorMatrixCSR< ValueType >::DiagonalMatrixMultR(), paralution::HostMatrixCSR< ValueType >::DiagonalMatrixMultR(), paralution::MICAcceleratorVector< ValueType >::Dot(), paralution::OCLAcceleratorVector< ValueType >::Dot(), paralution::OCLAcceleratorVector< ValueType >::DotNonConj(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::ExtractColumnVector(), paralution::HostMatrixDENSE< ValueType >::ExtractColumnVector(), paralution::OCLAcceleratorMatrixCSR< ValueType >::ExtractColumnVector(), paralution::HostMatrixCSR< ValueType >::ExtractColumnVector(), paralution::OCLAcceleratorMatrixCSR< ValueType >::ExtractDiagonal(), paralution::HostMatrixCSR< ValueType >::ExtractDiagonal(), paralution::OCLAcceleratorMatrixCSR< ValueType >::ExtractInverseDiagonal(), paralution::HostMatrixCSR< ValueType >::ExtractInverseDiagonal(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::ExtractRowVector(), paralution::HostMatrixDENSE< ValueType >::ExtractRowVector(), paralution::HostMatrixCSR< ValueType >::ExtractRowVector(), paralution::HostMatrixDENSE< ValueType >::Householder(), paralution::HostMatrixCSR< ValueType >::LLSolve(), paralution::HostMatrixCSR< ValueType >::LSolve(), paralution::HostMatrixMCSR< ValueType >::LUSolve(), paralution::HostMatrixDENSE< ValueType >::LUSolve(), paralution::HostMatrixCSR< ValueType >::LUSolve(), paralution::OCLAcceleratorMatrixCSR< ValueType >::MaximalIndependentSet(), paralution::OCLAcceleratorMatrixCSR< ValueType >::MultiColoring(), paralution::HostMatrixCSR< ValueType >::MultiColoring(), paralution::HostMatrixCOO< ValueType >::Permute(), paralution::OCLAcceleratorMatrixCSR< ValueType >::Permute(), paralution::MICAcceleratorVector< ValueType >::Permute(), paralution::OCLAcceleratorVector< ValueType >::Permute(), paralution::HostMatrixCSR< ValueType >::Permute(), paralution::HostMatrixCOO< ValueType >::PermuteBackward(), paralution::MICAcceleratorVector< ValueType >::PermuteBackward(), paralution::OCLAcceleratorVector< ValueType >::PermuteBackward(), paralution::MICAcceleratorVector< ValueType >::PointWiseMult(), paralution::OCLAcceleratorVector< ValueType >::PointWiseMult(), paralution::HostMatrixDENSE< ValueType >::QRSolve(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::ReplaceColumnVector(), paralution::HostMatrixDENSE< ValueType >::ReplaceColumnVector(), paralution::OCLAcceleratorMatrixCSR< ValueType >::ReplaceColumnVector(), paralution::HostMatrixCSR< ValueType >::ReplaceColumnVector(), paralution::OCLAcceleratorMatrixDENSE< ValueType >::ReplaceRowVector(), paralution::HostMatrixDENSE< ValueType >::ReplaceRowVector(), paralution::HostMatrixCSR< ValueType >::ReplaceRowVector(), paralution::MICAcceleratorVector< ValueType >::ScaleAdd(), paralution::OCLAcceleratorVector< ValueType >::ScaleAdd(), paralution::MICAcceleratorVector< ValueType >::ScaleAdd2(), paralution::OCLAcceleratorVector< ValueType >::ScaleAdd2(), paralution::MICAcceleratorVector< ValueType >::ScaleAddScale(), paralution::OCLAcceleratorVector< ValueType >::ScaleAddScale(), paralution::HostMatrixCSR< ValueType >::SPAI(), paralution::HostMatrixCSR< ValueType >::USolve(), and paralution::HostMatrixCSR< ValueType >::ZeroBlockPermutation().

template<typename ValueType>
virtual void paralution::BaseVector< ValueType >::LeaveDataPtr ( ValueType **  ptr)
pure virtualinherited
template<typename ValueType>
virtual void paralution::BaseVector< ValueType >::Permute ( const BaseVector< int > &  permutation)
pure virtualinherited
template<typename ValueType>
virtual void paralution::BaseVector< ValueType >::PermuteBackward ( const BaseVector< int > &  permutation)
pure virtualinherited
template<typename ValueType>
virtual void paralution::BaseVector< ValueType >::PointWiseMult ( const BaseVector< ValueType > &  x)
pure virtualinherited
template<typename ValueType>
virtual void paralution::BaseVector< ValueType >::PointWiseMult ( const BaseVector< ValueType > &  x,
const BaseVector< ValueType > &  y 
)
pure virtualinherited
template<typename ValueType>
bool paralution::BaseVector< ValueType >::Prolongation ( const BaseVector< ValueType > &  vec_coarse,
const BaseVector< int > &  map 
)
virtualinherited

Prolongation operator based on restriction(!) mapping vector.

Reimplemented in paralution::HostVector< ValueType >, paralution::HostVector< ValueTypeL >, paralution::HostVector< int >, and paralution::HostVector< ValueTypeH >.

template<typename ValueType>
bool paralution::BaseVector< ValueType >::Restriction ( const BaseVector< ValueType > &  vec_fine,
const BaseVector< int > &  map 
)
virtualinherited
template<typename ValueType>
virtual void paralution::BaseVector< ValueType >::ScaleAdd ( const ValueType  alpha,
const BaseVector< ValueType > &  x 
)
pure virtualinherited
template<typename ValueType>
virtual void paralution::BaseVector< ValueType >::ScaleAdd2 ( const ValueType  alpha,
const BaseVector< ValueType > &  x,
const ValueType  beta,
const BaseVector< ValueType > &  y,
const ValueType  gamma 
)
pure virtualinherited
template<typename ValueType>
virtual void paralution::BaseVector< ValueType >::ScaleAddScale ( const ValueType  alpha,
const BaseVector< ValueType > &  x,
const ValueType  beta 
)
pure virtualinherited
template<typename ValueType>
virtual void paralution::BaseVector< ValueType >::ScaleAddScale ( const ValueType  alpha,
const BaseVector< ValueType > &  x,
const ValueType  beta,
const int  src_offset,
const int  dst_offset,
const int  size 
)
pure virtualinherited
template<typename ValueType >
void paralution::BaseVector< ValueType >::set_backend ( const Paralution_Backend_Descriptor  local_backend)
inherited

Copy the backend descriptor information.

template<typename ValueType>
virtual void paralution::BaseVector< ValueType >::SetDataPtr ( ValueType **  ptr,
const int  size 
)
pure virtualinherited
template<typename ValueType>
virtual void paralution::BaseVector< ValueType >::SetValues ( const ValueType  val)
pure virtualinherited

Field Documentation

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

Backend descriptor (local copy)


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