ViennaCL - The Vienna Computing Library  1.7.0
Free open-source GPU-accelerated linear algebra and solver library.
viennacl::matrix_slice< MatrixType > Class Template Reference

Class for representing strided submatrices of a bigger matrix A. More...

#include <forwards.h>

Inheritance diagram for viennacl::matrix_slice< MatrixType >:
viennacl::matrix_base< MatrixType::cpu_value_type >

Public Types

typedef MatrixType::value_type value_type
 
typedef MatrixType::handle_type handle_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_typeconst_reference
 
- Public Types inherited from viennacl::matrix_base< MatrixType::cpu_value_type >
typedef matrix_iterator< row_iteration, self_typeiterator1
 
typedef matrix_iterator< col_iteration, self_typeiterator2
 
typedef scalar< MatrixType::cpu_value_type > value_type
 
typedef MatrixType::cpu_value_type cpu_value_type
 
typedef SizeT size_type
 
typedef DistanceT difference_type
 
typedef viennacl::backend::mem_handle handle_type
 

Public Member Functions

 matrix_slice (MatrixType const &A, slice const &row_slice, slice const &col_slice)
 
 matrix_slice (self_type const &A, slice const &row_slice, slice const &col_slice)
 
 matrix_slice (self_type const &other)
 
template<typename OtherNumericT , typename F >
base_typeoperator= (viennacl::matrix< OtherNumericT, F > const &B)
 
template<typename OtherNumericT , typename F >
base_typeoperator= (viennacl::matrix_range< viennacl::matrix< OtherNumericT, F > > const &B)
 
template<typename OtherNumericT , typename F >
base_typeoperator= (viennacl::matrix_slice< viennacl::matrix< OtherNumericT, F > > const &B)
 
- Public Member Functions inherited from viennacl::matrix_base< MatrixType::cpu_value_type >
 matrix_base ()
 The default constructor. Does not allocate any memory. More...
 
 matrix_base (bool is_row_major)
 The layout constructor. Does not allocate any memory. More...
 
 matrix_base (size_type rows, size_type columns, bool is_row_major, 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, size_type mat_stride1, size_type mat_internal_size1, size_type mat_size2, size_type mat_start2, size_type mat_stride2, size_type mat_internal_size2, bool is_row_major)
 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)
 Constructor for creating a matrix_range or matrix_stride from some other matrix/matrix_range/matrix_stride. More...
 
 matrix_base (MatrixType::cpu_value_type *ptr_to_mem, viennacl::memory_types mem_type, size_type mat_size1, size_type mat_start1, size_type mat_stride1, size_type mat_internal_size1, size_type mat_size2, size_type mat_start2, size_type mat_stride2, size_type mat_internal_size2, bool is_row_major)
 
 matrix_base (const self_type &other)
 
 matrix_base (const matrix_base< OtherNumericT, SizeT, DistanceT > &other)
 
self_typeoperator= (const self_type &other)
 
self_typeoperator= (const matrix_base< OtherNumericT, SizeT, DistanceT > &other)
 
self_typeoperator= (const matrix_expression< const LHS, const RHS, OP > &proxy)
 Implementation of the operation m1 = m2 @ alpha, where @ denotes either multiplication or division, and alpha is either a CPU or a GPU scalar. More...
 
self_typeoperator= (const matrix_expression< const self_type, const self_type, op_trans > &proxy)
 
self_typeoperator= (identity_matrix< MatrixType::cpu_value_type > const &m)
 Assigns the supplied identity matrix to the matrix. More...
 
self_typeoperator= (zero_matrix< MatrixType::cpu_value_type > const &m)
 Assigns the supplied zero matrix to the matrix. More...
 
self_typeoperator= (scalar_matrix< MatrixType::cpu_value_type > const &m)
 Assigns the supplied scalar vector to the matrix. More...
 
self_typeoperator+= (const matrix_expression< const LHS, const RHS, OP > &proxy)
 
self_typeoperator+= (const self_type &other)
 
self_typeoperator-= (const matrix_expression< const LHS, const RHS, OP > &proxy)
 
self_typeoperator-= (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_typeoperator*= (char val)
 Scales the matrix by a char (8-bit integer) More...
 
self_typeoperator*= (short val)
 Scales the matrix by a short integer. More...
 
self_typeoperator*= (int val)
 Scales the matrix by an integer. More...
 
self_typeoperator*= (long val)
 Scales the matrix by a long integer. More...
 
self_typeoperator*= (float val)
 Scales the matrix by a single precision floating point value. More...
 
self_typeoperator*= (double val)
 Scales the matrix by a double precision floating point value. More...
 
self_typeoperator/= (char val)
 Scales the matrix by a char (8-bit integer) More...
 
self_typeoperator/= (short val)
 Scales the matrix by a short integer. More...
 
self_typeoperator/= (int val)
 Scales the matrix by an integer. More...
 
self_typeoperator/= (long val)
 Scales the matrix by a long integer. More...
 
self_typeoperator/= (float val)
 Scales the matrix by a single precision floating point value. More...
 
self_typeoperator/= (double val)
 Scales the matrix by a double precision floating point value. More...
 
matrix_expression< const self_type, const MatrixType::cpu_value_type, op_multoperator- () 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(NumericT) More...
 
handle_typehandle ()
 Returns the OpenCL handle, non-const-version. More...
 
const handle_typehandle () const
 Returns the OpenCL handle, const-version. More...
 
viennacl::memory_types memory_domain () const
 
bool row_major () const
 
void switch_memory_context (viennacl::context new_ctx)
 

Additional Inherited Members

- Protected Member Functions inherited from viennacl::matrix_base< MatrixType::cpu_value_type >
void set_handle (viennacl::backend::mem_handle const &h)
 
void resize (size_type rows, size_type columns, bool preserve=true)
 

Detailed Description

template<typename MatrixType>
class viennacl::matrix_slice< MatrixType >

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.

Definition at line 443 of file forwards.h.

Member Typedef Documentation

template<typename MatrixType>
typedef const value_type& viennacl::matrix_slice< MatrixType >::const_reference

Definition at line 342 of file matrix_proxy.hpp.

template<typename MatrixType>
typedef viennacl::result_of::cpu_value_type<value_type>::type viennacl::matrix_slice< MatrixType >::cpu_value_type

Definition at line 338 of file matrix_proxy.hpp.

template<typename MatrixType>
typedef range::difference_type viennacl::matrix_slice< MatrixType >::difference_type

Definition at line 340 of file matrix_proxy.hpp.

template<typename MatrixType>
typedef MatrixType::handle_type viennacl::matrix_slice< MatrixType >::handle_type

Definition at line 337 of file matrix_proxy.hpp.

template<typename MatrixType>
typedef value_type viennacl::matrix_slice< MatrixType >::reference

Definition at line 341 of file matrix_proxy.hpp.

template<typename MatrixType>
typedef range::size_type viennacl::matrix_slice< MatrixType >::size_type

Definition at line 339 of file matrix_proxy.hpp.

template<typename MatrixType>
typedef MatrixType::value_type viennacl::matrix_slice< MatrixType >::value_type

Definition at line 336 of file matrix_proxy.hpp.

Constructor & Destructor Documentation

template<typename MatrixType>
viennacl::matrix_slice< MatrixType >::matrix_slice ( MatrixType const &  A,
slice const &  row_slice,
slice const &  col_slice 
)
inline

Definition at line 344 of file matrix_proxy.hpp.

template<typename MatrixType>
viennacl::matrix_slice< MatrixType >::matrix_slice ( self_type const &  A,
slice const &  row_slice,
slice const &  col_slice 
)
inline

Definition at line 351 of file matrix_proxy.hpp.

template<typename MatrixType>
viennacl::matrix_slice< MatrixType >::matrix_slice ( self_type const &  other)
inline

Definition at line 359 of file matrix_proxy.hpp.

Member Function Documentation

template<typename MatrixType>
template<typename OtherNumericT , typename F >
base_type& viennacl::matrix_slice< MatrixType >::operator= ( viennacl::matrix< OtherNumericT, F > const &  B)
inline

Definition at line 368 of file matrix_proxy.hpp.

template<typename MatrixType>
template<typename OtherNumericT , typename F >
base_type& viennacl::matrix_slice< MatrixType >::operator= ( viennacl::matrix_range< viennacl::matrix< OtherNumericT, F > > const &  B)
inline

Definition at line 371 of file matrix_proxy.hpp.

template<typename MatrixType>
template<typename OtherNumericT , typename F >
base_type& viennacl::matrix_slice< MatrixType >::operator= ( viennacl::matrix_slice< viennacl::matrix< OtherNumericT, F > > const &  B)
inline

Definition at line 374 of file matrix_proxy.hpp.


The documentation for this class was generated from the following files: