Stxxl
1.4.0
|
External container for a (sub)matrix. Not intended for direct use. More...
#include <matrix.h>
Public Types | |
typedef int_type | size_type |
typedef int_type | elem_size_type |
typedef block_scheduler < matrix_swappable_block < ValueType, BlockSideLength > > | block_scheduler_type |
typedef block_scheduler_type::swappable_block_identifier_type | swappable_block_identifier_type |
typedef std::vector < swappable_block_identifier_type > | blocks_type |
typedef matrix_operations < ValueType, BlockSideLength > | Ops |
Public Member Functions | |
swappable_block_matrix (block_scheduler_type &bs, const size_type height_in_blocks, const size_type width_in_blocks, const bool transposed=false) | |
Create an empty swappable_block_matrix of given dimensions. | |
swappable_block_matrix (const swappable_block_matrix &supermatrix, const size_type height_in_blocks, const size_type width_in_blocks, const size_type from_row_in_blocks, const size_type from_col_in_blocks) | |
Create swappable_block_matrix of given dimensions that represents the submatrix of supermatrix starting at (from_row_in_blocks, from_col_in_blocks). | |
swappable_block_matrix (const swappable_block_matrix &ul, const swappable_block_matrix &ur, const swappable_block_matrix &dl, const swappable_block_matrix &dr) | |
Create swappable_block_matrix that represents the combination matrix ul ur dl dr. | |
swappable_block_matrix (const swappable_block_matrix &other) | |
~swappable_block_matrix () | |
int_type | elem_index_in_block_from_elem (elem_size_type row, elem_size_type col) const |
swappable_block_identifier_type | block (const size_type row, const size_type col) const |
swappable_block_identifier_type | operator() (const size_type row, const size_type col) const |
const size_type & | get_height () const |
const size_type & | get_width () const |
const bool & | is_transposed () const |
if the elements inside the blocks are in transposed order i.e. column-major | |
void | transpose () |
void | set_zero () |
Static Public Member Functions | |
static size_type | block_index_from_elem (elem_size_type index) |
static int_type | elem_index_in_block_from_elem (elem_size_type index) |
Public Attributes | |
block_scheduler_type & | bs |
Protected Member Functions | |
swappable_block_identifier_type & | bl (const size_type row, const size_type col) |
get identifier of the block at (row, col) | |
Protected Attributes | |
size_type | height |
height of the matrix in blocks | |
size_type | width |
width of the matrix in blocks | |
size_type | height_from_supermatrix |
height copied from supermatrix in blocks | |
size_type | width_from_supermatrix |
width copied from supermatrix in blocks | |
blocks_type | blocks |
the matrice's blocks in row-major | |
bool | elements_in_blocks_transposed |
if the elements in each block are in col-major instead of row-major | |
Private Member Functions | |
swappable_block_matrix & | operator= (const swappable_block_matrix &other) |
External container for a (sub)matrix. Not intended for direct use.
ValueType | type of contained objects (POD with no references to internal memory) |
BlockSideLength | side length of a matrix block |
Stores blocks only, so all measures (height, width, row, col) are in blocks.
typedef block_scheduler< matrix_swappable_block<ValueType, BlockSideLength> > stxxl::swappable_block_matrix< ValueType, BlockSideLength >::block_scheduler_type |
typedef std::vector<swappable_block_identifier_type> stxxl::swappable_block_matrix< ValueType, BlockSideLength >::blocks_type |
typedef int_type stxxl::swappable_block_matrix< ValueType, BlockSideLength >::elem_size_type |
typedef matrix_operations<ValueType, BlockSideLength> stxxl::swappable_block_matrix< ValueType, BlockSideLength >::Ops |
typedef int_type stxxl::swappable_block_matrix< ValueType, BlockSideLength >::size_type |
typedef block_scheduler_type::swappable_block_identifier_type stxxl::swappable_block_matrix< ValueType, BlockSideLength >::swappable_block_identifier_type |
stxxl::swappable_block_matrix< ValueType, BlockSideLength >::swappable_block_matrix | ( | block_scheduler_type & | bs, |
const size_type | height_in_blocks, | ||
const size_type | width_in_blocks, | ||
const bool | transposed = false |
||
) | [inline] |
Create an empty swappable_block_matrix of given dimensions.
Definition at line 262 of file matrix.h.
References stxxl::block_scheduler< SwappableBlockType >::allocate_swappable_block().
stxxl::swappable_block_matrix< ValueType, BlockSideLength >::swappable_block_matrix | ( | const swappable_block_matrix< ValueType, BlockSideLength > & | supermatrix, |
const size_type | height_in_blocks, | ||
const size_type | width_in_blocks, | ||
const size_type | from_row_in_blocks, | ||
const size_type | from_col_in_blocks | ||
) | [inline] |
Create swappable_block_matrix of given dimensions that represents the submatrix of supermatrix starting at (from_row_in_blocks, from_col_in_blocks).
If supermatrix is not large enough, the submatrix is padded with empty blocks. The supermatrix must not be destructed or transposed before the submatrix is destructed.
Definition at line 281 of file matrix.h.
References stxxl::swappable_block_matrix< ValueType, BlockSideLength >::block().
stxxl::swappable_block_matrix< ValueType, BlockSideLength >::swappable_block_matrix | ( | const swappable_block_matrix< ValueType, BlockSideLength > & | ul, |
const swappable_block_matrix< ValueType, BlockSideLength > & | ur, | ||
const swappable_block_matrix< ValueType, BlockSideLength > & | dl, | ||
const swappable_block_matrix< ValueType, BlockSideLength > & | dr | ||
) | [inline] |
Create swappable_block_matrix that represents the combination matrix ul ur dl dr.
The submatrices are assumed to be of fitting dimensions and equal transposition. The submatrices must not be destructed or transposed before the matrix is destructed.
Definition at line 309 of file matrix.h.
References stxxl::swappable_block_matrix< ValueType, BlockSideLength >::block(), stxxl::swappable_block_matrix< ValueType, BlockSideLength >::height, and stxxl::swappable_block_matrix< ValueType, BlockSideLength >::width.
stxxl::swappable_block_matrix< ValueType, BlockSideLength >::swappable_block_matrix | ( | const swappable_block_matrix< ValueType, BlockSideLength > & | other | ) | [inline] |
stxxl::swappable_block_matrix< ValueType, BlockSideLength >::~swappable_block_matrix | ( | ) | [inline] |
swappable_block_identifier_type& stxxl::swappable_block_matrix< ValueType, BlockSideLength >::bl | ( | const size_type | row, |
const size_type | col | ||
) | [inline, protected] |
swappable_block_identifier_type stxxl::swappable_block_matrix< ValueType, BlockSideLength >::block | ( | const size_type | row, |
const size_type | col | ||
) | const [inline] |
Definition at line 378 of file matrix.h.
Referenced by stxxl::swappable_block_matrix< ValueType, BlockSideLength >::swappable_block_matrix().
static size_type stxxl::swappable_block_matrix< ValueType, BlockSideLength >::block_index_from_elem | ( | elem_size_type | index | ) | [inline, static] |
static int_type stxxl::swappable_block_matrix< ValueType, BlockSideLength >::elem_index_in_block_from_elem | ( | elem_size_type | index | ) | [inline, static] |
int_type stxxl::swappable_block_matrix< ValueType, BlockSideLength >::elem_index_in_block_from_elem | ( | elem_size_type | row, |
elem_size_type | col | ||
) | const [inline] |
const size_type& stxxl::swappable_block_matrix< ValueType, BlockSideLength >::get_height | ( | ) | const [inline] |
Definition at line 384 of file matrix.h.
Referenced by stxxl::matrix_operations< ValueType, BlockSideLength >::choose_level_for_feedable_sw(), stxxl::matrix_operations< ValueType, BlockSideLength >::element_op(), stxxl::matrix_operations< ValueType, BlockSideLength >::element_op_twice_nontransposed(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, Level, AExists, BExists >::feed_a(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, 0, AExists, BExists >::feed_a(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, Level, AExists, BExists >::feed_b(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, 0, AExists, BExists >::feed_b(), stxxl::matrix_to_quadtree< ValueType, BlockSideLength, Level >::matrix_to_quadtree(), stxxl::matrix_to_quadtree_block_grained< ValueType, BlockSideLength, Level, Granularity >::matrix_to_quadtree_block_grained(), stxxl::matrix_to_quadtree_block_grained< ValueType, BlockSideLength, 0, Granularity >::matrix_to_quadtree_block_grained(), stxxl::matrix_operations< ValueType, BlockSideLength >::multi_level_strassen_winograd_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::multi_level_strassen_winograd_multiply_and_add_block_grained(), stxxl::matrix_operations< ValueType, BlockSideLength >::naive_matrix_col_vector_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::naive_matrix_from_vectors(), stxxl::matrix_operations< ValueType, BlockSideLength >::naive_matrix_row_vector_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::naive_multiply_and_add(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, Level, AExists, BExists >::read_and_add(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, 0, AExists, BExists >::read_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::recursive_matrix_col_vector_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::recursive_matrix_from_vectors(), stxxl::matrix_operations< ValueType, BlockSideLength >::recursive_matrix_row_vector_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::recursive_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_multiply(), stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_multiply_and_add_interleaved(), stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_postaddition(), stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_preaddition_a(), stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_preaddition_b(), stxxl::matrix_operations< ValueType, BlockSideLength >::swappable_block_matrix_quarterer::swappable_block_matrix_quarterer(), stxxl::matrix_operations< ValueType, BlockSideLength >::use_feedable_sw(), and stxxl::matrix_operations< ValueType, BlockSideLength >::use_feedable_sw_block_grained().
const size_type& stxxl::swappable_block_matrix< ValueType, BlockSideLength >::get_width | ( | ) | const [inline] |
Definition at line 387 of file matrix.h.
Referenced by stxxl::matrix_operations< ValueType, BlockSideLength >::choose_level_for_feedable_sw(), stxxl::matrix_operations< ValueType, BlockSideLength >::element_op(), stxxl::matrix_operations< ValueType, BlockSideLength >::element_op_twice_nontransposed(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, Level, AExists, BExists >::feed_a(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, 0, AExists, BExists >::feed_a(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, Level, AExists, BExists >::feed_b(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, 0, AExists, BExists >::feed_b(), stxxl::matrix_to_quadtree< ValueType, BlockSideLength, Level >::matrix_to_quadtree(), stxxl::matrix_to_quadtree_block_grained< ValueType, BlockSideLength, Level, Granularity >::matrix_to_quadtree_block_grained(), stxxl::matrix_to_quadtree_block_grained< ValueType, BlockSideLength, 0, Granularity >::matrix_to_quadtree_block_grained(), stxxl::matrix_operations< ValueType, BlockSideLength >::multi_level_strassen_winograd_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::multi_level_strassen_winograd_multiply_and_add_block_grained(), stxxl::matrix_operations< ValueType, BlockSideLength >::naive_matrix_col_vector_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::naive_matrix_from_vectors(), stxxl::matrix_operations< ValueType, BlockSideLength >::naive_matrix_row_vector_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::naive_multiply_and_add(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, Level, AExists, BExists >::read_and_add(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, 0, AExists, BExists >::read_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::recursive_matrix_col_vector_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::recursive_matrix_from_vectors(), stxxl::matrix_operations< ValueType, BlockSideLength >::recursive_matrix_row_vector_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::recursive_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_multiply(), stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_multiply_and_add_interleaved(), stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_postaddition(), stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_preaddition_a(), stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_preaddition_b(), stxxl::matrix_operations< ValueType, BlockSideLength >::swappable_block_matrix_quarterer::swappable_block_matrix_quarterer(), stxxl::matrix_operations< ValueType, BlockSideLength >::use_feedable_sw(), and stxxl::matrix_operations< ValueType, BlockSideLength >::use_feedable_sw_block_grained().
const bool& stxxl::swappable_block_matrix< ValueType, BlockSideLength >::is_transposed | ( | ) | const [inline] |
if the elements inside the blocks are in transposed order i.e. column-major
Definition at line 391 of file matrix.h.
Referenced by stxxl::matrix_operations< ValueType, BlockSideLength >::element_op(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, Level, AExists, BExists >::feed_a(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, Level, AExists, BExists >::feed_b(), stxxl::matrix_operations< ValueType, BlockSideLength >::naive_matrix_col_vector_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::naive_matrix_from_vectors(), stxxl::matrix_operations< ValueType, BlockSideLength >::naive_matrix_row_vector_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::naive_multiply_and_add(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, Level, AExists, BExists >::read_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_multiply(), and stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_multiply_and_add_interleaved().
swappable_block_identifier_type stxxl::swappable_block_matrix< ValueType, BlockSideLength >::operator() | ( | const size_type | row, |
const size_type | col | ||
) | const [inline] |
swappable_block_matrix& stxxl::swappable_block_matrix< ValueType, BlockSideLength >::operator= | ( | const swappable_block_matrix< ValueType, BlockSideLength > & | other | ) | [private] |
void stxxl::swappable_block_matrix< ValueType, BlockSideLength >::set_zero | ( | ) | [inline] |
Definition at line 408 of file matrix.h.
Referenced by stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_multiply().
void stxxl::swappable_block_matrix< ValueType, BlockSideLength >::transpose | ( | ) | [inline] |
Definition at line 394 of file matrix.h.
References std::swap().
blocks_type stxxl::swappable_block_matrix< ValueType, BlockSideLength >::blocks [protected] |
block_scheduler_type& stxxl::swappable_block_matrix< ValueType, BlockSideLength >::bs |
Definition at line 237 of file matrix.h.
Referenced by stxxl::matrix_operations< ValueType, BlockSideLength >::element_op(), stxxl::matrix_operations< ValueType, BlockSideLength >::element_op_twice_nontransposed(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, Level, AExists, BExists >::feed_a(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, Level, AExists, BExists >::feed_b(), stxxl::matrix< ValueType, BlockSideLength >::multiply(), stxxl::matrix< ValueType, BlockSideLength >::multiply_internal(), stxxl::matrix_operations< ValueType, BlockSideLength >::naive_matrix_col_vector_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::naive_matrix_from_vectors(), stxxl::matrix_operations< ValueType, BlockSideLength >::naive_matrix_row_vector_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::naive_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::op_swappable_block_nontransposed(), stxxl::feedable_strassen_winograd_block_grained< ValueType, BlockSideLength, Level, AExists, BExists >::read_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_multiply(), stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_multiply_and_add(), stxxl::matrix_operations< ValueType, BlockSideLength >::strassen_winograd_multiply_and_add_interleaved(), stxxl::matrix_operations< ValueType, BlockSideLength >::use_feedable_sw(), and stxxl::matrix_operations< ValueType, BlockSideLength >::use_feedable_sw_block_grained().
bool stxxl::swappable_block_matrix< ValueType, BlockSideLength >::elements_in_blocks_transposed [protected] |
size_type stxxl::swappable_block_matrix< ValueType, BlockSideLength >::height [protected] |
height of the matrix in blocks
Definition at line 245 of file matrix.h.
Referenced by stxxl::swappable_block_matrix< ValueType, BlockSideLength >::swappable_block_matrix().
size_type stxxl::swappable_block_matrix< ValueType, BlockSideLength >::height_from_supermatrix [protected] |
size_type stxxl::swappable_block_matrix< ValueType, BlockSideLength >::width [protected] |
width of the matrix in blocks
Definition at line 245 of file matrix.h.
Referenced by stxxl::swappable_block_matrix< ValueType, BlockSideLength >::swappable_block_matrix().
size_type stxxl::swappable_block_matrix< ValueType, BlockSideLength >::width_from_supermatrix [protected] |