ViennaCL - The Vienna Computing Library
1.5.2
|
Class for representing strided submatrices of a bigger matrix A. More...
#include <forwards.h>
Public Types | |
typedef MatrixType::orientation_category | orientation_category |
typedef MatrixType::value_type | value_type |
typedef viennacl::result_of::cpu_value_type < value_type >::type | cpu_value_type |
typedef range::size_type | size_type |
typedef range::difference_type | difference_type |
typedef value_type | reference |
typedef const value_type & | const_reference |
![]() | |
typedef matrix_iterator < row_iteration, self_type > | iterator1 |
typedef matrix_iterator < col_iteration, self_type > | iterator2 |
typedef scalar < MatrixType::cpu_value_type > | value_type |
typedef MatrixType::cpu_value_type | cpu_value_type |
typedef SizeType | size_type |
typedef DistanceType | difference_type |
typedef viennacl::backend::mem_handle | handle_type |
typedef MatrixType::orientation_functor | orientation_functor |
typedef MatrixType::orientation_functor::orientation_category | orientation_category |
Public Member Functions | |
matrix_slice (MatrixType &A, slice const &row_slice, slice const &col_slice) | |
![]() | |
matrix_base () | |
The default constructor. Does not allocate any memory. More... | |
matrix_base (size_type rows, size_type columns, viennacl::context ctx=viennacl::context()) | |
Creates the matrix with the given dimensions. More... | |
matrix_base (viennacl::backend::mem_handle &h, size_type mat_size1, size_type mat_start1, difference_type mat_stride1, size_type mat_internal_size1, size_type mat_size2, size_type mat_start2, difference_type mat_stride2, size_type mat_internal_size2) | |
Constructor for creating a matrix_range or matrix_stride from some other matrix/matrix_range/matrix_stride. More... | |
matrix_base (matrix_expression< const LHS, const RHS, OP > const &proxy) | |
matrix_base (MatrixType::cpu_value_type *ptr_to_mem, viennacl::memory_types mem_type, size_type mat_size1, size_type mat_start1, difference_type mat_stride1, size_type mat_internal_size1, size_type mat_size2, size_type mat_start2, difference_type mat_stride2, size_type mat_internal_size2) | |
self_type & | operator= (const self_type &other) |
self_type & | operator= (const matrix_expression< const LHS, const RHS, OP > &proxy) |
Creates the matrix from the supplied random matrix. More... | |
self_type & | operator= (const matrix_expression< const self_type, const self_type, op_trans > &proxy) |
self_type & | operator= (identity_matrix< MatrixType::cpu_value_type > const &m) |
Assigns the supplied identity matrix to the matrix. More... | |
self_type & | operator= (zero_matrix< MatrixType::cpu_value_type > const &m) |
Assigns the supplied zero matrix to the matrix. More... | |
self_type & | operator= (scalar_matrix< MatrixType::cpu_value_type > const &m) |
Assigns the supplied scalar vector to the matrix. More... | |
self_type & | operator+= (const matrix_expression< const LHS, const RHS, OP > &proxy) |
self_type & | operator+= (const self_type &other) |
self_type & | operator-= (const matrix_expression< const LHS, const RHS, OP > &proxy) |
self_type & | operator-= (const self_type &other) |
entry_proxy < MatrixType::cpu_value_type > | operator() (size_type row_index, size_type col_index) |
Read-write access to a single element of the matrix/matrix_range/matrix_slice. More... | |
const_entry_proxy < MatrixType::cpu_value_type > | operator() (size_type row_index, size_type col_index) const |
Read access to a single element of the matrix/matrix_range/matrix_slice. More... | |
self_type & | operator*= (MatrixType::cpu_value_typeval) |
Scales a matrix by a CPU scalar value. More... | |
self_type & | operator/= (MatrixType::cpu_value_typeval) |
Scales this matrix by a CPU scalar value. More... | |
matrix_expression< const self_type, const MatrixType::cpu_value_type, op_mult > | operator- () const |
Sign flip for the matrix. Emulated to be equivalent to -1.0 * matrix. More... | |
size_type | size1 () const |
Returns the number of rows. More... | |
size_type | size2 () const |
Returns the number of columns. More... | |
size_type | start1 () const |
Returns the number of rows. More... | |
size_type | start2 () const |
Returns the number of columns. More... | |
size_type | stride1 () const |
Returns the number of rows. More... | |
size_type | stride2 () const |
Returns the number of columns. More... | |
void | clear () |
Resets all entries to zero. More... | |
size_type | internal_size1 () const |
Returns the internal number of rows. Usually required for launching OpenCL kernels only. More... | |
size_type | internal_size2 () const |
Returns the internal number of columns. Usually required for launching OpenCL kernels only. More... | |
size_type | internal_size () const |
Returns the total amount of allocated memory in multiples of sizeof(SCALARTYPE) More... | |
handle_type & | handle () |
Returns the OpenCL handle, non-const-version. More... | |
const handle_type & | handle () const |
Returns the OpenCL handle, const-version. More... | |
viennacl::memory_types | memory_domain () const |
Additional Inherited Members | |
![]() | |
static const size_type | alignment |
![]() | |
void | set_handle (viennacl::backend::mem_handle const &h) |
void | switch_memory_context (viennacl::context new_ctx) |
void | resize (size_type rows, size_type columns, bool preserve=true) |
Resizes the matrix. Existing entries can be preserved, but. More... | |
Class for representing strided submatrices of a bigger matrix A.
In MATLAB notation, this could for example refer to the submatrix A(3:2:8, 6:3:16) of a matrix A.
typedef const value_type& const_reference |
typedef viennacl::result_of::cpu_value_type<value_type>::type cpu_value_type |
typedef MatrixType::orientation_category orientation_category |
typedef value_type reference |
typedef range::size_type size_type |
typedef MatrixType::value_type value_type |
|
inline |