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

#include <vector.hpp>

Inheritance diagram for paralution::Vector< ValueType >:
paralution::BaseParalution< ValueType > paralution::ParalutionObj paralution::LocalVector< int > paralution::LocalVector< ValueTypeH > paralution::LocalVector< ValueTypeL > paralution::LocalVector< ValueType >

Public Member Functions

 Vector ()
 
virtual ~Vector ()
 
virtual int get_size (void) const =0
 Return the size of the vector. More...
 
virtual bool Check (void) const =0
 Return true if the vector is ok (empty vector is also ok) and false if some of values are NaN. More...
 
virtual void Clear ()=0
 Clear (free) the vector. More...
 
virtual void Zeros ()=0
 Set the values of the vector to zero. More...
 
virtual void Ones ()=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 SetRandom (const ValueType a=-1.0, const ValueType b=1.0, const int seed=0)=0
 Set random values from interval [a,b]. More...
 
virtual void ReadFileASCII (const std::string)=0
 Read vector from ASCII file. More...
 
virtual void WriteFileASCII (const std::string) const =0
 Write vector to ASCII file. More...
 
virtual void ReadFileBinary (const std::string)=0
 Read vector from binary file. More...
 
virtual void WriteFileBinary (const std::string) const =0
 Write vector to binary file. More...
 
virtual void CopyFrom (const LocalVector< ValueType > &src)
 Copy values from another local vector. More...
 
virtual void CopyFromAsync (const LocalVector< ValueType > &src)
 Async copy. More...
 
virtual void CopyFromFloat (const LocalVector< float > &src)
 Copy values from float vector. More...
 
virtual void CopyFromDouble (const LocalVector< double > &src)
 Copy values from double vector. More...
 
virtual void CloneFrom (const LocalVector< ValueType > &src)
 Clone the entire vector (data+backend descr) from another local vector. More...
 
virtual void AddScale (const LocalVector< ValueType > &x, const ValueType alpha)
 Perform vector update of type this = this + alpha*x. More...
 
virtual void ScaleAdd (const ValueType alpha, const LocalVector< ValueType > &x)
 Perform vector update of type this = alpha*this + x. More...
 
virtual void ScaleAddScale (const ValueType alpha, const LocalVector< ValueType > &x, const ValueType beta)
 Perform vector update of type this = alpha*this + x*beta. More...
 
virtual void ScaleAdd2 (const ValueType alpha, const LocalVector< ValueType > &x, const ValueType beta, const LocalVector< ValueType > &y, const ValueType gamma)
 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 LocalVector< ValueType > &x)
 Computes partial sum. More...
 
virtual ValueType Dot (const LocalVector< ValueType > &x) const
 Compute dot (scalar) product, return this^T y. More...
 
virtual ValueType DotNonConj (const LocalVector< ValueType > &x) const
 Compute non-conjugate 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 the vector. More...
 
virtual ValueType Asum (void) const =0
 Compute the sum of the 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 = index(max(|this|)) More...
 
virtual void PointWiseMult (const LocalVector< ValueType > &x)
 Perform point-wise multiplication (element-wise) of type this = this * x. More...
 
virtual void PointWiseMult (const LocalVector< ValueType > &x, const LocalVector< ValueType > &y)
 Perform point-wise multiplication (element-wise) of type this = x*y. More...
 
virtual void Power (const double power)=0
 Perform power operation to a vector. More...
 
virtual void MoveToAccelerator (void)=0
 Move the object to the Accelerator backend. More...
 
virtual void MoveToHost (void)=0
 Move the object to the Host backend. More...
 
virtual void MoveToAcceleratorAsync (void)
 Move the object to the Accelerator backend with async move. More...
 
virtual void MoveToHostAsync (void)
 Move the object to the Host backend with async move. More...
 
virtual void Sync (void)
 
void CloneBackend (const BaseParalution< ValueType > &src)
 Clone the Backend descriptor from another object. More...
 
template<typename ValueType2 >
void CloneBackend (const BaseParalution< ValueType2 > &src)
 Clone the Backend descriptor from another object with different template ValueType. More...
 
virtual void info () const =0
 Print the object information (properties, backends) More...
 

Protected Member Functions

virtual bool is_host (void) const =0
 Return true if the object is on the host. More...
 
virtual bool is_accel (void) const =0
 Return true if the object is on the accelerator. More...
 

Protected Attributes

std::string object_name_
 Name of the object. More...
 
Paralution_Backend_Descriptor local_backend_
 Backend descriptor. More...
 
bool asyncf
 
size_t global_obj_id
 

Constructor & Destructor Documentation

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

Member Function Documentation

template<typename ValueType >
void paralution::Vector< ValueType >::AddScale ( const LocalVector< ValueType > &  x,
const ValueType  alpha 
)
virtual

Perform vector update of type this = this + alpha*x.

Reimplemented in paralution::LocalVector< ValueType >.

template<typename ValueType >
virtual int paralution::Vector< ValueType >::Amax ( ValueType &  value) const
pure virtual

Compute the absolute max value of the vector, return = index(max(|this|))

Implemented in paralution::LocalVector< ValueType >.

template<typename ValueType >
virtual ValueType paralution::Vector< ValueType >::Asum ( void  ) const
pure virtual

Compute the sum of the absolute values of the vector (L1 norm), return = sum(|this|)

Implemented in paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.

template<typename ValueType >
virtual bool paralution::Vector< ValueType >::Check ( void  ) const
pure virtual

Return true if the vector is ok (empty vector is also ok) and false if some of values are NaN.

Implemented in paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.

template<typename ValueType >
virtual void paralution::Vector< ValueType >::Clear ( )
pure virtual
template<typename ValueType >
template<typename ValueType2 >
void paralution::BaseParalution< ValueType >::CloneBackend ( const BaseParalution< ValueType2 > &  src)
inherited

Clone the Backend descriptor from another object with different template ValueType.

template<typename ValueType >
void paralution::Vector< ValueType >::CloneFrom ( const LocalVector< ValueType > &  src)
virtual

Clone the entire vector (data+backend descr) from another local vector.

Reimplemented in paralution::LocalVector< ValueType >.

template<typename ValueType >
void paralution::Vector< ValueType >::CopyFrom ( const LocalVector< ValueType > &  src)
virtual

Copy values from another local vector.

Reimplemented in paralution::LocalVector< ValueType >.

template<typename ValueType >
void paralution::Vector< ValueType >::CopyFromAsync ( const LocalVector< ValueType > &  src)
virtual

Async copy.

Reimplemented in paralution::LocalVector< ValueType >.

template<typename ValueType >
void paralution::Vector< ValueType >::CopyFromDouble ( const LocalVector< double > &  src)
virtual
template<typename ValueType >
void paralution::Vector< ValueType >::CopyFromFloat ( const LocalVector< float > &  src)
virtual
template<typename ValueType >
ValueType paralution::Vector< ValueType >::Dot ( const LocalVector< ValueType > &  x) const
virtual

Compute dot (scalar) product, return this^T y.

Reimplemented in paralution::LocalVector< ValueType >.

template<typename ValueType >
ValueType paralution::Vector< ValueType >::DotNonConj ( const LocalVector< ValueType > &  x) const
virtual

Compute non-conjugate dot (scalar) product, return this^T y.

Reimplemented in paralution::LocalVector< ValueType >.

template<typename ValueType >
virtual int paralution::Vector< ValueType >::get_size ( void  ) const
pure virtual
template<typename ValueType >
void paralution::BaseParalution< ValueType >::MoveToAcceleratorAsync ( void  )
virtualinherited
template<typename ValueType >
virtual ValueType paralution::Vector< ValueType >::Norm ( void  ) const
pure virtual
template<typename ValueType >
virtual void paralution::Vector< ValueType >::Ones ( )
pure virtual
template<typename ValueType >
void paralution::Vector< ValueType >::PartialSum ( const LocalVector< ValueType > &  x)
virtual

Computes partial sum.

Reimplemented in paralution::LocalVector< ValueType >.

template<typename ValueType >
void paralution::Vector< ValueType >::PointWiseMult ( const LocalVector< ValueType > &  x)
virtual

Perform point-wise multiplication (element-wise) of type this = this * x.

Reimplemented in paralution::LocalVector< ValueType >.

template<typename ValueType >
void paralution::Vector< ValueType >::PointWiseMult ( const LocalVector< ValueType > &  x,
const LocalVector< ValueType > &  y 
)
virtual

Perform point-wise multiplication (element-wise) of type this = x*y.

Reimplemented in paralution::LocalVector< ValueType >.

template<typename ValueType >
virtual void paralution::Vector< ValueType >::Power ( const double  power)
pure virtual
template<typename ValueType >
virtual void paralution::Vector< ValueType >::ReadFileASCII ( const std::string  )
pure virtual
template<typename ValueType >
virtual void paralution::Vector< ValueType >::ReadFileBinary ( const std::string  )
pure virtual
template<typename ValueType >
virtual ValueType paralution::Vector< ValueType >::Reduce ( void  ) const
pure virtual
template<typename ValueType >
virtual void paralution::Vector< ValueType >::Scale ( const ValueType  alpha)
pure virtual

Perform vector scaling this = alpha*this.

Implemented in paralution::LocalVector< ValueType >.

template<typename ValueType >
void paralution::Vector< ValueType >::ScaleAdd ( const ValueType  alpha,
const LocalVector< ValueType > &  x 
)
virtual

Perform vector update of type this = alpha*this + x.

Reimplemented in paralution::LocalVector< ValueType >.

template<typename ValueType >
void paralution::Vector< ValueType >::ScaleAdd2 ( const ValueType  alpha,
const LocalVector< ValueType > &  x,
const ValueType  beta,
const LocalVector< ValueType > &  y,
const ValueType  gamma 
)
virtual

Perform vector update of type this = alpha*this + x*beta + y*gamma.

Reimplemented in paralution::LocalVector< ValueType >.

template<typename ValueType >
void paralution::Vector< ValueType >::ScaleAddScale ( const ValueType  alpha,
const LocalVector< ValueType > &  x,
const ValueType  beta 
)
virtual

Perform vector update of type this = alpha*this + x*beta.

Reimplemented in paralution::LocalVector< ValueType >.

template<typename ValueType >
virtual void paralution::Vector< ValueType >::SetRandom ( const ValueType  a = -1.0,
const ValueType  b = 1.0,
const int  seed = 0 
)
pure virtual

Set random values from interval [a,b].

Implemented in paralution::LocalVector< ValueType >.

template<typename ValueType >
virtual void paralution::Vector< ValueType >::SetValues ( const ValueType  val)
pure virtual

Set the values of the vector to given argument.

Implemented in paralution::LocalVector< ValueType >.

template<typename ValueType >
virtual void paralution::Vector< ValueType >::WriteFileASCII ( const std::string  ) const
pure virtual
template<typename ValueType >
virtual void paralution::Vector< ValueType >::WriteFileBinary ( const std::string  ) const
pure virtual
template<typename ValueType >
virtual void paralution::Vector< ValueType >::Zeros ( )
pure virtual

Field Documentation

template<typename ValueType>
bool paralution::BaseParalution< ValueType >::asyncf
protectedinherited
size_t paralution::ParalutionObj::global_obj_id
protectedinherited
template<typename ValueType>
Paralution_Backend_Descriptor paralution::BaseParalution< ValueType >::local_backend_
protectedinherited

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