HLIBpro
1.2
|
Distributed scalar vector: only local part is stored.
#include <TDistrScalarVec.hh>
Public Member Functions | |
TDistrScalarVec () | |
construct zero sized, non distributed vector | |
TDistrScalarVec (const TProcSet &ps, const size_t global_n, const idx_t ofs=0) | |
TDistrScalarVec (const TDistrScalarVec &v) | |
copy ctor | |
~TDistrScalarVec () | |
dtor | |
virtual size_t | global_size () const |
return global size of vector | |
virtual size_t | size () const |
return size of vector | |
virtual void | set_global_size (const size_t n) |
set global size of vector | |
const BLAS::Vector< real > & | blas_rvec () const |
return constant real valued data | |
BLAS::Vector< real > & | blas_rvec () |
return real valued data | |
const BLAS::Vector< complex > & | blas_cvec () const |
return constant complex valued data | |
BLAS::Vector< complex > & | blas_cvec () |
return complex valued data | |
const TProcSet & | procs () const |
return processor set | |
void | set_procs (const TProcSet &ps) |
set processor set | |
virtual size_t | local_size () const |
return local size of vector stored on local processor | |
virtual size_t | local_size (const uint p) const |
return local size of vector stored on processor p | |
virtual idx_t | local_ofs (const uint p) const |
return offset of vector on processor p | |
virtual void | set_local_size (const size_t n) |
set local size of vector | |
virtual void | fill (const real f) |
fill with constant | |
virtual void | fill_rand (const uint seed) |
fill with random numbers | |
virtual void | scale (const real f) |
scale vector by constant factor | |
virtual void | assign (const real f, const TVector *x) |
this ≔ f · x | |
virtual real | norm2 () const |
2-norm | |
virtual real | norm_inf () const |
return infimum norm | |
virtual void | axpy (const real alpha, const TVector *x) |
this ≔ this + α·x | |
virtual void | conjugate () |
conjugate entries | |
virtual void | cfill (const complex &f) |
set global vector | |
virtual void | cscale (const complex &f) |
this ≔ f · this | |
virtual void | cassign (const complex &f, const TVector *x) |
this ≔ f * x | |
virtual complex | dot (const TVector *x) const |
return inner product ( this * x ) | |
virtual void | caxpy (const complex &f, const TVector *x) |
this ≔ this + α·x | |
virtual typeid_t | type () const |
return type of vector | |
virtual bool | is_type (const typeid_t t) const |
check type of vector | |
virtual size_t | byte_size () const |
return size in bytes used by this object | |
virtual size_t | global_byte_size () const |
virtual TDistrScalarVec * | copy () const |
return copy of matrix | |
virtual TDistrScalarVec * | create () const |
return object of same class | |
virtual void | sum (const TProcSet &ps) |
pointwise summation between all vectors in ps | |
virtual void | print (const uint ofs=0) const |
print vector to stdout | |
Public Member Functions inherited from TVector | |
TVector (const idx_t offset=0, const bool use_complex=false) | |
construct real or complex valued vector with first index offset | |
virtual | ~TVector () |
dtor | |
idx_t | ofs () const |
return first index (offset) | |
virtual void | set_ofs (const idx_t n) |
set first index (offset) | |
TIndexSet | is () const |
return index set | |
bool | is_complex () const |
return true if vector is complex valued | |
void | set_complex (const bool b) |
change between real and complex valued representation | |
virtual real | entry (const idx_t i) const |
return i'th entry | |
virtual const complex | centry (const idx_t i) const |
return i'th entry | |
virtual void | set_entry (const idx_t i, const real f) |
set i'th entry | |
virtual void | set_centry (const idx_t i, const complex f) |
set i'th entry | |
TVector & | operator= (const TVector &v) |
copy operator for all vectors | |
virtual TVector * | restrict_re () const |
create vector restricted to real part of coefficients | |
virtual TVector * | restrict_im () const |
create vector restricted to imaginary part of coefficients | |
virtual void | read (TByteStream &s) |
read vector data from byte stream | |
virtual void | write (TByteStream &s) const |
write vector data to byte stream | |
virtual size_t | bs_size () const |
returns size of object in bytestream | |
virtual void | sum (const TProcSet &p, const uint pid, const uint nparts, TByteStream *bs=NULL) |
Public Member Functions inherited from TTypeInfo | |
virtual String | typestr () const |
return string representation of type |
Protected Member Functions | |
virtual void | to_real () |
switch to real valued representation (if possible) | |
virtual void | to_complex () |
switch to complex valued representation |
TDistrScalarVec | ( | const TProcSet & | ps, |
const size_t | global_n, | ||
const idx_t | ofs = 0 |
||
) |
construct vector of size global_n and offset ofs distributed evenly among processors in ps
|
virtual |
return size in bytes used by this distributed object, i.e. of all distributed sub vectors
Reimplemented from TVector.