|
template<typename MT , bool SO> |
Column< MT > | blaze::column (Matrix< MT, SO > &matrix, size_t index) |
| Creating a view on a specific column of the given matrix. More...
|
|
template<typename MT , bool SO> |
const Column< const MT > | blaze::column (const Matrix< MT, SO > &matrix, size_t index) |
| Creating a view on a specific column of the given constant matrix. More...
|
|
template<typename MT , bool SO> |
Column< MT > | blaze::column (Matrix< MT, SO > &&matrix, size_t index) |
| Creating a view on a specific column of the given temporary matrix. More...
|
|
template<typename MT , bool SO> |
Row< MT > | blaze::row (Matrix< MT, SO > &matrix, size_t index) |
| Creating a view on a specific row of the given matrix. More...
|
|
template<typename MT , bool SO> |
const Row< const MT > | blaze::row (const Matrix< MT, SO > &matrix, size_t index) |
| Creating a view on a specific row of the given constant matrix. More...
|
|
template<typename MT , bool SO> |
Row< MT > | blaze::row (Matrix< MT, SO > &&matrix, size_t index) |
| Creating a view on a specific row of the given temporary matrix. More...
|
|
template<typename MT , bool SO> |
decltype(auto) | blaze::submatrix (Matrix< MT, SO > &matrix, size_t row, size_t column, size_t m, size_t n) |
| Creating a view on a specific submatrix of the given matrix. More...
|
|
template<typename MT , bool SO> |
decltype(auto) | blaze::submatrix (const Matrix< MT, SO > &matrix, size_t row, size_t column, size_t m, size_t n) |
| Creating a view on a specific submatrix of the given constant matrix. More...
|
|
template<typename MT , bool SO> |
decltype(auto) | blaze::submatrix (Matrix< MT, SO > &&matrix, size_t row, size_t column, size_t m, size_t n) |
| Creating a view on a specific submatrix of the given temporary matrix. More...
|
|
template<bool AF, typename MT , bool SO> |
Submatrix< MT, AF > | blaze::submatrix (Matrix< MT, SO > &matrix, size_t row, size_t column, size_t m, size_t n) |
| Creating a view on a specific submatrix of the given matrix. More...
|
|
template<bool AF, typename MT , bool SO> |
const Submatrix< const MT, AF > | blaze::submatrix (const Matrix< MT, SO > &matrix, size_t row, size_t column, size_t m, size_t n) |
| Creating a view on a specific submatrix of the given constant matrix. More...
|
|
template<bool AF, typename MT , bool SO> |
Submatrix< MT, AF > | blaze::submatrix (Matrix< MT, SO > &&matrix, size_t row, size_t column, size_t m, size_t n) |
| Creating a view on a specific submatrix of the given temporary matrix. More...
|
|
template<typename VT , bool TF> |
decltype(auto) | blaze::subvector (Vector< VT, TF > &vector, size_t index, size_t size) |
| Creating a view on a specific subvector of the given vector. More...
|
|
template<typename VT , bool TF> |
decltype(auto) | blaze::subvector (const Vector< VT, TF > &vector, size_t index, size_t size) |
| Creating a view on a specific subvector of the given constant vector. More...
|
|
template<typename VT , bool TF> |
decltype(auto) | blaze::subvector (Vector< VT, TF > &&vector, size_t index, size_t size) |
| Creating a view on a specific subvector of the given temporary vector. More...
|
|
template<bool AF, typename VT , bool TF> |
Subvector< VT, AF > | blaze::subvector (Vector< VT, TF > &vector, size_t index, size_t size) |
| Creating a view on a specific subvector of the given vector. More...
|
|
template<bool AF, typename VT , bool TF> |
const Subvector< const VT, AF > | blaze::subvector (const Vector< VT, TF > &vector, size_t index, size_t size) |
| Creating a view on a specific subvector of the given constant vector. More...
|
|
template<bool AF, typename VT , bool TF> |
Subvector< VT, AF > | blaze::subvector (Vector< VT, TF > &&vector, size_t index, size_t size) |
| Creating a view on a specific subvector of the given temporary vector. More...
|
|
template<bool AF, typename MT , bool SO>
Creating a view on a specific submatrix of the given matrix.
- Parameters
-
matrix | The matrix containing the submatrix. |
row | The index of the first row of the submatrix. |
column | The index of the first column of the submatrix. |
m | The number of rows of the submatrix. |
n | The number of columns of the submatrix. |
- Returns
- View on the specific submatrix of the matrix.
- Exceptions
-
std::invalid_argument | Invalid submatrix specification. |
This function returns an expression representing an aligned or unaligned submatrix of the given dense or sparse matrix, based on the specified alignment flag AF. The following example demonstrates the creation of both an aligned and unaligned submatrix:
DenseMatrix D;
SparseMatrix S;
In case the submatrix is not properly specified (i.e. if the specified row or column is larger than the total number of rows or columns of the given matrix or the submatrix is specified beyond the number of rows or columns of the matrix) a std::invalid_argument exception is thrown.
In contrast to unaligned submatrices, which provide full flexibility, aligned submatrices pose additional alignment restrictions and the given row, and column arguments are subject to additional checks to guarantee proper alignment. However, especially in case of dense submatrices this may result in considerable performance improvements.
The alignment restrictions refer to system dependent address restrictions for the used element type and the available vectorization mode (SSE, AVX, ...). In order to be properly aligned the first element of each row/column of the submatrix must be aligned. The following source code gives some examples for a double precision row-major dynamic matrix, assuming that padding is enabled and that AVX is available, which packs 4 double
values into a SIMD vector:
MatrixType D( 13UL, 17UL );
SubmatrixType dsm1 = submatrix<aligned>( D, 0UL, 0UL, 7UL, 11UL );
SubmatrixType dsm2 = submatrix<aligned>( D, 3UL, 12UL, 8UL, 16UL );
SubmatrixType dsm3 = submatrix<aligned>( D, 4UL, 0UL, 9UL, 17UL );
SubmatrixType dsm4 = submatrix<aligned>( D, 2UL, 3UL, 12UL, 12UL );
In case any alignment restrictions are violated, a std::invalid_argument exception is thrown.
template<bool AF, typename MT , bool SO>
Creating a view on a specific submatrix of the given constant matrix.
- Parameters
-
matrix | The constant matrix containing the submatrix. |
row | The index of the first row of the submatrix. |
column | The index of the first column of the submatrix. |
m | The number of rows of the submatrix. |
n | The number of columns of the submatrix. |
- Returns
- View on the specific submatrix of the matrix.
- Exceptions
-
std::invalid_argument | Invalid submatrix specification. |
This function returns an expression representing an aligned or unaligned submatrix of the given dense or sparse matrix, based on the specified alignment flag AF. The following example demonstrates the creation of both an aligned and unaligned submatrix:
const DenseMatrix D( ... );
const SparseMatrix S( ... );
In case the submatrix is not properly specified (i.e. if the specified row or column is larger than the total number of rows or columns of the given matrix or the submatrix is specified beyond the number of rows or columns of the matrix) a std::invalid_argument exception is thrown.
In contrast to unaligned submatrices, which provide full flexibility, aligned submatrices pose additional alignment restrictions and the given row, and column arguments are subject to additional checks to guarantee proper alignment. However, especially in case of dense submatrices this may result in considerable performance improvements.
The alignment restrictions refer to system dependent address restrictions for the used element type and the available vectorization mode (SSE, AVX, ...). In order to be properly aligned the first element of each row/column of the submatrix must be aligned. The following source code gives some examples for a double precision row-major dynamic matrix, assuming that padding is enabled and that AVX is available, which packs 4 double
values into a SIMD vector:
const MatrixType D( ... );
SubmatrixType dsm1 = submatrix<aligned>( D, 0UL, 0UL, 7UL, 11UL );
SubmatrixType dsm2 = submatrix<aligned>( D, 3UL, 12UL, 8UL, 16UL );
SubmatrixType dsm3 = submatrix<aligned>( D, 4UL, 0UL, 9UL, 17UL );
SubmatrixType dsm4 = submatrix<aligned>( D, 2UL, 3UL, 12UL, 12UL );
In case any alignment restrictions are violated, a std::invalid_argument exception is thrown.
template<typename MT , bool SO>
Creating a view on a specific submatrix of the given matrix.
- Parameters
-
matrix | The matrix containing the submatrix. |
row | The index of the first row of the submatrix. |
column | The index of the first column of the submatrix. |
m | The number of rows of the submatrix. |
n | The number of columns of the submatrix. |
- Returns
- View on the specific submatrix of the matrix.
- Exceptions
-
std::invalid_argument | Invalid submatrix specification. |
This function returns an expression representing the specified submatrix of the given matrix. The following example demonstrates the creation of a dense and sparse submatrix:
DenseMatrix D;
SparseMatrix S;
In case the submatrix is not properly specified (i.e. if the specified row or column is larger than the total number of rows or columns of the given matrix or the submatrix is specified beyond the number of rows or columns of the matrix) a std::invalid_argument exception is thrown.
Please note that this function creates an unaligned dense or sparse submatrix. For instance, the creation of the dense submatrix is equivalent to the following three function calls:
In contrast to unaligned submatrices, which provide full flexibility, aligned submatrices pose additional alignment restrictions. However, especially in case of dense submatrices this may result in considerable performance improvements. In order to create an aligned submatrix the following function call has to be used:
Note however that in this case the given arguments row, columns, m, and n are subject to additional checks to guarantee proper alignment.
template<typename MT , bool SO>
Creating a view on a specific submatrix of the given constant matrix.
- Parameters
-
matrix | The constant matrix containing the submatrix. |
row | The index of the first row of the submatrix. |
column | The index of the first column of the submatrix. |
m | The number of rows of the submatrix. |
n | The number of columns of the submatrix. |
- Returns
- View on the specific submatrix of the matrix.
- Exceptions
-
std::invalid_argument | Invalid submatrix specification. |
This function returns an expression representing the specified submatrix of the given constant matrix. The following example demonstrates the creation of a dense and sparse submatrix:
const DenseMatrix D( ... );
const SparseMatrix S( ... );
In case the submatrix is not properly specified (i.e. if the specified row or column is larger than the total number of rows or columns of the given matrix or the submatrix is specified beyond the number of rows or columns of the matrix) a std::invalid_argument exception is thrown.
Please note that this function creates an unaligned dense or sparse submatrix. For instance, the creation of the dense submatrix is equivalent to the following three function calls:
In contrast to unaligned submatrices, which provide full flexibility, aligned submatrices pose additional alignment restrictions. However, especially in case of dense submatrices this may result in considerable performance improvements. In order to create an aligned submatrix the following function call has to be used:
Note however that in this case the given arguments row, columns, m, and n are subject to additional checks to guarantee proper alignment.
template<bool AF, typename VT , bool TF>
Creating a view on a specific subvector of the given vector.
- Parameters
-
vector | The vector containing the subvector. |
index | The index of the first element of the subvector. |
size | The size of the subvector. |
- Returns
- View on the specific subvector of the vector.
- Exceptions
-
std::invalid_argument | Invalid subvector specification. |
This function returns an expression representing an aligned or unaligned subvector of the given dense or sparse vector, based on the specified alignment flag AF. The following example demonstrates the creation of both an aligned and unaligned subvector:
DenseVector d;
SparseVector s;
In case the subvector is not properly specified (i.e. if the specified first index is greater than the total size of the given vector or the subvector is specified beyond the size of the vector) a std::invalid_argument exception is thrown.
In contrast to unaligned subvectors, which provide full flexibility, aligned subvectors pose additional alignment restrictions and the given index is subject to additional checks to guarantee proper alignment. However, especially in case of dense subvectors this may result in considerable performance improvements.
The alignment restrictions refer to system dependent address restrictions for the used element type and the available vectorization mode (SSE, AVX, ...). In order to be properly aligned the first element of the subvector must be aligned. The following source code gives some examples for a double precision dynamic vector, assuming that AVX is available, which packs 4 double
values into a SIMD vector:
VectorType d( 17UL );
SubvectorType dsv1 = subvector<aligned>( d, 0UL, 13UL );
SubvectorType dsv2 = subvector<aligned>( d, 4UL, 7UL );
SubvectorType dsv3 = subvector<aligned>( d, 8UL, 9UL );
SubvectorType dsv4 = subvector<aligned>( d, 5UL, 8UL );
In case any alignment restrictions are violated, a std::invalid_argument exception is thrown.
template<bool AF, typename VT , bool TF>
Creating a view on a specific subvector of the given constant vector.
- Parameters
-
vector | The constant vector containing the subvector. |
index | The index of the first element of the subvector. |
size | The size of the subvector. |
- Returns
- View on the specific subvector of the vector.
- Exceptions
-
std::invalid_argument | Invalid subvector specification. |
This function returns an expression representing an aligned or unaligned subvector of the given constant dense or sparse vector, based on the specified alignment flag AF. The following example demonstrates the creation of both an aligned and unaligned subvector:
const DenseVector d( ... );
const SparseVector s( ... );
In case the subvector is not properly specified (i.e. if the specified first index is greater than the total size of the given vector or the subvector is specified beyond the size of the vector) a std::invalid_argument exception is thrown.
In contrast to unaligned subvectors, which provide full flexibility, aligned subvectors pose additional alignment restrictions and the given index is subject to additional checks to guarantee proper alignment. However, especially in case of dense subvectors this may result in considerable performance improvements.
The alignment restrictions refer to system dependent address restrictions for the used element type and the available vectorization mode (SSE, AVX, ...). In order to be properly aligned the first element of the subvector must be aligned. The following source code gives some examples for a double precision dynamic vector, assuming that AVX is available, which packs 4 double
values into a SIMD vector:
const VectorType d( ... );
SubvectorType dsv1 = subvector<aligned>( d, 0UL, 13UL );
SubvectorType dsv2 = subvector<aligned>( d, 4UL, 7UL );
SubvectorType dsv3 = subvector<aligned>( d, 8UL, 9UL );
SubvectorType dsv4 = subvector<aligned>( d, 5UL, 8UL );
In case any alignment restrictions are violated, a std::invalid_argument exception is thrown.