KASKADE 7 development version
|
A vector class tailored towards NUMA architectures. This vector distributes its entries in blocks of approximately equal size to the different nodes of NUMA machines in order to exploit the larger accumulated memory bandwidth for fast vector operations. This is most beneficial for large vectors exceeding the cache of the CPUs. Modern processors (2015-01-01) have up to 6MB 3rd level cache, so this is intended for vectors of more than 50,000 doubles, say. More...
#include <numaMatrix.hh>
A vector class tailored towards NUMA architectures. This vector distributes its entries in blocks of approximately equal size to the different nodes of NUMA machines in order to exploit the larger accumulated memory bandwidth for fast vector operations. This is most beneficial for large vectors exceeding the cache of the CPUs. Modern processors (2015-01-01) have up to 6MB 3rd level cache, so this is intended for vectors of more than 50,000 doubles, say.
Entry | the type of vector entries (usually Dune::FieldVector<double,n>) |
Definition at line 716 of file numaMatrix.hh.
Public Types | |
typedef Dune::FieldTraits< Entry >::field_type | field_type |
typedef Dune::FieldTraits< field_type >::real_type | real_type |
typedef Base::size_type | size_type |
typedef Base::value_type | value_type |
typedef NumaDenseMatrixDetail::VectorIterator< Entry > | iterator |
typedef NumaDenseMatrixDetail::VectorIterator< Entry const > | const_iterator |
Public Member Functions | |
Construction, assignment, and shape changes. | |
NumaVector () | |
Creates a 0 vector. More... | |
NumaVector (NumaVector const &a)=default | |
Copy constructor. More... | |
NumaVector (NumaVector &&a)=default | |
Move constructor. More... | |
NumaVector (size_type r, value_type v=value_type()) | |
Creates an r vector with given entries. More... | |
NumaVector & | operator= (NumaVector const &a)=default |
Copy assignment. More... | |
void | resize (size_type r) |
Resizes the vector to r entries, leaving the entries in an undefined state. More... | |
Entry access | |
iterator | begin () |
iterator to first entry. More... | |
iterator | end () |
iterator to one beyond last entry. More... | |
const_iterator | begin () const |
const iterator to first row. More... | |
const_iterator | end () const |
const iterator to one beyond last entry. More... | |
Entry & | operator[] (size_type row) |
The subscript operator. More... | |
Entry const & | operator[] (size_type row) const |
The const subscript operator. More... | |
Linear algebra opterations. | |
The computations are performed in parallel on the NUMA nodes. | |
Self & | operator*= (field_type const &a) |
\( y \leftarrow a y \) More... | |
Self & | operator/= (field_type const &a) |
\( y \leftarrow \frac{1}{a} y \) More... | |
Self & | operator+= (Self const &x) |
\( y \leftarrow y+x \) More... | |
Self & | operator-= (Self const &x) |
\( y \leftarrow y - x \) More... | |
Self & | axpy (field_type const &a, Self const &x) |
\( y \leftarrow ax + y \) More... | |
Norms and scalar product. | |
The computations are performed in parallel on the NUMA nodes. | |
real_type | two_norm () const |
euclidean norm: sqrt(sum over squared euclidean norms of entries) More... | |
real_type | two_norm2 () const |
euclidean norm squared: sum over squared euclidean norms of entries More... | |
real_type | one_norm () const |
one-norm: sum over absolute values of entries More... | |
field_type | dot (Self const &other) const |
Related Functions | |
(Note that these are not member functions.) | |
template<class Entry > | |
std::ostream & | operator<< (std::ostream &out, NumaVector< Entry > const &vec) |
typedef NumaDenseMatrixDetail::VectorIterator<Entry const> Kaskade::NumaVector< Entry >::const_iterator |
Definition at line 727 of file numaMatrix.hh.
typedef Dune::FieldTraits<Entry>::field_type Kaskade::NumaVector< Entry >::field_type |
Definition at line 722 of file numaMatrix.hh.
typedef NumaDenseMatrixDetail::VectorIterator<Entry> Kaskade::NumaVector< Entry >::iterator |
Definition at line 726 of file numaMatrix.hh.
typedef Dune::FieldTraits<field_type>::real_type Kaskade::NumaVector< Entry >::real_type |
Definition at line 723 of file numaMatrix.hh.
typedef Base::size_type Kaskade::NumaVector< Entry >::size_type |
Definition at line 724 of file numaMatrix.hh.
typedef Base::value_type Kaskade::NumaVector< Entry >::value_type |
Definition at line 725 of file numaMatrix.hh.
|
inline |
Creates a 0 vector.
Definition at line 738 of file numaMatrix.hh.
|
default |
Copy constructor.
|
default |
Move constructor.
|
inline |
Creates an r vector with given entries.
Definition at line 754 of file numaMatrix.hh.
|
inline |
\( y \leftarrow ax + y \)
Definition at line 856 of file numaMatrix.hh.
|
inline |
iterator to first entry.
Definition at line 779 of file numaMatrix.hh.
|
inline |
const iterator to first row.
Definition at line 789 of file numaMatrix.hh.
|
inline |
Definition at line 895 of file numaMatrix.hh.
|
inline |
iterator to one beyond last entry.
Definition at line 784 of file numaMatrix.hh.
|
inline |
const iterator to one beyond last entry.
Definition at line 794 of file numaMatrix.hh.
|
inline |
one-norm: sum over absolute values of entries
Definition at line 887 of file numaMatrix.hh.
|
inline |
\( y \leftarrow a y \)
Definition at line 817 of file numaMatrix.hh.
|
inline |
\( y \leftarrow y+x \)
Both vectors have to have the same size.
Definition at line 836 of file numaMatrix.hh.
|
inline |
\( y \leftarrow y - x \)
Both vectors have to have the same size.
Definition at line 847 of file numaMatrix.hh.
|
inline |
\( y \leftarrow \frac{1}{a} y \)
Definition at line 826 of file numaMatrix.hh.
|
default |
Copy assignment.
|
inline |
The subscript operator.
Definition at line 799 of file numaMatrix.hh.
|
inline |
The const subscript operator.
Definition at line 804 of file numaMatrix.hh.
|
inline |
Resizes the vector to r entries, leaving the entries in an undefined state.
On resize, all iterators are invalidated. This method adheres to the Dune::BlockVector interface.
Definition at line 768 of file numaMatrix.hh.
|
inline |
euclidean norm: sqrt(sum over squared euclidean norms of entries)
Definition at line 874 of file numaMatrix.hh.
|
inline |
euclidean norm squared: sum over squared euclidean norms of entries
Definition at line 879 of file numaMatrix.hh.
Referenced by Kaskade::NumaVector< Entry >::two_norm().
|
related |
Definition at line 904 of file numaMatrix.hh.