Stxxl
1.4.0
|
External matrix container. More...
#include <matrix.h>
External matrix container.
ValueType | type of contained objects (POD with no references to internal memory) |
BlockSideLength | side length of a matrix block |
Divides the matrix in square submatrices (blocks). Blocks can be swapped individually to and from external memory. They are only swapped if necessary to minimize I/O.
typedef swappable_block_matrix_type::block_scheduler_type stxxl::matrix< ValueType, BlockSideLength >::block_scheduler_type [protected] |
typedef swappable_block_matrix_type::size_type stxxl::matrix< ValueType, BlockSideLength >::block_size_type [protected] |
typedef matrix_col_major_iterator<ValueType, BlockSideLength> stxxl::matrix< ValueType, BlockSideLength >::col_major_iterator |
typedef column_vector<ValueType> stxxl::matrix< ValueType, BlockSideLength >::column_vector_type |
typedef const_matrix_col_major_iterator<ValueType, BlockSideLength> stxxl::matrix< ValueType, BlockSideLength >::const_col_major_iterator |
typedef const_matrix_iterator<ValueType, BlockSideLength> stxxl::matrix< ValueType, BlockSideLength >::const_iterator |
typedef const_matrix_row_major_iterator<ValueType, BlockSideLength> stxxl::matrix< ValueType, BlockSideLength >::const_row_major_iterator |
typedef swappable_block_matrix_type::elem_size_type stxxl::matrix< ValueType, BlockSideLength >::elem_size_type [protected] |
typedef matrix_iterator<ValueType, BlockSideLength> stxxl::matrix< ValueType, BlockSideLength >::iterator |
typedef matrix<ValueType, BlockSideLength> stxxl::matrix< ValueType, BlockSideLength >::matrix_type [protected] |
typedef matrix_operations<ValueType, BlockSideLength> stxxl::matrix< ValueType, BlockSideLength >::Ops [protected] |
typedef matrix_row_major_iterator<ValueType, BlockSideLength> stxxl::matrix< ValueType, BlockSideLength >::row_major_iterator |
typedef row_vector<ValueType> stxxl::matrix< ValueType, BlockSideLength >::row_vector_type |
typedef shared_object_pointer<swappable_block_matrix_type> stxxl::matrix< ValueType, BlockSideLength >::swappable_block_matrix_pointer_type [protected] |
typedef swappable_block_matrix<ValueType, BlockSideLength> stxxl::matrix< ValueType, BlockSideLength >::swappable_block_matrix_type [protected] |
typedef matrix_swappable_block<ValueType, BlockSideLength> stxxl::matrix< ValueType, BlockSideLength >::swappable_block_type [protected] |
stxxl::matrix< ValueType, BlockSideLength >::matrix | ( | block_scheduler_type & | bs, |
const elem_size_type | height, | ||
const elem_size_type | width | ||
) | [inline] |
stxxl::matrix< ValueType, BlockSideLength >::matrix | ( | block_scheduler_type & | bs, |
const column_vector_type & | left, | ||
const row_vector_type & | right | ||
) | [inline] |
stxxl::matrix< ValueType, BlockSideLength >::~matrix | ( | ) | [inline] |
iterator stxxl::matrix< ValueType, BlockSideLength >::begin | ( | ) | [inline] |
Definition at line 1075 of file matrix.h.
Referenced by stxxl::matrix< ValueType, BlockSideLength >::multiply_internal().
const_iterator stxxl::matrix< ValueType, BlockSideLength >::begin | ( | ) | const [inline] |
const_iterator stxxl::matrix< ValueType, BlockSideLength >::cbegin | ( | ) | const [inline] |
Definition at line 1082 of file matrix.h.
Referenced by stxxl::matrix< ValueType, BlockSideLength >::multiply_internal().
const_iterator stxxl::matrix< ValueType, BlockSideLength >::cend | ( | ) | const [inline] |
Definition at line 1092 of file matrix.h.
Referenced by stxxl::matrix< ValueType, BlockSideLength >::multiply_internal().
iterator stxxl::matrix< ValueType, BlockSideLength >::end | ( | ) | [inline] |
Definition at line 1085 of file matrix.h.
Referenced by stxxl::matrix< ValueType, BlockSideLength >::multiply_internal().
const_iterator stxxl::matrix< ValueType, BlockSideLength >::end | ( | ) | const [inline] |
const elem_size_type& stxxl::matrix< ValueType, BlockSideLength >::get_height | ( | ) | const [inline] |
const elem_size_type& stxxl::matrix< ValueType, BlockSideLength >::get_width | ( | ) | const [inline] |
matrix_type stxxl::matrix< ValueType, BlockSideLength >::multiply | ( | const matrix_type & | right, |
const int_type | multiplication_algorithm = 1 , |
||
const int_type | scheduling_algorithm = 2 |
||
) | const [inline] |
multiply with another matrix
multiplication_algorithm | allows to choose the applied algorithm |
scheduling_algorithm | allows to choose the applied algorithm |
Available algorithms are:
0: naive_multiply_and_add (I/O inefficient, slow)
1: recursive_multiply_and_add (recommended, default, stable time and I/O complexity)
2: strassen_winograd_multiply_and_add (sometimes fast but unstable time and I/O complexity)
3: multi_level_strassen_winograd_multiply_and_add (sometimes fast but unstable time and I/O complexity)
4: strassen_winograd_multiply, optimized pre- and postadditions (sometimes fast but unstable time and I/O complexity)
5: strassen_winograd_multiply_and_add_interleaved, optimized preadditions (sometimes fast but unstable time and I/O complexity)
6: multi_level_strassen_winograd_multiply_and_add_block_grained (sometimes fast but unstable time and I/O complexity)
Definition at line 1202 of file matrix.h.
References stxxl::swappable_block_matrix< ValueType, BlockSideLength >::bs, stxxl::matrix< ValueType, BlockSideLength >::data, stxxl::matrix< ValueType, BlockSideLength >::height, and stxxl::matrix< ValueType, BlockSideLength >::width.
row_vector_type stxxl::matrix< ValueType, BlockSideLength >::multiply_from_left | ( | const row_vector_type & | left | ) | const [inline] |
Definition at line 1181 of file matrix.h.
References stxxl::row_vector< ValueType >::set_zero(), and stxxl::vector< Tp_, PgSz_, PgTp_, BlkSize_, AllocStr_, SzTp_ >::size().
Referenced by stxxl::row_vector< ValueType >::operator*().
matrix_type stxxl::matrix< ValueType, BlockSideLength >::multiply_internal | ( | const matrix_type & | right, |
const int_type | scheduling_algorithm = 2 |
||
) | const [inline] |
Use internal memory multiplication. Designated for testing. May exceed memory limitations.
Definition at line 1291 of file matrix.h.
References stxxl::swappable_block_matrix< ValueType, BlockSideLength >::bs, stxxl::matrix< ValueType, BlockSideLength >::data, stxxl::matrix< ValueType, BlockSideLength >::height, and stxxl::matrix< ValueType, BlockSideLength >::width.
void stxxl::matrix< ValueType, BlockSideLength >::multiply_internal | ( | const matrix_type & | right, |
matrix_type & | res | ||
) | const [inline, protected] |
Definition at line 1328 of file matrix.h.
References stxxl::matrix< ValueType, BlockSideLength >::begin(), stxxl::swappable_block_matrix< ValueType, BlockSideLength >::bs, C(), stxxl::matrix< ValueType, BlockSideLength >::cbegin(), stxxl::matrix< ValueType, BlockSideLength >::cend(), stxxl::matrix< ValueType, BlockSideLength >::data, stxxl::matrix< ValueType, BlockSideLength >::end(), stxxl::matrix< ValueType, BlockSideLength >::height, stxxl::block_scheduler< SwappableBlockType >::is_simulating(), STXXL_BLAS, and stxxl::matrix< ValueType, BlockSideLength >::width.
const_iterator stxxl::matrix< ValueType, BlockSideLength >::operator() | ( | const elem_size_type | row, |
const elem_size_type | col | ||
) | const [inline] |
iterator stxxl::matrix< ValueType, BlockSideLength >::operator() | ( | const elem_size_type | row, |
const elem_size_type | col | ||
) | [inline] |
matrix_type stxxl::matrix< ValueType, BlockSideLength >::operator* | ( | const matrix_type & | right | ) | const [inline] |
matrix_type stxxl::matrix< ValueType, BlockSideLength >::operator* | ( | const ValueType | scalar | ) | const [inline] |
Definition at line 1139 of file matrix.h.
References stxxl::matrix< ValueType, BlockSideLength >::data.
column_vector_type stxxl::matrix< ValueType, BlockSideLength >::operator* | ( | const column_vector_type & | right | ) | const [inline] |
Definition at line 1172 of file matrix.h.
References stxxl::column_vector< ValueType >::set_zero(), and stxxl::vector< Tp_, PgSz_, PgTp_, BlkSize_, AllocStr_, SzTp_ >::size().
matrix_type& stxxl::matrix< ValueType, BlockSideLength >::operator*= | ( | const matrix_type & | right | ) | [inline] |
matrix_type& stxxl::matrix< ValueType, BlockSideLength >::operator*= | ( | const ValueType | scalar | ) | [inline] |
matrix_type stxxl::matrix< ValueType, BlockSideLength >::operator+ | ( | const matrix_type & | right | ) | const [inline] |
Definition at line 1120 of file matrix.h.
References stxxl::matrix< ValueType, BlockSideLength >::data, stxxl::matrix< ValueType, BlockSideLength >::height, and stxxl::matrix< ValueType, BlockSideLength >::width.
matrix_type& stxxl::matrix< ValueType, BlockSideLength >::operator+= | ( | const matrix_type & | right | ) | [inline] |
Definition at line 1146 of file matrix.h.
References stxxl::matrix< ValueType, BlockSideLength >::data, stxxl::matrix< ValueType, BlockSideLength >::height, and stxxl::matrix< ValueType, BlockSideLength >::width.
matrix_type stxxl::matrix< ValueType, BlockSideLength >::operator- | ( | const matrix_type & | right | ) | const [inline] |
Definition at line 1128 of file matrix.h.
References stxxl::matrix< ValueType, BlockSideLength >::data, stxxl::matrix< ValueType, BlockSideLength >::height, and stxxl::matrix< ValueType, BlockSideLength >::width.
matrix_type& stxxl::matrix< ValueType, BlockSideLength >::operator-= | ( | const matrix_type & | right | ) | [inline] |
Definition at line 1154 of file matrix.h.
References stxxl::matrix< ValueType, BlockSideLength >::data, stxxl::matrix< ValueType, BlockSideLength >::height, and stxxl::matrix< ValueType, BlockSideLength >::width.
void stxxl::matrix< ValueType, BlockSideLength >::set_zero | ( | ) | [inline] |
Definition at line 1111 of file matrix.h.
References stxxl::div_ceil().
void stxxl::matrix< ValueType, BlockSideLength >::transpose | ( | ) | [inline] |
Definition at line 1104 of file matrix.h.
References std::swap().
swappable_block_matrix_pointer_type stxxl::matrix< ValueType, BlockSideLength >::data [protected] |
Definition at line 1047 of file matrix.h.
Referenced by stxxl::matrix< ValueType, BlockSideLength >::multiply(), stxxl::matrix< ValueType, BlockSideLength >::multiply_internal(), stxxl::matrix< ValueType, BlockSideLength >::operator*(), stxxl::matrix< ValueType, BlockSideLength >::operator+(), stxxl::matrix< ValueType, BlockSideLength >::operator+=(), stxxl::matrix< ValueType, BlockSideLength >::operator-(), and stxxl::matrix< ValueType, BlockSideLength >::operator-=().
elem_size_type stxxl::matrix< ValueType, BlockSideLength >::height [protected] |
Definition at line 1045 of file matrix.h.
Referenced by stxxl::matrix< ValueType, BlockSideLength >::multiply(), stxxl::matrix< ValueType, BlockSideLength >::multiply_internal(), stxxl::matrix< ValueType, BlockSideLength >::operator+(), stxxl::matrix< ValueType, BlockSideLength >::operator+=(), stxxl::matrix< ValueType, BlockSideLength >::operator-(), and stxxl::matrix< ValueType, BlockSideLength >::operator-=().
elem_size_type stxxl::matrix< ValueType, BlockSideLength >::width [protected] |
Definition at line 1045 of file matrix.h.
Referenced by stxxl::matrix< ValueType, BlockSideLength >::multiply(), stxxl::matrix< ValueType, BlockSideLength >::multiply_internal(), stxxl::matrix< ValueType, BlockSideLength >::operator+(), stxxl::matrix< ValueType, BlockSideLength >::operator+=(), stxxl::matrix< ValueType, BlockSideLength >::operator-(), and stxxl::matrix< ValueType, BlockSideLength >::operator-=().