![]() |
PARALUTION
1.0.0
PARALUTION
|
#include <vector.hpp>
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 |
paralution::Vector< ValueType >::Vector | ( | ) |
|
virtual |
|
virtual |
Perform vector update of type this = this + alpha*x.
Reimplemented in paralution::LocalVector< ValueType >.
|
pure virtual |
Compute the absolute max value of the vector, return = index(max(|this|))
Implemented in paralution::LocalVector< ValueType >.
|
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 >.
|
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 >.
|
pure virtual |
Clear (free) the vector.
Implements paralution::BaseParalution< ValueType >.
Implemented in paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.
|
inherited |
Clone the Backend descriptor from another object.
Referenced by paralution::AMG< OperatorType, VectorType, ValueType >::Aggregate(), paralution::SIRA< OperatorTypeH, VectorTypeH, ValueTypeH, OperatorTypeL, VectorTypeL, ValueTypeL >::Build_(), paralution::MultiColored< OperatorType, VectorType, ValueType >::Decompose_(), main(), paralution::LocalMatrix< ValueType >::MaximalIndependentSet(), paralution::LocalMatrix< ValueType >::MultiColoring(), and paralution::LocalMatrix< ValueType >::UpdateValuesCSR().
|
inherited |
Clone the Backend descriptor from another object with different template ValueType.
|
virtual |
Clone the entire vector (data+backend descr) from another local vector.
Reimplemented in paralution::LocalVector< ValueType >.
|
virtual |
Copy values from another local vector.
Reimplemented in paralution::LocalVector< ValueType >.
|
virtual |
Async copy.
Reimplemented in paralution::LocalVector< ValueType >.
|
virtual |
Copy values from double vector.
Reimplemented in paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.
|
virtual |
Copy values from float vector.
Reimplemented in paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.
|
virtual |
Compute dot (scalar) product, return this^T y.
Reimplemented in paralution::LocalVector< ValueType >.
|
virtual |
Compute non-conjugate dot (scalar) product, return this^T y.
Reimplemented in paralution::LocalVector< ValueType >.
|
pure virtual |
Return the size of the vector.
Implemented in paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.
|
pure virtualinherited |
Print the object information (properties, backends)
Implemented in paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, paralution::LocalVector< ValueTypeH >, paralution::LocalStencil< ValueType >, paralution::LocalMatrix< ValueType >, paralution::LocalMatrix< ValueTypeL >, and paralution::LocalMatrix< ValueTypeH >.
|
protectedpure virtualinherited |
Return true if the object is on the accelerator.
Implemented in paralution::LocalMatrix< ValueType >, paralution::LocalMatrix< ValueTypeL >, paralution::LocalMatrix< ValueTypeH >, paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, paralution::LocalVector< ValueTypeH >, and paralution::LocalStencil< ValueType >.
Referenced by paralution::BaseParalution< ValueType >::CloneBackend().
|
protectedpure virtualinherited |
Return true if the object is on the host.
Implemented in paralution::LocalMatrix< ValueType >, paralution::LocalMatrix< ValueTypeL >, paralution::LocalMatrix< ValueTypeH >, paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, paralution::LocalVector< ValueTypeH >, and paralution::LocalStencil< ValueType >.
Referenced by paralution::BaseParalution< ValueType >::CloneBackend().
|
pure virtualinherited |
Move the object to the Accelerator backend.
Implemented in paralution::LocalMatrix< ValueType >, paralution::LocalMatrix< ValueTypeL >, paralution::LocalMatrix< ValueTypeH >, paralution::LocalStencil< ValueType >, paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.
|
virtualinherited |
Move the object to the Accelerator backend with async move.
Reimplemented in paralution::LocalMatrix< ValueType >, paralution::LocalMatrix< ValueTypeL >, paralution::LocalMatrix< ValueTypeH >, paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.
|
pure virtualinherited |
Move the object to the Host backend.
Implemented in paralution::LocalMatrix< ValueType >, paralution::LocalMatrix< ValueTypeL >, paralution::LocalMatrix< ValueTypeH >, paralution::LocalStencil< ValueType >, paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.
|
virtualinherited |
Move the object to the Host backend with async move.
Reimplemented in paralution::LocalMatrix< ValueType >, paralution::LocalMatrix< ValueTypeL >, paralution::LocalMatrix< ValueTypeH >, paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.
|
pure virtual |
Compute L2 norm of the vector, return = srqt(this^T this)
Implemented in paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.
|
pure virtual |
Set the values of the vector to one.
Implemented in paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.
|
virtual |
Computes partial sum.
Reimplemented in paralution::LocalVector< ValueType >.
|
virtual |
Perform point-wise multiplication (element-wise) of type this = this * x.
Reimplemented in paralution::LocalVector< ValueType >.
|
virtual |
Perform point-wise multiplication (element-wise) of type this = x*y.
Reimplemented in paralution::LocalVector< ValueType >.
|
pure virtual |
Perform power operation to a vector.
Implemented in paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.
|
pure virtual |
Read vector from ASCII file.
Implemented in paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.
|
pure virtual |
Read vector from binary file.
Implemented in paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.
|
pure virtual |
Reduce the vector.
Implemented in paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.
|
pure virtual |
Perform vector scaling this = alpha*this.
Implemented in paralution::LocalVector< ValueType >.
|
virtual |
Perform vector update of type this = alpha*this + x.
Reimplemented in paralution::LocalVector< ValueType >.
|
virtual |
Perform vector update of type this = alpha*this + x*beta + y*gamma.
Reimplemented in paralution::LocalVector< ValueType >.
|
virtual |
Perform vector update of type this = alpha*this + x*beta.
Reimplemented in paralution::LocalVector< ValueType >.
|
pure virtual |
Set random values from interval [a,b].
Implemented in paralution::LocalVector< ValueType >.
|
pure virtual |
Set the values of the vector to given argument.
Implemented in paralution::LocalVector< ValueType >.
|
virtualinherited |
|
pure virtual |
Write vector to ASCII file.
Implemented in paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.
|
pure virtual |
Write vector to binary file.
Implemented in paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.
|
pure virtual |
Set the values of the vector to zero.
Implemented in paralution::LocalVector< ValueType >, paralution::LocalVector< ValueTypeL >, paralution::LocalVector< int >, and paralution::LocalVector< ValueTypeH >.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Backend descriptor.
Referenced by paralution::BaseParalution< ValueType >::CloneBackend(), and paralution::LocalMatrix< ValueType >::CloneFrom().
|
protectedinherited |