All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
viennacl::traits Namespace Reference

Namespace providing traits-information as well as generic wrappers to common routines for vectors and matrices such as size() or clear() More...

## Classes

struct | tag_of
| Generic base for wrapping other linear algebra packages. More...

## Functions

template<typename VectorType >
void | clear (VectorType &vec)
| Generic routine for setting all entries of a vector to zero. This is the version for non-ViennaCL objects. More...
template<typename ScalarType , unsigned int AlignmentV>
void | clear (viennacl::vector< ScalarType, AlignmentV > &vec)
| Generic routine for setting all entries of a vector to zero. This is the version for ViennaCL objects. More...
template<typename T >
viennacl::context | context (T const &t)
| Returns an ID for the currently active memory domain of an object. More...
viennacl::context | context (viennacl::backend::mem_handle const &h)
| Returns an ID for the currently active memory domain of an object. More...
template<typename MatrixType , typename NumericT >
void | fill (MatrixType &matrix, vcl_size_t row_index, vcl_size_t col_index, NumericT value)
| Generic filler routine for setting an entry of a matrix to a particular value. More...
template<typename T >
viennacl::backend::mem_handle & | handle (T &obj)
| Returns the generic memory handle of an object. Non-const version. More...
template<typename T >
viennacl::backend::mem_handle const & | handle (T const &obj)
| Returns the generic memory handle of an object. Const-version. More...
template<typename T >
viennacl::backend::mem_handle::ram_handle_type & | ram_handle (T &obj)
| Generic helper routine for extracting the RAM handle of a ViennaCL object. Non-const version. More...
template<typename T >
viennacl::backend::mem_handle::ram_handle_type const & | ram_handle (T const &obj)
| Generic helper routine for extracting the RAM handle of a ViennaCL object. Const version. More...
template<typename T >
viennacl::memory_types | active_handle_id (T const &obj)
| Returns an ID for the currently active memory domain of an object. More...
template<typename T >
bool | row_major (T const &)
template<typename NumericT >
bool | row_major (matrix_base< NumericT > const &A)
template<typename LHS , typename RHS , typename OP >
bool | row_major (matrix_expression< LHS, RHS, OP > const &proxy)
template<typename MatrixType >
void | resize (MatrixType &matrix, vcl_size_t rows, vcl_size_t cols)
| Generic resize routine for resizing a matrix (ViennaCL, uBLAS, etc.) to a new size/dimension. More...
template<typename VectorType >
void | resize (VectorType &vec, vcl_size_t new_size)
| Generic resize routine for resizing a vector (ViennaCL, uBLAS, etc.) to a new size. More...
template<typename MatrixType >
vcl_size_t | size1 (MatrixType const &mat)
| Generic routine for obtaining the number of rows of a matrix (ViennaCL, uBLAS, etc.) More...
template<typename MatrixType >
result_of::size_type < MatrixType >::type | size2 (MatrixType const &mat)
| Generic routine for obtaining the number of columns of a matrix (ViennaCL, uBLAS, etc.) More...
template<typename VectorType >
vcl_size_t | size (VectorType const &vec)
| Generic routine for obtaining the size of a vector (ViennaCL, uBLAS, etc.) More...
template<typename NumericT >
vcl_size_t | internal_size (vector_base< NumericT > const &vec)
| Helper routine for obtaining the buffer length of a ViennaCL vector. More...
template<typename NumericT >
vcl_size_t | internal_size1 (matrix_base< NumericT > const &mat)
| Helper routine for obtaining the internal number of entries per row of a ViennaCL matrix. More...
template<typename NumericT >
vcl_size_t | internal_size2 (matrix_base< NumericT > const &mat)
| Helper routine for obtaining the internal number of entries per column of a ViennaCL matrix. More...
template<typename NumericT >
vcl_size_t | ld (matrix_base< NumericT > const &mat)
| Helper routine for obtaining the internal number of entries per row of a ViennaCL matrix. More...
template<typename NumericT >
vcl_size_t | nld (matrix_base< NumericT > const &mat)
template<typename LHS >
vcl_size_t | size (vector_expression< LHS, const int, op_matrix_diag > const &proxy)
template<typename LHS >
vcl_size_t | size (vector_expression< LHS, const unsigned int, op_row > const &proxy)
template<typename LHS >
vcl_size_t | size (vector_expression< LHS, const unsigned int, op_column > const &proxy)
template<typename T >
result_of::size_type< T >::type | start (T const &obj)
template<typename ScalarType , unsigned int AlignmentV>
result_of::size_type < viennacl::vector< ScalarType, AlignmentV > >::type | start (viennacl::vector< ScalarType, AlignmentV > const &)
template<typename T >
result_of::size_type< T >::type | start1 (T const &obj)
template<typename ScalarType , typename F , unsigned int AlignmentV>
result_of::size_type < viennacl::matrix< ScalarType, F, AlignmentV > >::type | start1 (viennacl::matrix< ScalarType, F, AlignmentV > const &)
template<typename T >
result_of::size_type< T >::type | start2 (T const &obj)
template<typename ScalarType , typename F , unsigned int AlignmentV>
result_of::size_type < viennacl::matrix< ScalarType, F, AlignmentV > >::type | start2 (viennacl::matrix< ScalarType, F, AlignmentV > const &)
template<typename T >
result_of::size_type < viennacl::vector_base< T > >::type | stride (viennacl::vector_base< T > const &s)
template<typename NumericT >
result_of::size_type < matrix_base< NumericT > >::type | stride1 (matrix_base< NumericT > const &s)
template<typename NumericT >
result_of::size_type < matrix_base< NumericT > >::type | stride2 (matrix_base< NumericT > const &s)

## Detailed Description

Namespace providing traits-information as well as generic wrappers to common routines for vectors and matrices such as size() or clear()

## Function Documentation

template<typename T >

viennacl::memory_types viennacl::traits::active_handle_id | ( | T const & | obj | ) |

Returns an ID for the currently active memory domain of an object.

Examples:
  matrix-free.cpp.

Definition at line 218 of file handle.hpp.

template<typename VectorType >

void viennacl::traits::clear | ( | VectorType & | vec | ) |

Generic routine for setting all entries of a vector to zero. This is the version for non-ViennaCL objects.

Definition at line 43 of file clear.hpp.

template<typename ScalarType , unsigned int AlignmentV>

void viennacl::traits::clear | ( | viennacl::vector< ScalarType, AlignmentV > & | vec | ) |

Generic routine for setting all entries of a vector to zero. This is the version for ViennaCL objects.

Definition at line 53 of file clear.hpp.

template<typename T >

viennacl::context viennacl::traits::context | ( | T const & | t | ) |

Returns an ID for the currently active memory domain of an object.

Examples:
  amg.cpp, and examples/tutorial/libviennacl.cpp.

Definition at line 40 of file context.hpp.

viennacl::context viennacl::traits::context | ( | viennacl::backend::mem_handle const & | h | ) |

inline

Returns an ID for the currently active memory domain of an object.

Definition at line 51 of file context.hpp.

template<typename MatrixType , typename NumericT >

void viennacl::traits::fill | ( | MatrixType & | matrix,
|  | vcl_size_t | row_index,
|  | vcl_size_t | col_index,
|  | NumericT | value
| ) |  |

Generic filler routine for setting an entry of a matrix to a particular value.

Definition at line 46 of file fill.hpp.

template<typename T >

viennacl::backend::mem_handle& viennacl::traits::handle | ( | T & | obj | ) |

Returns the generic memory handle of an object. Non-const version.

Definition at line 41 of file handle.hpp.

template<typename T >

viennacl::backend::mem_handle const& viennacl::traits::handle | ( | T const & | obj | ) |

Returns the generic memory handle of an object. Const-version.

Definition at line 48 of file handle.hpp.

template<typename NumericT >

vcl_size_t viennacl::traits::internal_size | ( | vector_base< NumericT > const & | vec | ) |

Helper routine for obtaining the buffer length of a ViennaCL vector.

Definition at line 375 of file size.hpp.

template<typename NumericT >

vcl_size_t viennacl::traits::internal_size1 | ( | matrix_base< NumericT > const & | mat | ) |

Helper routine for obtaining the internal number of entries per row of a ViennaCL matrix.

Definition at line 386 of file size.hpp.

template<typename NumericT >

vcl_size_t viennacl::traits::internal_size2 | ( | matrix_base< NumericT > const & | mat | ) |

Helper routine for obtaining the internal number of entries per column of a ViennaCL matrix.

Definition at line 394 of file size.hpp.

template<typename NumericT >

vcl_size_t viennacl::traits::ld | ( | matrix_base< NumericT > const & | mat | ) |

Helper routine for obtaining the internal number of entries per row of a ViennaCL matrix.

Definition at line 398 of file size.hpp.

template<typename NumericT >

vcl_size_t viennacl::traits::nld | ( | matrix_base< NumericT > const & | mat | ) |

Definition at line 406 of file size.hpp.

template<typename T >

viennacl::backend::mem_handle::ram_handle_type& viennacl::traits::ram_handle | ( | T & | obj | ) |

Generic helper routine for extracting the RAM handle of a ViennaCL object. Non-const version.

Definition at line 138 of file handle.hpp.

template<typename T >

viennacl::backend::mem_handle::ram_handle_type const& viennacl::traits::ram_handle | ( | T const & | obj | ) |

Generic helper routine for extracting the RAM handle of a ViennaCL object. Const version.

Definition at line 145 of file handle.hpp.

template<typename MatrixType >

void viennacl::traits::resize | ( | MatrixType & | matrix,
|  | vcl_size_t | rows,
|  | vcl_size_t | cols
| ) |  |

Generic resize routine for resizing a matrix (ViennaCL, uBLAS, etc.) to a new size/dimension.

Definition at line 63 of file size.hpp.

template<typename VectorType >

void viennacl::traits::resize | ( | VectorType & | vec,
|  | vcl_size_t | new_size
| ) |  |

Generic resize routine for resizing a vector (ViennaCL, uBLAS, etc.) to a new size.

Definition at line 70 of file size.hpp.

template<typename T >

bool viennacl::traits::row_major | ( | T const & |  | ) |

Definition at line 38 of file row_major.hpp.

template<typename NumericT >

bool viennacl::traits::row_major | ( | matrix_base< NumericT > const & | A | ) |

Definition at line 41 of file row_major.hpp.

template<typename LHS , typename RHS , typename OP >

bool viennacl::traits::row_major | ( | matrix_expression< LHS, RHS, OP > const & | proxy | ) |

Definition at line 44 of file row_major.hpp.

template<typename VectorType >

vcl_size_t viennacl::traits::size | ( | VectorType const & | vec | ) |

Generic routine for obtaining the size of a vector (ViennaCL, uBLAS, etc.)

Examples:
  blas3.cpp, examples/tutorial/libviennacl.cpp, iterative-armadillo.cpp, multithreaded.cpp, multithreaded_cg.cpp, sparse.cpp, structured-matrices.cpp, and wrap-host-buffer.cpp.

Definition at line 239 of file size.hpp.

template<typename LHS >

vcl_size_t viennacl::traits::size | ( | vector_expression< LHS, const int, op_matrix_diag > const & | proxy | ) |

Definition at line 414 of file size.hpp.

template<typename LHS >

vcl_size_t viennacl::traits::size | ( | vector_expression< LHS, const unsigned int, op_row > const & | proxy | ) |

Definition at line 427 of file size.hpp.

template<typename LHS >

vcl_size_t viennacl::traits::size | ( | vector_expression< LHS, const unsigned int, op_column > const & | proxy | ) |

Definition at line 433 of file size.hpp.

template<typename MatrixType >

vcl_size_t viennacl::traits::size1 | ( | MatrixType const & | mat | ) |

Generic routine for obtaining the number of rows of a matrix (ViennaCL, uBLAS, etc.)

Examples:
  matrix-free.cpp.

Definition at line 163 of file size.hpp.

template<typename MatrixType >

result_of::size_type<MatrixType>::type viennacl::traits::size2 | ( | MatrixType const & | mat | ) |

Generic routine for obtaining the number of columns of a matrix (ViennaCL, uBLAS, etc.)

Definition at line 201 of file size.hpp.

template<typename T >

result_of::size_type<T>::type viennacl::traits::start | ( | T const & | obj | ) |

Definition at line 44 of file start.hpp.

template<typename ScalarType , unsigned int AlignmentV>

result_of::size_type<viennacl::vector<ScalarType, AlignmentV> >::type viennacl::traits::start | ( | viennacl::vector< ScalarType, AlignmentV > const & |  | ) |

Definition at line 52 of file start.hpp.

template<typename T >

result_of::size_type<T>::type viennacl::traits::start1 | ( | T const & | obj | ) |

Definition at line 65 of file start.hpp.

template<typename ScalarType , typename F , unsigned int AlignmentV>

result_of::size_type<viennacl::matrix<ScalarType, F, AlignmentV> >::type viennacl::traits::start1 | ( | viennacl::matrix< ScalarType, F, AlignmentV > const & |  | ) |

Definition at line 73 of file start.hpp.

template<typename T >

result_of::size_type<T>::type viennacl::traits::start2 | ( | T const & | obj | ) |

Definition at line 84 of file start.hpp.

template<typename ScalarType , typename F , unsigned int AlignmentV>

result_of::size_type<viennacl::matrix<ScalarType, F, AlignmentV> >::type viennacl::traits::start2 | ( | viennacl::matrix< ScalarType, F, AlignmentV > const & |  | ) |

Definition at line 92 of file start.hpp.

template<typename T >

result_of::size_type< viennacl::vector_base<T> >::type viennacl::traits::stride | ( | viennacl::vector_base< T > const & | s | ) |

Definition at line 45 of file stride.hpp.

template<typename NumericT >

result_of::size_type< matrix_base<NumericT> >::type viennacl::traits::stride1 | ( | matrix_base< NumericT > const & | s | ) |

Definition at line 55 of file stride.hpp.

template<typename NumericT >

result_of::size_type< matrix_base<NumericT> >::type viennacl::traits::stride2 | ( | matrix_base< NumericT > const & | s | ) |

Definition at line 65 of file stride.hpp.