ViennaCL - The Vienna Computing Library  1.5.1
Namespaces | Data Structures | Typedefs | Enumerations | Functions
viennacl Namespace Reference

Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them. More...

Namespaces

 backend
 Namespace providing routines for handling the different memory domains.
 
 detail
 Holds implementation details for functionality in the main viennacl-namespace. Not intended for direct use by library users.
 
 generator
 Provides an OpenCL kernel generator.
 
 io
 Provides basic input-output functionality.
 
 linalg
 Provides all linear algebra operations which are not covered by operator overloads.
 
 ocl
 OpenCL backend. Manages platforms, contexts, buffers, kernels, etc.
 
 result_of
 Namespace containing many meta-functions.
 
 scheduler
 Contains the scheduling functionality which allows for dynamic kernel generation as well as the fusion of multiple statements into a single kernel.
 
 tools
 Namespace for various tools used within ViennaCL.
 
 traits
 Namespace providing traits-information as well as generic wrappers to common routines for vectors and matrices such as size() or clear()
 

Data Structures

class  circulant_matrix
 A Circulant matrix class. More...
 
class  compressed_compressed_matrix
 A sparse square matrix in compressed sparse rows format optimized for the case that only a few rows carry nonzero entries. More...
 
class  compressed_matrix
 A sparse square matrix in compressed sparse rows format. More...
 
class  context
 Represents a generic 'context' similar to an OpenCL context, but is backend-agnostic and thus also suitable for CUDA and OpenMP. More...
 
class  coordinate_matrix
 A sparse square matrix, where entries are stored as triplets (i,j, val), where i and j are the row and column indices and val denotes the entry. More...
 
class  ell_matrix
 Sparse matrix class using the ELLPACK format for storing the nonzeros. More...
 
struct  op_assign
 A tag class representing assignment. More...
 
struct  op_inplace_add
 A tag class representing inplace addition. More...
 
struct  op_inplace_sub
 A tag class representing inplace subtraction. More...
 
struct  op_add
 A tag class representing addition. More...
 
struct  op_sub
 A tag class representing subtraction. More...
 
struct  op_mult
 A tag class representing multiplication by a scalar. More...
 
struct  op_prod
 A tag class representing matrix-vector products and element-wise multiplications. More...
 
struct  op_mat_mat_prod
 A tag class representing matrix-matrix products. More...
 
struct  op_div
 A tag class representing division. More...
 
struct  op_pow
 A tag class representing the power function. More...
 
struct  op_element_binary
 A tag class representing element-wise binary operations (like multiplication) on vectors or matrices. More...
 
struct  op_element_unary
 A tag class representing element-wise unary operations (like sin()) on vectors or matrices. More...
 
struct  op_abs
 A tag class representing the modulus function for integers. More...
 
struct  op_acos
 A tag class representing the acos() function. More...
 
struct  op_asin
 A tag class representing the asin() function. More...
 
struct  op_atan
 A tag class representing the atan() function. More...
 
struct  op_atan2
 A tag class representing the atan2() function. More...
 
struct  op_ceil
 A tag class representing the ceil() function. More...
 
struct  op_cos
 A tag class representing the cos() function. More...
 
struct  op_cosh
 A tag class representing the cosh() function. More...
 
struct  op_exp
 A tag class representing the exp() function. More...
 
struct  op_fabs
 A tag class representing the fabs() function. More...
 
struct  op_fdim
 A tag class representing the fdim() function. More...
 
struct  op_floor
 A tag class representing the floor() function. More...
 
struct  op_fmax
 A tag class representing the fmax() function. More...
 
struct  op_fmin
 A tag class representing the fmin() function. More...
 
struct  op_fmod
 A tag class representing the fmod() function. More...
 
struct  op_log
 A tag class representing the log() function. More...
 
struct  op_log10
 A tag class representing the log10() function. More...
 
struct  op_sin
 A tag class representing the sin() function. More...
 
struct  op_sinh
 A tag class representing the sinh() function. More...
 
struct  op_sqrt
 A tag class representing the sqrt() function. More...
 
struct  op_tan
 A tag class representing the tan() function. More...
 
struct  op_tanh
 A tag class representing the tanh() function. More...
 
struct  op_matrix_diag
 A tag class representing the (off-)diagonal of a matrix. More...
 
struct  op_vector_diag
 A tag class representing a matrix given by a vector placed on a certain (off-)diagonal. More...
 
struct  op_row
 A tag class representing the extraction of a matrix row to a vector. More...
 
struct  op_column
 A tag class representing the extraction of a matrix column to a vector. More...
 
struct  op_inner_prod
 A tag class representing inner products of two vectors. More...
 
struct  op_norm_1
 A tag class representing the 1-norm of a vector. More...
 
struct  op_norm_2
 A tag class representing the 2-norm of a vector. More...
 
struct  op_norm_inf
 A tag class representing the inf-norm of a vector. More...
 
struct  op_norm_frobenius
 A tag class representing the Frobenius-norm of a matrix. More...
 
struct  op_trans
 A tag class representing transposed matrices. More...
 
struct  op_flip_sign
 A tag class representing sign flips (for scalars only. Vectors and matrices use the standard multiplication by the scalar -1.0) More...
 
class  scalar
 This class represents a single scalar value on the GPU and behaves mostly like a built-in scalar type like float or double. More...
 
class  scalar_expression
 A proxy for scalar expressions (e.g. from inner vector products) More...
 
class  entry_proxy
 A proxy class for a single element of a vector or matrix. This proxy should not be noticed by end-users of the library. More...
 
class  vector_expression
 An expression template class that represents a binary operation that yields a vector. More...
 
class  vector_iterator
 A STL-type iterator for vector elements. Elements can be accessed and manipulated. VERY SLOW!! More...
 
class  const_vector_iterator
 A STL-type const-iterator for vector elements. Elements can be accessed, but cannot be manipulated. VERY SLOW!! More...
 
class  implicit_vector_base
 Common base class for representing vectors where the entries are not all stored explicitly. More...
 
class  zero_vector
 Represents a vector consisting of zeros only. More...
 
class  unit_vector
 Represents a vector consisting of 1 at a given index and zeros otherwise. More...
 
class  one_vector
 Represents a vector consisting of ones only. More...
 
class  scalar_vector
 Represents a vector consisting of scalars 's' only, i.e. v[i] = s for all i. To be used as an initializer for viennacl::vector, vector_range, or vector_slize only. More...
 
class  vector_base
 Common base class for dense vectors, vector ranges, and vector slices. More...
 
class  vector
 A vector class representing a linear memory sequence on the GPU. Inspired by boost::numeric::ublas::vector. More...
 
class  vector_tuple
 Tuple class holding pointers to multiple vectors. Mainly used as a temporary object returned from viennacl::tie(). More...
 
struct  row_major_tag
 Tag class for indicating row-major layout of a matrix. Not passed to the matrix directly, see row_major type. More...
 
struct  column_major_tag
 Tag class for indicating column-major layout of a matrix. Not passed to the matrix directly, see row_major type. More...
 
struct  row_major
 A tag for row-major storage of a dense matrix. More...
 
struct  column_major
 A tag for column-major storage of a dense matrix. More...
 
class  matrix_expression
 Expression template class for representing a tree of expressions which ultimately result in a matrix. More...
 
class  matrix_base
 A dense matrix class. More...
 
class  matrix
 A dense matrix class. More...
 
class  implicit_matrix_base
 Base class for representing matrices where the individual entries are not all stored explicitly, e.g. identity_matrix<> More...
 
class  identity_matrix
 Represents a vector consisting of 1 at a given index and zeros otherwise. To be used as an initializer for viennacl::vector, vector_range, or vector_slize only. More...
 
class  zero_matrix
 Represents a vector consisting of zeros only. To be used as an initializer for viennacl::vector, vector_range, or vector_slize only. More...
 
class  scalar_matrix
 Represents a vector consisting of scalars 's' only, i.e. v[i] = s for all i. To be used as an initializer for viennacl::vector, vector_range, or vector_slize only. More...
 
class  hyb_matrix
 Sparse matrix class using a hybrid format composed of the ELL and CSR format for storing the nonzeros. More...
 
class  hankel_matrix
 A Hankel matrix class. More...
 
class  toeplitz_matrix
 A Toeplitz matrix class. More...
 
class  vandermonde_matrix
 A Vandermonde matrix class. More...
 
class  basic_range
 A range class that refers to an interval [start, stop), where 'start' is included, and 'stop' is excluded. More...
 
class  basic_slice
 A slice class that refers to an interval [start, stop), where 'start' is included, and 'stop' is excluded. More...
 
class  vector_range
 Class for representing non-strided subvectors of a bigger vector x. More...
 
class  vector_slice
 Class for representing strided subvectors of a bigger vector x. More...
 
class  matrix_range
 Class for representing non-strided submatrices of a bigger matrix A. More...
 
class  matrix_slice
 Class for representing strided submatrices of a bigger matrix A. More...
 
struct  is_cpu_scalar
 Helper struct for checking whether a type is a host scalar type (e.g. float, double) More...
 
struct  is_scalar
 Helper struct for checking whether a type is a viennacl::scalar<> More...
 
struct  is_flip_sign_scalar
 Helper struct for checking whether a type represents a sign flip on a viennacl::scalar<> More...
 
struct  is_any_scalar
 Helper struct for checking whether the provided type represents a scalar (either host, from ViennaCL, or a flip-sign proxy) More...
 
struct  is_any_vector
 Checks for a type being either vector_base or implicit_vector_base. More...
 
struct  is_any_dense_matrix
 Checks for either matrix_base or implicit_matrix_base. More...
 
struct  is_row_major
 Helper class for checking whether a matrix has a row-major layout. More...
 
struct  is_compressed_matrix
 Helper class for checking whether a matrix is a compressed_matrix (CSR format) More...
 
struct  is_coordinate_matrix
 Helper class for checking whether a matrix is a coordinate_matrix (COO format) More...
 
struct  is_ell_matrix
 Helper class for checking whether a matrix is an ell_matrix (ELL format) More...
 
struct  is_hyb_matrix
 Helper class for checking whether a matrix is a hyb_matrix (hybrid format: ELL plus CSR) More...
 
struct  is_any_sparse_matrix
 Helper class for checking whether the provided type is one of the sparse matrix types (compressed_matrix, coordinate_matrix, etc.) More...
 
struct  is_circulant_matrix
 Helper class for checking whether a matrix is a circulant matrix. More...
 
struct  is_hankel_matrix
 Helper class for checking whether a matrix is a Hankel matrix. More...
 
struct  is_toeplitz_matrix
 Helper class for checking whether a matrix is a Toeplitz matrix. More...
 
struct  is_vandermonde_matrix
 Helper class for checking whether a matrix is a Vandermonde matrix. More...
 
struct  is_any_dense_structured_matrix
 Helper class for checking whether the provided type is any of the dense structured matrix types (circulant, Hankel, etc.) More...
 
class  memory_exception
 Exception class in case of memory errors. More...
 
class  cuda_not_available_exception
 
struct  row_iteration
 A tag indicating iteration along increasing row index of a matrix. More...
 
struct  col_iteration
 A tag indicating iteration along increasing columns index of a matrix. More...
 
class  matrix_iterator
 uBLAS-like iterator class for iterating over the entries of a dense matrix. More...
 
struct  enable_if
 Simple enable-if variant that uses the SFINAE pattern. More...
 
struct  is_addition
 Helper metafunction for checking whether the provided type is viennacl::op_add (for addition) More...
 
struct  is_subtraction
 Helper metafunction for checking whether the provided type is viennacl::op_sub (for subtraction) More...
 
struct  is_product
 Helper metafunction for checking whether the provided type is viennacl::op_prod (for products/multiplication) More...
 
struct  is_division
 Helper metafunction for checking whether the provided type is viennacl::op_div (for division) More...
 
struct  is_primitive_type
 Helper class for checking whether a type is a primitive type. More...
 
struct  tag_none
 A tag class for identifying 'unknown' types. More...
 
struct  tag_mtl4
 A tag class for identifying types from MTL4. More...
 
struct  tag_eigen
 A tag class for identifying types from Eigen. More...
 
struct  tag_ublas
 A tag class for identifying types from uBLAS. More...
 
struct  tag_stl
 A tag class for identifying types from the C++ STL. More...
 
struct  tag_viennacl
 A tag class for identifying types from ViennaCL. More...
 
struct  is_mtl4
 Meta function which checks whether a tag is tag_mtl4. More...
 
struct  is_eigen
 Meta function which checks whether a tag is tag_eigen. More...
 
struct  is_ublas
 Meta function which checks whether a tag is tag_ublas. More...
 
struct  is_stl
 Meta function which checks whether a tag is tag_ublas. More...
 
struct  is_viennacl
 Meta function which checks whether a tag is tag_viennacl. More...
 
struct  cuthill_mckee_tag
 A tag class for selecting the Cuthill-McKee algorithm for reducing the bandwidth of a sparse matrix. More...
 
class  advanced_cuthill_mckee_tag
 Tag for the advanced Cuthill-McKee algorithm (i.e. running the 'standard' Cuthill-McKee algorithm for a couple of different seeds). More...
 
struct  gibbs_poole_stockmeyer_tag
 Tag class for identifying the Gibbs-Poole-Stockmeyer algorithm for reducing the bandwidth of a sparse matrix. More...
 
class  scalar_expression< LHS, RHS, op_inner_prod >
 Specialization of a scalar expression for inner products. Allows for a final reduction on the CPU. More...
 
class  scalar_expression< LHS, RHS, op_norm_1 >
 Specialization of a scalar expression for norm_1. Allows for a final reduction on the CPU. More...
 
class  scalar_expression< LHS, RHS, op_norm_2 >
 Specialization of a scalar expression for norm_2. Allows for a final reduction on the CPU. More...
 
class  scalar_expression< LHS, RHS, op_norm_inf >
 Specialization of a scalar expression for norm_inf. Allows for a final reduction on the CPU. More...
 
class  scalar_expression< LHS, RHS, op_norm_frobenius >
 Specialization of a scalar expression for norm_frobenius. Allows for a final reduction on the CPU. More...
 
class  const_entry_proxy
 A proxy class for a single element of a vector or matrix. This proxy should not be noticed by end-users of the library. More...
 

Typedefs

typedef std::size_t vcl_size_t
 
typedef std::ptrdiff_t vcl_ptrdiff_t
 
typedef basic_range range
 
typedef basic_slice slice
 

Enumerations

enum  memory_types { MEMORY_NOT_INITIALIZED, MAIN_MEMORY, OPENCL_MEMORY, CUDA_MEMORY }
 

Functions

template<typename T >
void switch_memory_context (T &obj, viennacl::context new_ctx)
 Generic convenience routine for migrating data of an object to a new memory domain. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (std::vector< SCALARTYPE > &cpu_vec, circulant_matrix< SCALARTYPE, ALIGNMENT > &gpu_mat)
 Copies a circulant matrix from the std::vector to the OpenCL device (either GPU or multi-core CPU) More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (circulant_matrix< SCALARTYPE, ALIGNMENT > &gpu_mat, std::vector< SCALARTYPE > &cpu_vec)
 Copies a circulant matrix from the OpenCL device (either GPU or multi-core CPU) to the std::vector. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT, typename MATRIXTYPE >
void copy (circulant_matrix< SCALARTYPE, ALIGNMENT > &circ_src, MATRIXTYPE &com_dst)
 Copies a circulant matrix from the OpenCL device (either GPU or multi-core CPU) to the matrix-like object. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT, typename MATRIXTYPE >
void copy (MATRIXTYPE &com_src, circulant_matrix< SCALARTYPE, ALIGNMENT > &circ_dst)
 Copies a the matrix-like object to the circulant matrix from the OpenCL device (either GPU or multi-core CPU) More...
 
template<class SCALARTYPE , unsigned int ALIGNMENT>
std::ostream & operator<< (std::ostream &s, circulant_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix)
 Prints the matrix. Output is compatible to boost::numeric::ublas. More...
 
template<typename CPU_MATRIX , typename SCALARTYPE >
void copy (const CPU_MATRIX &cpu_matrix, compressed_compressed_matrix< SCALARTYPE > &gpu_matrix)
 Copies a sparse matrix from the host to the OpenCL device (either GPU or multi-core CPU) More...
 
template<typename SizeType , typename SCALARTYPE >
void copy (const std::vector< std::map< SizeType, SCALARTYPE > > &cpu_matrix, compressed_compressed_matrix< SCALARTYPE > &gpu_matrix)
 Copies a sparse square matrix in the std::vector< std::map < > > format to an OpenCL device. Use viennacl::tools::sparse_matrix_adapter for non-square matrices. More...
 
template<typename CPU_MATRIX , typename SCALARTYPE >
void copy (const compressed_compressed_matrix< SCALARTYPE > &gpu_matrix, CPU_MATRIX &cpu_matrix)
 Copies a sparse matrix from the OpenCL device (either GPU or multi-core CPU) to the host. More...
 
template<typename SCALARTYPE >
void copy (const compressed_compressed_matrix< SCALARTYPE > &gpu_matrix, std::vector< std::map< unsigned int, SCALARTYPE > > &cpu_matrix)
 Copies a sparse matrix from an OpenCL device to the host. The host type is the std::vector< std::map < > > format . More...
 
template<typename CPU_MATRIX , typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (const CPU_MATRIX &cpu_matrix, compressed_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix)
 Copies a sparse matrix from the host to the OpenCL device (either GPU or multi-core CPU) More...
 
template<typename SizeType , typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (const std::vector< std::map< SizeType, SCALARTYPE > > &cpu_matrix, compressed_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix)
 Copies a sparse square matrix in the std::vector< std::map < > > format to an OpenCL device. Use viennacl::tools::sparse_matrix_adapter for non-square matrices. More...
 
template<typename CPU_MATRIX , typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (const compressed_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix, CPU_MATRIX &cpu_matrix)
 Copies a sparse matrix from the OpenCL device (either GPU or multi-core CPU) to the host. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (const compressed_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix, std::vector< std::map< unsigned int, SCALARTYPE > > &cpu_matrix)
 Copies a sparse matrix from an OpenCL device to the host. The host type is the std::vector< std::map < > > format . More...
 
template<typename CPU_MATRIX , typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (const CPU_MATRIX &cpu_matrix, coordinate_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix)
 Copies a sparse matrix from the host to the OpenCL device (either GPU or multi-core CPU) More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (const std::vector< std::map< unsigned int, SCALARTYPE > > &cpu_matrix, coordinate_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix)
 Copies a sparse matrix in the std::vector< std::map < > > format to an OpenCL device. More...
 
template<typename CPU_MATRIX , typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (const coordinate_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix, CPU_MATRIX &cpu_matrix)
 Copies a sparse matrix from the OpenCL device (either GPU or multi-core CPU) to the host. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (const coordinate_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix, std::vector< std::map< unsigned int, SCALARTYPE > > &cpu_matrix)
 Copies a sparse matrix from an OpenCL device to the host. The host type is the std::vector< std::map < > > format . More...
 
template<typename CPU_MATRIX , typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (const CPU_MATRIX &cpu_matrix, ell_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix)
 
template<typename CPU_MATRIX , typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (const ell_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix, CPU_MATRIX &cpu_matrix)
 
template<typename SCALARTYPE , unsigned int ALIGNMENT, typename CPU_ITERATOR >
void copy (CPU_ITERATOR const &cpu_begin, CPU_ITERATOR const &cpu_end, vector_iterator< SCALARTYPE, ALIGNMENT > gpu_begin)
 STL-like transfer for the entries of a GPU vector to the CPU. The cpu type does not need to lie in a linear piece of memory. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT_SRC, unsigned int ALIGNMENT_DEST>
void copy (const_vector_iterator< SCALARTYPE, ALIGNMENT_SRC > const &gpu_src_begin, const_vector_iterator< SCALARTYPE, ALIGNMENT_SRC > const &gpu_src_end, vector_iterator< SCALARTYPE, ALIGNMENT_DEST > gpu_dest_begin)
 Copy (parts of a) GPU vector to another GPU vector. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT_SRC, unsigned int ALIGNMENT_DEST>
void copy (const_vector_iterator< SCALARTYPE, ALIGNMENT_SRC > const &gpu_src_begin, const_vector_iterator< SCALARTYPE, ALIGNMENT_SRC > const &gpu_src_end, const_vector_iterator< SCALARTYPE, ALIGNMENT_DEST > gpu_dest_begin)
 
template<typename SCALARTYPE , unsigned int ALIGNMENT, typename CPU_ITERATOR >
void fast_copy (const const_vector_iterator< SCALARTYPE, ALIGNMENT > &gpu_begin, const const_vector_iterator< SCALARTYPE, ALIGNMENT > &gpu_end, CPU_ITERATOR cpu_begin)
 STL-like transfer of a GPU vector to the CPU. The cpu type is assumed to reside in a linear piece of memory, such as e.g. for std::vector. More...
 
template<typename CPU_ITERATOR , typename SCALARTYPE , unsigned int ALIGNMENT>
void fast_copy (CPU_ITERATOR const &cpu_begin, CPU_ITERATOR const &cpu_end, vector_iterator< SCALARTYPE, ALIGNMENT > gpu_begin)
 STL-like transfer of a CPU vector to the GPU. The cpu type is assumed to reside in a linear piece of memory, such as e.g. for std::vector. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (std::vector< SCALARTYPE > const &cpu_vec, hankel_matrix< SCALARTYPE, ALIGNMENT > &gpu_mat)
 Copies a Hankel matrix from the std::vector to the OpenCL device (either GPU or multi-core CPU) More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (hankel_matrix< SCALARTYPE, ALIGNMENT > const &gpu_mat, std::vector< SCALARTYPE > &cpu_vec)
 Copies a Hankel matrix from the OpenCL device (either GPU or multi-core CPU) to the std::vector. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT, typename MATRIXTYPE >
void copy (hankel_matrix< SCALARTYPE, ALIGNMENT > const &han_src, MATRIXTYPE &com_dst)
 Copies a Hankel matrix from the OpenCL device (either GPU or multi-core CPU) to the matrix-like object. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT, typename MATRIXTYPE >
void copy (MATRIXTYPE const &com_src, hankel_matrix< SCALARTYPE, ALIGNMENT > &han_dst)
 Copies a the matrix-like object to the Hankel matrix from the OpenCL device (either GPU or multi-core CPU) More...
 
template<class SCALARTYPE , unsigned int ALIGNMENT>
std::ostream & operator<< (std::ostream &s, hankel_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix)
 
template<typename CPU_MATRIX , typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (const CPU_MATRIX &cpu_matrix, hyb_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix)
 
template<typename CPU_MATRIX , typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (const hyb_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix, CPU_MATRIX &cpu_matrix)
 
template<typename NumericT , typename F >
vector< NumericT > operator+= (vector_base< NumericT > &v1, const viennacl::vector_expression< const matrix_base< NumericT, F >, const vector_base< NumericT >, viennacl::op_prod > &proxy)
 Implementation of the operation v1 += A * v2, where A is a matrix. More...
 
template<typename NumericT , typename F >
vector< NumericT > operator-= (vector_base< NumericT > &v1, const viennacl::vector_expression< const matrix_base< NumericT, F >, const vector_base< NumericT >, viennacl::op_prod > &proxy)
 Implementation of the operation v1 -= A * v2, where A is a matrix. More...
 
template<typename NumericT , typename F >
viennacl::vector< NumericT > operator+ (const vector_base< NumericT > &v1, const vector_expression< const matrix_base< NumericT, F >, const vector_base< NumericT >, op_prod > &proxy)
 Implementation of the operation 'result = v1 + A * v2', where A is a matrix. More...
 
template<typename NumericT , typename F >
viennacl::vector< NumericT > operator- (const vector_base< NumericT > &v1, const vector_expression< const matrix_base< NumericT, F >, const vector_base< NumericT >, op_prod > &proxy)
 Implementation of the operation 'result = v1 - A * v2', where A is a matrix. More...
 
template<typename NumericT , typename F >
vector< NumericT > operator+= (vector_base< NumericT > &v1, const vector_expression< const matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_trans >, const vector_base< NumericT >, op_prod > &proxy)
 Implementation of the operation v1 += A * v2, where A is a matrix. More...
 
template<typename NumericT , typename F >
vector< NumericT > operator-= (vector_base< NumericT > &v1, const vector_expression< const matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_trans >, const vector_base< NumericT >, op_prod > &proxy)
 Implementation of the operation v1 -= A * v2, where A is a matrix. More...
 
template<typename NumericT , typename F >
vector< NumericT > operator+ (const vector_base< NumericT > &v1, const vector_expression< const matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_trans >, const vector_base< NumericT >, op_prod > &proxy)
 Implementation of the operation 'result = v1 + A * v2', where A is a matrix. More...
 
template<typename NumericT , typename F >
vector< NumericT > operator- (const vector_base< NumericT > &v1, const vector_expression< const matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_trans >, const vector_base< NumericT >, op_prod > &proxy)
 Implementation of the operation 'result = v1 - A * v2', where A is a matrix. More...
 
template<typename M1 >
viennacl::enable_if
< viennacl::is_any_sparse_matrix
< M1 >::value,
matrix_expression< const M1,
const M1, op_trans > >::type 
trans (const M1 &mat)
 Returns an expression template class representing a transposed matrix. More...
 
template<typename SCALARTYPE , typename SparseMatrixType >
viennacl::enable_if
< viennacl::is_any_sparse_matrix
< SparseMatrixType >::value,
viennacl::vector< SCALARTYPE >
>::type 
operator+ (viennacl::vector_base< SCALARTYPE > &result, const viennacl::vector_expression< const SparseMatrixType, const viennacl::vector_base< SCALARTYPE >, viennacl::op_prod > &proxy)
 Implementation of the operation 'result = v1 + A * v2', where A is a matrix. More...
 
template<typename SCALARTYPE , typename SparseMatrixType >
viennacl::enable_if
< viennacl::is_any_sparse_matrix
< SparseMatrixType >::value,
viennacl::vector< SCALARTYPE >
>::type 
operator- (viennacl::vector_base< SCALARTYPE > &result, const viennacl::vector_expression< const SparseMatrixType, const viennacl::vector_base< SCALARTYPE >, viennacl::op_prod > &proxy)
 Implementation of the operation 'result = v1 - A * v2', where A is a matrix. More...
 
template<class SCALARTYPE , typename F >
std::ostream & operator<< (std::ostream &s, const matrix_base< SCALARTYPE, F > &gpu_matrix)
 Prints the matrix. Output is compatible to boost::numeric::ublas. More...
 
template<typename LHS , typename RHS , typename OP >
std::ostream & operator<< (std::ostream &s, const matrix_expression< LHS, RHS, OP > &expr)
 Prints the matrix. Output is compatible to boost::numeric::ublas. More...
 
template<typename NumericT , typename F >
matrix_expression< const
matrix_base< NumericT, F >
, const matrix_base< NumericT,
F >, op_trans
trans (const matrix_base< NumericT, F > &mat)
 Returns an expression template class representing a transposed matrix. More...
 
template<typename NumericT , typename F >
vector_expression< const
matrix_base< NumericT, F >
, const int, op_matrix_diag
diag (const matrix_base< NumericT, F > &A, int k=0)
 
template<typename NumericT >
matrix_expression< const
vector_base< NumericT >, const
int, op_vector_diag
diag (const vector_base< NumericT > &v, int k=0)
 
template<typename NumericT , typename F >
vector_expression< const
matrix_base< NumericT, F >
, const unsigned int, op_row
row (const matrix_base< NumericT, F > &A, unsigned int i)
 
template<typename NumericT , typename F >
vector_expression< const
matrix_base< NumericT, F >
, const unsigned int,
op_column
column (const matrix_base< NumericT, F > &A, unsigned int j)
 
template<typename CPU_MATRIX , typename SCALARTYPE , typename F , unsigned int ALIGNMENT>
void copy (const CPU_MATRIX &cpu_matrix, matrix< SCALARTYPE, F, ALIGNMENT > &gpu_matrix)
 Copies a dense matrix from the host (CPU) to the OpenCL device (GPU or multi-core CPU) More...
 
template<typename SCALARTYPE , typename A1 , typename A2 , typename F , unsigned int ALIGNMENT>
void copy (const std::vector< std::vector< SCALARTYPE, A1 >, A2 > &cpu_matrix, matrix< SCALARTYPE, F, ALIGNMENT > &gpu_matrix)
 Copies a dense STL-type matrix from the host (CPU) to the OpenCL device (GPU or multi-core CPU) More...
 
template<typename SCALARTYPE , typename F , unsigned int ALIGNMENT>
void fast_copy (SCALARTYPE *cpu_matrix_begin, SCALARTYPE *cpu_matrix_end, matrix< SCALARTYPE, F, ALIGNMENT > &gpu_matrix)
 Copies a dense matrix from the host (CPU) to the OpenCL device (GPU or multi-core CPU) without temporary. Matrix-Layout on CPU must be equal to the matrix-layout on the GPU. More...
 
template<typename CPU_MATRIX , typename SCALARTYPE , typename F , unsigned int ALIGNMENT>
void copy (const matrix< SCALARTYPE, F, ALIGNMENT > &gpu_matrix, CPU_MATRIX &cpu_matrix)
 Copies a dense matrix from the OpenCL device (GPU or multi-core CPU) to the host (CPU). More...
 
template<typename SCALARTYPE , typename A1 , typename A2 , typename F , unsigned int ALIGNMENT>
void copy (const matrix< SCALARTYPE, F, ALIGNMENT > &gpu_matrix, std::vector< std::vector< SCALARTYPE, A1 >, A2 > &cpu_matrix)
 Copies a dense matrix from the OpenCL device (GPU or multi-core CPU) to the host (CPU). More...
 
template<typename SCALARTYPE , typename F , unsigned int ALIGNMENT>
void fast_copy (const matrix< SCALARTYPE, F, ALIGNMENT > &gpu_matrix, SCALARTYPE *cpu_matrix_begin)
 Copies a dense matrix from the OpenCL device (GPU or multi-core CPU) to the host (CPU). More...
 
template<typename LHS1 , typename RHS1 , typename OP1 , typename LHS2 , typename RHS2 , typename OP2 >
matrix_expression< const
matrix_expression< const LHS1,
const RHS1, OP1 >, const
matrix_expression< const LHS2,
const RHS2, OP2 >, op_add
operator+ (matrix_expression< const LHS1, const RHS1, OP1 > const &proxy1, matrix_expression< const LHS2, const RHS2, OP2 > const &proxy2)
 Generic 'catch-all' overload, which enforces a temporary if the expression tree gets too deep. More...
 
template<typename LHS1 , typename RHS1 , typename OP1 , typename NumericT , typename F >
matrix_expression< const
matrix_expression< const LHS1,
const RHS1, OP1 >, const
matrix_base< NumericT, F >
, op_add
operator+ (matrix_expression< const LHS1, const RHS1, OP1 > const &proxy1, matrix_base< NumericT, F > const &proxy2)
 
template<typename NumericT , typename F , typename LHS2 , typename RHS2 , typename OP2 >
matrix_expression< const
matrix_base< NumericT, F >
, const matrix_expression
< const LHS2, const RHS2, OP2 >
, op_add
operator+ (matrix_base< NumericT, F > const &proxy1, matrix_expression< const LHS2, const RHS2, OP2 > const &proxy2)
 
template<typename NumericT , typename F >
matrix_expression< const
matrix_base< NumericT, F >
, const matrix_base< NumericT,
F >, op_add
operator+ (const matrix_base< NumericT, F > &m1, const matrix_base< NumericT, F > &m2)
 Operator overload for m1 + m2, where m1 and m2 are either dense matrices, matrix ranges, or matrix slices. No mixing of different storage layouts allowed at the moment. More...
 
template<typename LHS1 , typename RHS1 , typename OP1 , typename LHS2 , typename RHS2 , typename OP2 >
matrix_expression< const
matrix_expression< const LHS1,
const RHS1, OP1 >, const
matrix_expression< const LHS2,
const RHS2, OP2 >, op_sub
operator- (matrix_expression< const LHS1, const RHS1, OP1 > const &proxy1, matrix_expression< const LHS2, const RHS2, OP2 > const &proxy2)
 
template<typename LHS1 , typename RHS1 , typename OP1 , typename NumericT , typename F >
matrix_expression< const
matrix_expression< const LHS1,
const RHS1, OP1 >, const
matrix_base< NumericT, F >
, op_sub
operator- (matrix_expression< const LHS1, const RHS1, OP1 > const &proxy1, matrix_base< NumericT, F > const &proxy2)
 
template<typename NumericT , typename F , typename LHS2 , typename RHS2 , typename OP2 >
matrix_expression< const
matrix_base< NumericT, F >
, const matrix_expression
< const LHS2, const RHS2, OP2 >
, op_sub
operator- (matrix_base< NumericT, F > const &proxy1, matrix_expression< const LHS2, const RHS2, OP2 > const &proxy2)
 
template<typename NumericT , typename F >
matrix_expression< const
matrix_base< NumericT, F >
, const matrix_base< NumericT,
F >, op_sub
operator- (const matrix_base< NumericT, F > &m1, const matrix_base< NumericT, F > &m2)
 Operator overload for m1 - m2, where m1 and m2 are either dense matrices, matrix ranges, or matrix slices. No mixing of different storage layouts allowed at the moment. More...
 
template<typename S1 , typename NumericT , typename F >
viennacl::enable_if
< viennacl::is_any_scalar< S1 >
::value, matrix_expression
< const matrix_base< NumericT,
F >, const S1, op_mult >
>::type 
operator* (S1 const &value, matrix_base< NumericT, F > const &m1)
 Operator overload for the expression alpha * m1, where alpha is a host scalar (float or double) and m1 is a ViennaCL matrix. More...
 
template<typename LHS , typename RHS , typename OP , typename S1 >
viennacl::enable_if
< viennacl::is_any_scalar< S1 >
::value, matrix_expression
< const matrix_expression< LHS,
RHS, OP >, const S1, op_mult >
>::type 
operator* (matrix_expression< LHS, RHS, OP > const &proxy, S1 const &val)
 Operator overload for the multiplication of a matrix expression with a scalar from the right, e.g. (beta * m1) * alpha. Here, beta * m1 is wrapped into a matrix_expression and then multiplied with alpha from the right. More...
 
template<typename S1 , typename LHS , typename RHS , typename OP >
viennacl::enable_if
< viennacl::is_any_scalar< S1 >
::value, matrix_expression
< const matrix_expression< LHS,
RHS, OP >, const S1, op_mult >
>::type 
operator* (S1 const &val, matrix_expression< LHS, RHS, OP > const &proxy)
 Operator overload for the multiplication of a matrix expression with a ViennaCL scalar from the left, e.g. alpha * (beta * m1). Here, beta * m1 is wrapped into a matrix_expression and then multiplied with alpha from the left. More...
 
template<typename NumericT , typename F , typename S1 >
viennacl::enable_if
< viennacl::is_any_scalar< S1 >
::value, matrix_expression
< const matrix_base< NumericT,
F >, const S1, op_mult >
>::type 
operator* (matrix_base< NumericT, F > const &m1, S1 const &s1)
 Scales the matrix by a GPU scalar 'alpha' and returns an expression template. More...
 
template<typename NumericT , typename F , typename S1 >
viennacl::enable_if
< viennacl::is_scalar< S1 >
::value, matrix_base< NumericT,
F > & >::type 
operator*= (matrix_base< NumericT, F > &m1, S1 const &gpu_val)
 Scales a matrix by a GPU scalar value. More...
 
template<typename LHS , typename RHS , typename OP , typename S1 >
viennacl::enable_if
< viennacl::is_any_scalar< S1 >
::value, matrix_expression
< const matrix_expression
< const LHS, const RHS, OP >
, const S1, op_div > >::type 
operator/ (matrix_expression< const LHS, const RHS, OP > const &proxy, S1 const &val)
 Operator overload for the division of a matrix expression by a scalar from the right, e.g. (beta * m1) / alpha. Here, beta * m1 is wrapped into a matrix_expression and then divided by alpha. More...
 
template<typename NumericT , typename F , typename S1 >
viennacl::enable_if
< viennacl::is_any_scalar< S1 >
::value, matrix_expression
< const matrix_base< NumericT,
F >, const S1, op_div >
>::type 
operator/ (matrix_base< NumericT, F > const &m1, S1 const &s1)
 Returns an expression template for scaling the matrix by a GPU scalar 'alpha'. More...
 
template<typename NumericT , typename F , typename S1 >
viennacl::enable_if
< viennacl::is_scalar< S1 >
::value, matrix_base< NumericT,
F > & >::type 
operator/= (matrix_base< NumericT, F > &m1, S1 const &gpu_val)
 Scales a matrix by a GPU scalar value. More...
 
template<typename NumericT , typename S1 >
viennacl::enable_if
< viennacl::is_scalar< S1 >
::value,
viennacl::matrix_expression
< const
viennacl::matrix_expression
< const vector_base< NumericT >
, const vector_base< NumericT >
, op_prod >, const S1, op_mult >
>::type 
operator* (const viennacl::matrix_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_prod > &proxy, const S1 &val)
 
template<typename NumericT , typename S1 >
viennacl::enable_if
< viennacl::is_cpu_scalar< S1 >
::value,
viennacl::matrix_expression
< const
viennacl::matrix_expression
< const vector_base< NumericT >
, const vector_base< NumericT >
, op_prod >, const NumericT,
op_mult > >::type 
operator* (const viennacl::matrix_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_prod > &proxy, const S1 &val)
 
template<typename NumericT , typename S1 >
viennacl::enable_if
< viennacl::is_scalar< S1 >
::value,
viennacl::matrix_expression
< const
viennacl::matrix_expression
< const vector_base< NumericT >
, const vector_base< NumericT >
, op_prod >, const S1, op_mult >
>::type 
operator* (const S1 &val, const viennacl::matrix_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_prod > &proxy)
 
template<typename NumericT , typename S1 >
viennacl::enable_if
< viennacl::is_cpu_scalar< S1 >
::value,
viennacl::matrix_expression
< const
viennacl::matrix_expression
< const vector_base< NumericT >
, const vector_base< NumericT >
, op_prod >, const NumericT,
op_mult > >::type 
operator* (const S1 &val, const viennacl::matrix_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_prod > &proxy)
 
template<typename CPU_MATRIX , typename SCALARTYPE >
void copy (const CPU_MATRIX &cpu_matrix, matrix_range< matrix< SCALARTYPE, row_major, 1 > > &gpu_matrix_range)
 
template<typename CPU_MATRIX , typename SCALARTYPE >
void copy (const CPU_MATRIX &cpu_matrix, matrix_range< matrix< SCALARTYPE, column_major, 1 > > &gpu_matrix_range)
 
template<typename CPU_MATRIX , typename SCALARTYPE >
void copy (matrix_range< matrix< SCALARTYPE, row_major, 1 > > const &gpu_matrix_range, CPU_MATRIX &cpu_matrix)
 
template<typename CPU_MATRIX , typename SCALARTYPE >
void copy (matrix_range< matrix< SCALARTYPE, column_major, 1 > > const &gpu_matrix_range, CPU_MATRIX &cpu_matrix)
 
template<typename MatrixType >
matrix_range< MatrixType > project (MatrixType &A, viennacl::range const &r1, viennacl::range const &r2)
 
template<typename MatrixType >
matrix_range< MatrixType > project (matrix_range< MatrixType > &A, viennacl::range const &r1, viennacl::range const &r2)
 
template<typename CPU_MATRIX , typename SCALARTYPE >
void copy (const CPU_MATRIX &cpu_matrix, matrix_slice< matrix< SCALARTYPE, row_major, 1 > > &gpu_matrix_slice)
 
template<typename CPU_MATRIX , typename SCALARTYPE >
void copy (const CPU_MATRIX &cpu_matrix, matrix_slice< matrix< SCALARTYPE, column_major, 1 > > &gpu_matrix_slice)
 
template<typename CPU_MATRIX , typename SCALARTYPE >
void copy (matrix_slice< matrix< SCALARTYPE, row_major, 1 > > const &gpu_matrix_slice, CPU_MATRIX &cpu_matrix)
 
template<typename CPU_MATRIX , typename SCALARTYPE >
void copy (matrix_slice< matrix< SCALARTYPE, column_major, 1 > > const &gpu_matrix_slice, CPU_MATRIX &cpu_matrix)
 
template<typename MatrixType >
matrix_slice< MatrixType > project (MatrixType &A, viennacl::slice const &r1, viennacl::slice const &r2)
 
template<typename MatrixType >
matrix_slice< MatrixType > project (matrix_range< MatrixType > &A, viennacl::slice const &r1, viennacl::slice const &r2)
 
template<typename MatrixType >
matrix_slice< MatrixType > project (matrix_slice< MatrixType > &A, viennacl::slice const &r1, viennacl::slice const &r2)
 
template<typename IndexT , typename ValueT >
std::vector< IndexT > reorder (std::vector< std::map< IndexT, ValueT > > const &matrix, cuthill_mckee_tag)
 Function for the calculation of a node number permutation to reduce the bandwidth of an incidence matrix by the Cuthill-McKee algorithm. More...
 
template<typename IndexT , typename ValueT >
std::vector< IndexT > reorder (std::vector< std::map< IndexT, ValueT > > const &matrix, advanced_cuthill_mckee_tag const &tag)
 Function for the calculation of a node number permutation to reduce the bandwidth of an incidence matrix by the advanced Cuthill-McKee algorithm. More...
 
template<typename MatrixType >
std::vector< int > reorder (MatrixType const &matrix, gibbs_poole_stockmeyer_tag)
 Function for the calculation of a node numbering permutation vector to reduce the bandwidth of a incidence matrix by the Gibbs-Poole-Stockmeyer algorithm. More...
 
template<class SCALARTYPE >
std::ostream & operator<< (std::ostream &s, const scalar< SCALARTYPE > &val)
 Allows to directly print the value of a scalar to an output stream. More...
 
template<class SCALARTYPE >
std::istream & operator>> (std::istream &s, const scalar< SCALARTYPE > &val)
 Allows to directly read a value of a scalar from an input stream. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (std::vector< SCALARTYPE > const &cpu_vec, toeplitz_matrix< SCALARTYPE, ALIGNMENT > &gpu_mat)
 Copies a Toeplitz matrix from the std::vector to the OpenCL device (either GPU or multi-core CPU) More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (toeplitz_matrix< SCALARTYPE, ALIGNMENT > const &gpu_mat, std::vector< SCALARTYPE > &cpu_vec)
 Copies a Toeplitz matrix from the OpenCL device (either GPU or multi-core CPU) to the std::vector. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT, typename MATRIXTYPE >
void copy (toeplitz_matrix< SCALARTYPE, ALIGNMENT > const &tep_src, MATRIXTYPE &com_dst)
 Copies a Toeplitz matrix from the OpenCL device (either GPU or multi-core CPU) to the matrix-like object. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT, typename MATRIXTYPE >
void copy (MATRIXTYPE const &com_src, toeplitz_matrix< SCALARTYPE, ALIGNMENT > &tep_dst)
 Copies a the matrix-like object to the Toeplitz matrix from the OpenCL device (either GPU or multi-core CPU) More...
 
template<class SCALARTYPE , unsigned int ALIGNMENT>
std::ostream & operator<< (std::ostream &s, toeplitz_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix)
 Prints the matrix. Output is compatible to boost::numeric::ublas. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (std::vector< SCALARTYPE > &cpu_vec, vandermonde_matrix< SCALARTYPE, ALIGNMENT > &gpu_mat)
 Copies a Vandermonde matrix from the std::vector to the OpenCL device (either GPU or multi-core CPU) More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT>
void copy (vandermonde_matrix< SCALARTYPE, ALIGNMENT > &gpu_mat, std::vector< SCALARTYPE > &cpu_vec)
 Copies a Vandermonde matrix from the OpenCL device (either GPU or multi-core CPU) to the std::vector. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT, typename MATRIXTYPE >
void copy (vandermonde_matrix< SCALARTYPE, ALIGNMENT > &vander_src, MATRIXTYPE &com_dst)
 Copies a Vandermonde matrix from the OpenCL device (either GPU or multi-core CPU) to the matrix-like object. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT, typename MATRIXTYPE >
void copy (MATRIXTYPE &com_src, vandermonde_matrix< SCALARTYPE, ALIGNMENT > &vander_dst)
 Copies a the matrix-like object to the Vandermonde matrix from the OpenCL device (either GPU or multi-core CPU) More...
 
template<class SCALARTYPE , unsigned int ALIGNMENT>
std::ostream & operator<< (std::ostream &s, vandermonde_matrix< SCALARTYPE, ALIGNMENT > &gpu_matrix)
 Prints the matrix. Output is compatible to boost::numeric::ublas. More...
 
template<typename ScalarT >
vector_tuple< ScalarT > tie (vector_base< ScalarT > const &v0, vector_base< ScalarT > const &v1)
 
template<typename ScalarT >
vector_tuple< ScalarT > tie (vector_base< ScalarT > &v0, vector_base< ScalarT > &v1)
 
template<typename ScalarT >
vector_tuple< ScalarT > tie (vector_base< ScalarT > const &v0, vector_base< ScalarT > const &v1, vector_base< ScalarT > const &v2)
 
template<typename ScalarT >
vector_tuple< ScalarT > tie (vector_base< ScalarT > &v0, vector_base< ScalarT > &v1, vector_base< ScalarT > &v2)
 
template<typename ScalarT >
vector_tuple< ScalarT > tie (vector_base< ScalarT > const &v0, vector_base< ScalarT > const &v1, vector_base< ScalarT > const &v2, vector_base< ScalarT > const &v3)
 
template<typename ScalarT >
vector_tuple< ScalarT > tie (vector_base< ScalarT > &v0, vector_base< ScalarT > &v1, vector_base< ScalarT > &v2, vector_base< ScalarT > &v3)
 
template<typename ScalarT >
vector_tuple< ScalarT > tie (vector_base< ScalarT > const &v0, vector_base< ScalarT > const &v1, vector_base< ScalarT > const &v2, vector_base< ScalarT > const &v3, vector_base< ScalarT > const &v4)
 
template<typename ScalarT >
vector_tuple< ScalarT > tie (vector_base< ScalarT > &v0, vector_base< ScalarT > &v1, vector_base< ScalarT > &v2, vector_base< ScalarT > &v3, vector_base< ScalarT > &v4)
 
template<typename NumericT , typename CPUVECTOR >
void fast_copy (vector_base< NumericT > const &gpu_vec, CPUVECTOR &cpu_vec)
 Transfer from a gpu vector to a cpu vector. Convenience wrapper for viennacl::linalg::fast_copy(gpu_vec.begin(), gpu_vec.end(), cpu_vec.begin());. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT, typename CPU_ITERATOR >
void async_copy (const const_vector_iterator< SCALARTYPE, ALIGNMENT > &gpu_begin, const const_vector_iterator< SCALARTYPE, ALIGNMENT > &gpu_end, CPU_ITERATOR cpu_begin)
 Asynchronous version of fast_copy(), copying data from device to host. The host iterator cpu_begin needs to reside in a linear piece of memory, such as e.g. for std::vector. More...
 
template<typename NumericT , typename CPUVECTOR >
void async_copy (vector_base< NumericT > const &gpu_vec, CPUVECTOR &cpu_vec)
 Transfer from a gpu vector to a cpu vector. Convenience wrapper for viennacl::linalg::fast_copy(gpu_vec.begin(), gpu_vec.end(), cpu_vec.begin());. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT, typename CPU_ITERATOR >
void copy (const const_vector_iterator< SCALARTYPE, ALIGNMENT > &gpu_begin, const const_vector_iterator< SCALARTYPE, ALIGNMENT > &gpu_end, CPU_ITERATOR cpu_begin)
 STL-like transfer for the entries of a GPU vector to the CPU. The cpu type does not need to lie in a linear piece of memory. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT, typename CPU_ITERATOR >
void copy (const vector_iterator< SCALARTYPE, ALIGNMENT > &gpu_begin, const vector_iterator< SCALARTYPE, ALIGNMENT > &gpu_end, CPU_ITERATOR cpu_begin)
 STL-like transfer for the entries of a GPU vector to the CPU. The cpu type does not need to lie in a linear piece of memory. More...
 
template<typename NumericT , typename CPUVECTOR >
void copy (vector_base< NumericT > const &gpu_vec, CPUVECTOR &cpu_vec)
 Transfer from a gpu vector to a cpu vector. Convenience wrapper for viennacl::linalg::copy(gpu_vec.begin(), gpu_vec.end(), cpu_vec.begin());. More...
 
template<typename CPUVECTOR , typename NumericT >
void fast_copy (const CPUVECTOR &cpu_vec, vector_base< NumericT > &gpu_vec)
 Transfer from a cpu vector to a gpu vector. Convenience wrapper for viennacl::linalg::fast_copy(cpu_vec.begin(), cpu_vec.end(), gpu_vec.begin());. More...
 
template<typename CPU_ITERATOR , typename SCALARTYPE , unsigned int ALIGNMENT>
void async_copy (CPU_ITERATOR const &cpu_begin, CPU_ITERATOR const &cpu_end, vector_iterator< SCALARTYPE, ALIGNMENT > gpu_begin)
 Asynchronous version of fast_copy(), copying data from host to device. The host iterator cpu_begin needs to reside in a linear piece of memory, such as e.g. for std::vector. More...
 
template<typename CPUVECTOR , typename NumericT >
void async_copy (const CPUVECTOR &cpu_vec, vector_base< NumericT > &gpu_vec)
 Transfer from a cpu vector to a gpu vector. Convenience wrapper for viennacl::linalg::fast_copy(cpu_vec.begin(), cpu_vec.end(), gpu_vec.begin());. More...
 
template<typename CPUVECTOR , typename T >
void copy (const CPUVECTOR &cpu_vec, vector_base< T > &gpu_vec)
 Transfer from a cpu vector to a gpu vector. Convenience wrapper for viennacl::linalg::copy(cpu_vec.begin(), cpu_vec.end(), gpu_vec.begin());. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT_SRC, unsigned int ALIGNMENT_DEST>
void copy (vector_iterator< SCALARTYPE, ALIGNMENT_SRC > const &gpu_src_begin, vector_iterator< SCALARTYPE, ALIGNMENT_SRC > const &gpu_src_end, vector_iterator< SCALARTYPE, ALIGNMENT_DEST > gpu_dest_begin)
 Copy (parts of a) GPU vector to another GPU vector. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT_SRC, unsigned int ALIGNMENT_DEST>
void copy (vector< SCALARTYPE, ALIGNMENT_SRC > const &gpu_src_vec, vector< SCALARTYPE, ALIGNMENT_DEST > &gpu_dest_vec)
 Transfer from a ViennaCL vector to another ViennaCL vector. Convenience wrapper for viennacl::linalg::copy(gpu_src_vec.begin(), gpu_src_vec.end(), gpu_dest_vec.begin());. More...
 
template<typename T >
std::ostream & operator<< (std::ostream &os, vector_base< T > const &val)
 Output stream. Output format is ublas compatible. More...
 
template<typename LHS , typename RHS , typename OP >
std::ostream & operator<< (std::ostream &os, vector_expression< LHS, RHS, OP > const &proxy)
 
template<typename T >
void swap (vector_base< T > &vec1, vector_base< T > &vec2)
 Swaps the contents of two vectors, data is copied. More...
 
template<typename SCALARTYPE , unsigned int ALIGNMENT>
vector< SCALARTYPE, ALIGNMENT > & fast_swap (vector< SCALARTYPE, ALIGNMENT > &v1, vector< SCALARTYPE, ALIGNMENT > &v2)
 Swaps the content of two vectors by swapping OpenCL handles only, NO data is copied. More...
 
template<typename T , typename S1 >
viennacl::enable_if
< viennacl::is_any_scalar< S1 >
::value, vector_base< T >
& >::type 
operator*= (vector_base< T > &v1, S1 const &gpu_val)
 Scales this vector by a GPU scalar value. More...
 
template<typename T , typename S1 >
viennacl::enable_if
< viennacl::is_any_scalar< S1 >
::value, vector_base< T >
& >::type 
operator/= (vector_base< T > &v1, S1 const &gpu_val)
 Scales this vector by a GPU scalar value. More...
 
template<typename LHS1 , typename RHS1 , typename OP1 , typename LHS2 , typename RHS2 , typename OP2 >
vector_expression< const
vector_expression< LHS1, RHS1,
OP1 >, const vector_expression
< LHS2, RHS2, OP2 >
, viennacl::op_add
operator+ (vector_expression< LHS1, RHS1, OP1 > const &proxy1, vector_expression< LHS2, RHS2, OP2 > const &proxy2)
 Operator overload for the addition of two vector expressions. More...
 
template<typename LHS , typename RHS , typename OP , typename T >
vector_expression< const
vector_expression< LHS, RHS,
OP >, const vector_base< T >
, viennacl::op_add
operator+ (vector_expression< LHS, RHS, OP > const &proxy, vector_base< T > const &vec)
 Operator overload for the addition of a vector expression with a vector or another vector expression. This is the default implementation for all cases that are too complex in order to be covered within a single kernel, hence a temporary vector is created. More...
 
template<typename T , typename LHS , typename RHS , typename OP >
vector_expression< const
vector_base< T >, const
vector_expression< LHS, RHS,
OP >, viennacl::op_add
operator+ (vector_base< T > const &vec, vector_expression< LHS, RHS, OP > const &proxy)
 Operator overload for the addition of a vector with a vector expression. This is the default implementation for all cases that are too complex in order to be covered within a single kernel, hence a temporary vector is created. More...
 
template<typename T >
vector_expression< const
vector_base< T >, const
vector_base< T >, op_add
operator+ (const vector_base< T > &v1, const vector_base< T > &v2)
 Returns an expression template object for adding up two vectors, i.e. v1 + v2. More...
 
template<typename LHS1 , typename RHS1 , typename OP1 , typename LHS2 , typename RHS2 , typename OP2 >
vector_expression< const
vector_expression< LHS1, RHS1,
OP1 >, const vector_expression
< LHS2, RHS2, OP2 >
, viennacl::op_sub
operator- (vector_expression< LHS1, RHS1, OP1 > const &proxy1, vector_expression< LHS2, RHS2, OP2 > const &proxy2)
 Operator overload for the subtraction of two vector expressions. More...
 
template<typename LHS , typename RHS , typename OP , typename T >
vector_expression< const
vector_expression< LHS, RHS,
OP >, const vector_base< T >
, viennacl::op_sub
operator- (vector_expression< LHS, RHS, OP > const &proxy, vector_base< T > const &vec)
 Operator overload for the subtraction of a vector expression with a vector or another vector expression. This is the default implementation for all cases that are too complex in order to be covered within a single kernel, hence a temporary vector is created. More...
 
template<typename T , typename LHS , typename RHS , typename OP >
vector_expression< const
vector_base< T >, const
vector_expression< LHS, RHS,
OP >, viennacl::op_sub
operator- (vector_base< T > const &vec, vector_expression< LHS, RHS, OP > const &proxy)
 Operator overload for the subtraction of a vector expression with a vector or another vector expression. This is the default implementation for all cases that are too complex in order to be covered within a single kernel, hence a temporary vector is created. More...
 
template<typename T >
vector_expression< const
vector_base< T >, const
vector_base< T >, op_sub
operator- (const vector_base< T > &v1, const vector_base< T > &v2)
 Returns an expression template object for subtracting two vectors, i.e. v1 - v2. More...
 
template<typename S1 , typename T >
viennacl::enable_if
< viennacl::is_any_scalar< S1 >
::value, vector_expression
< const vector_base< T >
, const S1, op_mult > >::type 
operator* (S1 const &value, vector_base< T > const &vec)
 Operator overload for the expression alpha * v1, where alpha is a host scalar (float or double) and v1 is a ViennaCL vector. More...
 
template<typename T >
vector_expression< const
vector_base< T >, const T,
op_mult
operator* (char value, vector_base< T > const &vec)
 Operator overload for the expression alpha * v1, where alpha is a char. More...
 
template<typename T >
vector_expression< const
vector_base< T >, const T,
op_mult
operator* (short value, vector_base< T > const &vec)
 Operator overload for the expression alpha * v1, where alpha is a short. More...
 
template<typename T >
vector_expression< const
vector_base< T >, const T,
op_mult
operator* (int value, vector_base< T > const &vec)
 Operator overload for the expression alpha * v1, where alpha is a int. More...
 
template<typename T >
vector_expression< const
vector_base< T >, const T,
op_mult
operator* (long value, vector_base< T > const &vec)
 Operator overload for the expression alpha * v1, where alpha is a long. More...
 
template<typename LHS , typename RHS , typename OP , typename T >
vector_expression< const
vector_base< T >, const
scalar_expression< LHS, RHS,
OP >, op_mult
operator* (scalar_expression< LHS, RHS, OP > const &expr, vector_base< T > const &vec)
 Operator overload for the expression alpha * v1, where alpha is a scalar expression and v1 is a ViennaCL vector. More...
 
template<typename T , typename S1 >
viennacl::enable_if
< viennacl::is_any_scalar< S1 >
::value, vector_expression
< const vector_base< T >
, const S1, op_mult > >::type 
operator* (vector_base< T > const &vec, S1 const &value)
 Scales the vector by a scalar 'alpha' and returns an expression template. More...
 
template<typename T >
vector_expression< const
vector_base< T >, const T,
op_mult
operator* (vector_base< T > const &vec, T const &value)
 
template<typename LHS , typename RHS , typename OP , typename S1 >
viennacl::enable_if
< viennacl::is_any_scalar< S1 >
::value,
viennacl::vector_expression
< const vector_expression< LHS,
RHS, OP >, const S1, op_mult >
>::type 
operator* (vector_expression< LHS, RHS, OP > const &proxy, S1 const &val)
 Operator overload for the multiplication of a vector expression with a scalar from the right, e.g. (beta * vec1) * alpha. Here, beta * vec1 is wrapped into a vector_expression and then multiplied with alpha from the right. More...
 
template<typename S1 , typename LHS , typename RHS , typename OP >
viennacl::enable_if
< viennacl::is_any_scalar< S1 >
::value,
viennacl::vector_expression
< const vector_expression< LHS,
RHS, OP >, const S1, op_mult >
>::type 
operator* (S1 const &val, vector_expression< LHS, RHS, OP > const &proxy)
 Operator overload for the multiplication of a vector expression with a ViennaCL scalar from the left, e.g. alpha * (beta * vec1). Here, beta * vec1 is wrapped into a vector_expression and then multiplied with alpha from the left. More...
 
template<typename S1 , typename LHS , typename RHS , typename OP >
viennacl::enable_if
< viennacl::is_any_scalar< S1 >
::value,
viennacl::vector_expression
< const vector_expression< LHS,
RHS, OP >, const S1, op_div >
>::type 
operator/ (vector_expression< LHS, RHS, OP > const &proxy, S1 const &val)
 Operator overload for the division of a vector expression by a scalar from the right, e.g. (beta * vec1) / alpha. Here, beta * vec1 is wrapped into a vector_expression and then divided by alpha. More...
 
template<typename T , typename S1 >
viennacl::enable_if
< viennacl::is_any_scalar< S1 >
::value, vector_expression
< const vector_base< T >
, const S1, op_div > >::type 
operator/ (vector_base< T > const &v1, S1 const &s1)
 Returns an expression template for scaling the vector by a GPU scalar 'alpha'. More...
 
template<typename VectorType , typename SCALARTYPE >
void copy (const VectorType &cpu_vector, vector_range< vector< SCALARTYPE > > &gpu_vector_range)
 
template<typename CPUVECTOR , typename VectorType >
void fast_copy (const CPUVECTOR &cpu_vec, vector_range< VectorType > &gpu_vec)
 Transfer from a cpu vector to a gpu vector. Convenience wrapper for viennacl::linalg::fast_copy(cpu_vec.begin(), cpu_vec.end(), gpu_vec.begin());. More...
 
template<typename SCALARTYPE , typename VectorType >
void copy (vector_range< vector< SCALARTYPE > > const &gpu_vector_range, VectorType &cpu_vector)
 
template<typename VectorType , typename CPUVECTOR >
void fast_copy (vector_range< VectorType > const &gpu_vec, CPUVECTOR &cpu_vec)
 Transfer from a GPU vector range to a CPU vector. Convenience wrapper for viennacl::linalg::fast_copy(gpu_vec.begin(), gpu_vec.end(), cpu_vec.begin());. More...
 
template<typename VectorType >
vector_range< VectorType > project (VectorType &vec, viennacl::range const &r1)
 
template<typename VectorType >
vector_range< VectorType > project (viennacl::vector_range< VectorType > &vec, viennacl::range const &r1)
 
template<typename VectorType , typename SCALARTYPE >
void copy (const VectorType &cpu_vector, vector_slice< vector< SCALARTYPE > > &gpu_vector_slice)
 
template<typename VectorType , typename SCALARTYPE >
void copy (vector_slice< vector< SCALARTYPE > > const &gpu_vector_slice, VectorType &cpu_vector)
 
template<typename VectorType >
vector_slice< VectorType > project (VectorType &vec, viennacl::slice const &s1)
 
template<typename VectorType >
vector_slice< VectorType > project (viennacl::vector_slice< VectorType > &vec, viennacl::slice const &s1)
 
template<typename VectorType >
vector_slice< VectorType > project (viennacl::vector_slice< VectorType > &vec, viennacl::range const &r1)
 
template<typename VectorType >
vector_slice< VectorType > project (viennacl::vector_range< VectorType > &vec, viennacl::slice const &s1)
 

Detailed Description

Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.

Typedef Documentation

typedef basic_range range
typedef basic_slice slice
typedef std::ptrdiff_t vcl_ptrdiff_t
typedef std::size_t vcl_size_t

Enumeration Type Documentation

Enumerator
MEMORY_NOT_INITIALIZED 
MAIN_MEMORY 
OPENCL_MEMORY 
CUDA_MEMORY 

Function Documentation

void viennacl::async_copy ( const const_vector_iterator< SCALARTYPE, ALIGNMENT > &  gpu_begin,
const const_vector_iterator< SCALARTYPE, ALIGNMENT > &  gpu_end,
CPU_ITERATOR  cpu_begin 
)

Asynchronous version of fast_copy(), copying data from device to host. The host iterator cpu_begin needs to reside in a linear piece of memory, such as e.g. for std::vector.

This method allows for overlapping data transfer with host computation and returns immediately if the gpu vector has a unit-stride. In order to wait for the transfer to complete, use viennacl::backend::finish(). Note that data pointed to by cpu_begin must not be modified prior to completion of the transfer.

Parameters
gpu_beginGPU iterator pointing to the beginning of the gpu vector (STL-like)
gpu_endGPU iterator pointing to the end of the vector (STL-like)
cpu_beginOutput iterator for the cpu vector. The cpu vector must be at least as long as the gpu vector!
void viennacl::async_copy ( vector_base< NumericT > const &  gpu_vec,
CPUVECTOR &  cpu_vec 
)

Transfer from a gpu vector to a cpu vector. Convenience wrapper for viennacl::linalg::fast_copy(gpu_vec.begin(), gpu_vec.end(), cpu_vec.begin());.

Parameters
gpu_vecA gpu vector.
cpu_vecThe cpu vector. Type requirements: Output iterator pointing to entries linear in memory can be obtained via member function .begin()
void viennacl::async_copy ( CPU_ITERATOR const &  cpu_begin,
CPU_ITERATOR const &  cpu_end,
vector_iterator< SCALARTYPE, ALIGNMENT >  gpu_begin 
)

Asynchronous version of fast_copy(), copying data from host to device. The host iterator cpu_begin needs to reside in a linear piece of memory, such as e.g. for std::vector.

This method allows for overlapping data transfer with host computation and returns immediately if the gpu vector has a unit-stride. In order to wait for the transfer to complete, use viennacl::backend::finish(). Note that data pointed to by cpu_begin must not be modified prior to completion of the transfer.

Parameters
cpu_beginCPU iterator pointing to the beginning of the cpu vector (STL-like)
cpu_endCPU iterator pointing to the end of the vector (STL-like)
gpu_beginOutput iterator for the gpu vector. The gpu iterator must be incrementable (cpu_end - cpu_begin) times, otherwise the result is undefined.
void viennacl::async_copy ( const CPUVECTOR &  cpu_vec,
vector_base< NumericT > &  gpu_vec 
)

Transfer from a cpu vector to a gpu vector. Convenience wrapper for viennacl::linalg::fast_copy(cpu_vec.begin(), cpu_vec.end(), gpu_vec.begin());.

Parameters
cpu_vecA cpu vector. Type requirements: Iterator can be obtained via member function .begin() and .end()
gpu_vecThe gpu vector.
vector_expression< const matrix_base<NumericT, F>, const unsigned int, op_column> viennacl::column ( const matrix_base< NumericT, F > &  A,
unsigned int  j 
)
void viennacl::copy ( const CPU_MATRIX &  cpu_matrix,
coordinate_matrix< SCALARTYPE, ALIGNMENT > &  gpu_matrix 
)

Copies a sparse matrix from the host to the OpenCL device (either GPU or multi-core CPU)

For the requirements on the CPU_MATRIX type, see the documentation of the function copy(CPU_MATRIX, compressed_matrix<>)

Parameters
cpu_matrixA sparse matrix on the host.
gpu_matrixA compressed_matrix from ViennaCL
void viennacl::copy ( const CPU_MATRIX &  cpu_matrix,
matrix_range< matrix< SCALARTYPE, row_major, 1 > > &  gpu_matrix_range 
)
void viennacl::copy ( const VectorType &  cpu_vector,
vector_range< vector< SCALARTYPE > > &  gpu_vector_range 
)
void viennacl::copy ( const CPU_MATRIX &  cpu_matrix,
compressed_matrix< SCALARTYPE, ALIGNMENT > &  gpu_matrix 
)

Copies a sparse matrix from the host to the OpenCL device (either GPU or multi-core CPU)

There are some type requirements on the CPU_MATRIX type (fulfilled by e.g. boost::numeric::ublas):

  • .size1() returns the number of rows
  • .size2() returns the number of columns
  • const_iterator1 is a type definition for an iterator along increasing row indices
  • const_iterator2 is a type definition for an iterator along increasing columns indices
  • The const_iterator1 type provides an iterator of type const_iterator2 via members .begin() and .end() that iterates along column indices in the current row.
  • The types const_iterator1 and const_iterator2 provide members functions .index1() and .index2() that return the current row and column indices respectively.
  • Dereferenciation of an object of type const_iterator2 returns the entry.
Parameters
cpu_matrixA sparse matrix on the host.
gpu_matrixA compressed_matrix from ViennaCL
void viennacl::copy ( vector_range< vector< SCALARTYPE > > const &  gpu_vector_range,
VectorType &  cpu_vector 
)
void viennacl::copy ( const CPU_MATRIX &  cpu_matrix,
hyb_matrix< SCALARTYPE, ALIGNMENT > &  gpu_matrix 
)
void viennacl::copy ( const CPU_MATRIX &  cpu_matrix,
matrix_range< matrix< SCALARTYPE, column_major, 1 > > &  gpu_matrix_range 
)
void viennacl::copy ( const CPU_MATRIX &  cpu_matrix,
ell_matrix< SCALARTYPE, ALIGNMENT > &  gpu_matrix 
)
void viennacl::copy ( const CPU_MATRIX &  cpu_matrix,
compressed_compressed_matrix< SCALARTYPE > &  gpu_matrix 
)

Copies a sparse matrix from the host to the OpenCL device (either GPU or multi-core CPU)

There are some type requirements on the CPU_MATRIX type (fulfilled by e.g. boost::numeric::ublas):

  • .size1() returns the number of rows
  • .size2() returns the number of columns
  • const_iterator1 is a type definition for an iterator along increasing row indices
  • const_iterator2 is a type definition for an iterator along increasing columns indices
  • The const_iterator1 type provides an iterator of type const_iterator2 via members .begin() and .end() that iterates along column indices in the current row.
  • The types const_iterator1 and const_iterator2 provide members functions .index1() and .index2() that return the current row and column indices respectively.
  • Dereferenciation of an object of type const_iterator2 returns the entry.
Parameters
cpu_matrixA sparse matrix on the host.
gpu_matrixA compressed_compressed_matrix from ViennaCL
void viennacl::copy ( const std::vector< std::map< unsigned int, SCALARTYPE > > &  cpu_matrix,
coordinate_matrix< SCALARTYPE, ALIGNMENT > &  gpu_matrix 
)

Copies a sparse matrix in the std::vector< std::map < > > format to an OpenCL device.

Parameters
cpu_matrixA sparse square matrix on the host.
gpu_matrixA coordinate_matrix from ViennaCL
void viennacl::copy ( const std::vector< std::map< SizeType, SCALARTYPE > > &  cpu_matrix,
compressed_matrix< SCALARTYPE, ALIGNMENT > &  gpu_matrix 
)

Copies a sparse square matrix in the std::vector< std::map < > > format to an OpenCL device. Use viennacl::tools::sparse_matrix_adapter for non-square matrices.

Parameters
cpu_matrixA sparse square matrix on the host using STL types
gpu_matrixA compressed_matrix from ViennaCL
void viennacl::copy ( const coordinate_matrix< SCALARTYPE, ALIGNMENT > &  gpu_matrix,
CPU_MATRIX &  cpu_matrix 
)

Copies a sparse matrix from the OpenCL device (either GPU or multi-core CPU) to the host.

There are two type requirements on the CPU_MATRIX type (fulfilled by e.g. boost::numeric::ublas):

  • resize(rows, cols) A resize function to bring the matrix into the correct size
  • operator(i,j) Write new entries via the parenthesis operator
Parameters
gpu_matrixA coordinate_matrix from ViennaCL
cpu_matrixA sparse matrix on the host.
void viennacl::copy ( std::vector< SCALARTYPE > &  cpu_vec,
vandermonde_matrix< SCALARTYPE, ALIGNMENT > &  gpu_mat 
)

Copies a Vandermonde matrix from the std::vector to the OpenCL device (either GPU or multi-core CPU)

Parameters
cpu_vecA std::vector on the host.
gpu_matA vandermonde_matrix from ViennaCL
void viennacl::copy ( std::vector< SCALARTYPE > const &  cpu_vec,
hankel_matrix< SCALARTYPE, ALIGNMENT > &  gpu_mat 
)

Copies a Hankel matrix from the std::vector to the OpenCL device (either GPU or multi-core CPU)

Parameters
cpu_vecA std::vector on the host.
gpu_matA hankel_matrix from ViennaCL
void viennacl::copy ( std::vector< SCALARTYPE > &  cpu_vec,
circulant_matrix< SCALARTYPE, ALIGNMENT > &  gpu_mat 
)

Copies a circulant matrix from the std::vector to the OpenCL device (either GPU or multi-core CPU)

Parameters
cpu_vecA std::vector on the host.
gpu_matA circulant_matrix from ViennaCL
void viennacl::copy ( std::vector< SCALARTYPE > const &  cpu_vec,
toeplitz_matrix< SCALARTYPE, ALIGNMENT > &  gpu_mat 
)

Copies a Toeplitz matrix from the std::vector to the OpenCL device (either GPU or multi-core CPU)

Parameters
cpu_vecA std::vector on the host.
gpu_matA toeplitz_matrix from ViennaCL
void viennacl::copy ( vandermonde_matrix< SCALARTYPE, ALIGNMENT > &  gpu_mat,
std::vector< SCALARTYPE > &  cpu_vec 
)

Copies a Vandermonde matrix from the OpenCL device (either GPU or multi-core CPU) to the std::vector.

Parameters
gpu_matA vandermonde_matrix from ViennaCL
cpu_vecA std::vector on the host.
void viennacl::copy ( hankel_matrix< SCALARTYPE, ALIGNMENT > const &  gpu_mat,
std::vector< SCALARTYPE > &  cpu_vec 
)

Copies a Hankel matrix from the OpenCL device (either GPU or multi-core CPU) to the std::vector.

Parameters
gpu_matA hankel_matrix from ViennaCL
cpu_vecA std::vector on the host.
void viennacl::copy ( matrix_range< matrix< SCALARTYPE, row_major, 1 > > const &  gpu_matrix_range,
CPU_MATRIX &  cpu_matrix 
)
void viennacl::copy ( const std::vector< std::map< SizeType, SCALARTYPE > > &  cpu_matrix,
compressed_compressed_matrix< SCALARTYPE > &  gpu_matrix 
)

Copies a sparse square matrix in the std::vector< std::map < > > format to an OpenCL device. Use viennacl::tools::sparse_matrix_adapter for non-square matrices.

Parameters
cpu_matrixA sparse square matrix on the host using STL types
gpu_matrixA compressed_compressed_matrix from ViennaCL
void viennacl::copy ( circulant_matrix< SCALARTYPE, ALIGNMENT > &  gpu_mat,
std::vector< SCALARTYPE > &  cpu_vec 
)

Copies a circulant matrix from the OpenCL device (either GPU or multi-core CPU) to the std::vector.

Parameters
gpu_matA circulant_matrix from ViennaCL
cpu_vecA std::vector on the host.
void viennacl::copy ( const ell_matrix< SCALARTYPE, ALIGNMENT > &  gpu_matrix,
CPU_MATRIX &  cpu_matrix 
)
void viennacl::copy ( const coordinate_matrix< SCALARTYPE, ALIGNMENT > &  gpu_matrix,
std::vector< std::map< unsigned int, SCALARTYPE > > &  cpu_matrix 
)

Copies a sparse matrix from an OpenCL device to the host. The host type is the std::vector< std::map < > > format .

Parameters
gpu_matrixA coordinate_matrix from ViennaCL
cpu_matrixA sparse matrix on the host.
void viennacl::copy ( vandermonde_matrix< SCALARTYPE, ALIGNMENT > &  vander_src,
MATRIXTYPE &  com_dst 
)

Copies a Vandermonde matrix from the OpenCL device (either GPU or multi-core CPU) to the matrix-like object.

Parameters
vander_srcA vandermonde_matrix from ViennaCL
com_dstA matrix-like object
void viennacl::copy ( hankel_matrix< SCALARTYPE, ALIGNMENT > const &  han_src,
MATRIXTYPE &  com_dst 
)

Copies a Hankel matrix from the OpenCL device (either GPU or multi-core CPU) to the matrix-like object.

Parameters
han_srcA hankel_matrix from ViennaCL
com_dstA matrix-like object
void viennacl::copy ( circulant_matrix< SCALARTYPE, ALIGNMENT > &  circ_src,
MATRIXTYPE &  com_dst 
)

Copies a circulant matrix from the OpenCL device (either GPU or multi-core CPU) to the matrix-like object.

Parameters
circ_srcA circulant_matrix from ViennaCL
com_dstA matrix-like object
void viennacl::copy ( toeplitz_matrix< SCALARTYPE, ALIGNMENT > const &  gpu_mat,
std::vector< SCALARTYPE > &  cpu_vec 
)

Copies a Toeplitz matrix from the OpenCL device (either GPU or multi-core CPU) to the std::vector.

Parameters
gpu_matA toeplitz_matrix from ViennaCL
cpu_vecA std::vector on the host.
void viennacl::copy ( MATRIXTYPE &  com_src,
vandermonde_matrix< SCALARTYPE, ALIGNMENT > &  vander_dst 
)

Copies a the matrix-like object to the Vandermonde matrix from the OpenCL device (either GPU or multi-core CPU)

Parameters
com_srcA std::vector on the host
vander_dstA vandermonde_matrix from ViennaCL
void viennacl::copy ( const VectorType &  cpu_vector,
vector_slice< vector< SCALARTYPE > > &  gpu_vector_slice 
)
void viennacl::copy ( MATRIXTYPE const &  com_src,
hankel_matrix< SCALARTYPE, ALIGNMENT > &  han_dst 
)

Copies a the matrix-like object to the Hankel matrix from the OpenCL device (either GPU or multi-core CPU)

Parameters
com_srcA std::vector on the host
han_dstA hankel_matrix from ViennaCL
void viennacl::copy ( const compressed_compressed_matrix< SCALARTYPE > &  gpu_matrix,
CPU_MATRIX &  cpu_matrix 
)

Copies a sparse matrix from the OpenCL device (either GPU or multi-core CPU) to the host.

There are two type requirements on the CPU_MATRIX type (fulfilled by e.g. boost::numeric::ublas):

  • resize(rows, cols) A resize function to bring the matrix into the correct size
  • operator(i,j) Write new entries via the parenthesis operator
Parameters
gpu_matrixA compressed_compressed_matrix from ViennaCL
cpu_matrixA sparse matrix on the host.
void viennacl::copy ( toeplitz_matrix< SCALARTYPE, ALIGNMENT > const &  tep_src,
MATRIXTYPE &  com_dst 
)

Copies a Toeplitz matrix from the OpenCL device (either GPU or multi-core CPU) to the matrix-like object.

Parameters
tep_srcA toeplitz_matrix from ViennaCL
com_dstA matrix-like object
void viennacl::copy ( MATRIXTYPE &  com_src,
circulant_matrix< SCALARTYPE, ALIGNMENT > &  circ_dst 
)

Copies a the matrix-like object to the circulant matrix from the OpenCL device (either GPU or multi-core CPU)

Parameters
com_srcA std::vector on the host
circ_dstA circulant_matrix from ViennaCL
void viennacl::copy ( matrix_range< matrix< SCALARTYPE, column_major, 1 > > const &  gpu_matrix_range,
CPU_MATRIX &  cpu_matrix 
)
void viennacl::copy ( const hyb_matrix< SCALARTYPE, ALIGNMENT > &  gpu_matrix,
CPU_MATRIX &  cpu_matrix 
)
void copy ( CPU_ITERATOR const &  cpu_begin,
CPU_ITERATOR const &  cpu_end,
vector_iterator< SCALARTYPE, ALIGNMENT >  gpu_begin 
)

STL-like transfer for the entries of a GPU vector to the CPU. The cpu type does not need to lie in a linear piece of memory.

Parameters
cpu_beginCPU iterator pointing to the beginning of the gpu vector (STL-like)
cpu_endCPU iterator pointing to the end of the vector (STL-like)
gpu_beginOutput iterator for the gpu vector. The gpu vector must be at least as long as the cpu vector!
void copy ( const_vector_iterator< SCALARTYPE, ALIGNMENT_SRC > const &  gpu_src_begin,
const_vector_iterator< SCALARTYPE, ALIGNMENT_SRC > const &  gpu_src_end,
vector_iterator< SCALARTYPE, ALIGNMENT_DEST >  gpu_dest_begin 
)

Copy (parts of a) GPU vector to another GPU vector.

Parameters
gpu_src_beginGPU iterator pointing to the beginning of the gpu vector (STL-like)
gpu_src_endGPU iterator pointing to the end of the vector (STL-like)
gpu_dest_beginOutput iterator for the gpu vector. The gpu_dest vector must be at least as long as the gpu_src vector!
void viennacl::copy ( MATRIXTYPE const &  com_src,
toeplitz_matrix< SCALARTYPE, ALIGNMENT > &  tep_dst 
)

Copies a the matrix-like object to the Toeplitz matrix from the OpenCL device (either GPU or multi-core CPU)

Parameters
com_srcA std::vector on the host
tep_dstA toeplitz_matrix from ViennaCL
void viennacl::copy ( vector_slice< vector< SCALARTYPE > > const &  gpu_vector_slice,
VectorType &  cpu_vector 
)
void viennacl::copy ( const_vector_iterator< SCALARTYPE, ALIGNMENT_SRC > const &  gpu_src_begin,
const_vector_iterator< SCALARTYPE, ALIGNMENT_SRC > const &  gpu_src_end,
const_vector_iterator< SCALARTYPE, ALIGNMENT_DEST >  gpu_dest_begin 
)
void viennacl::copy ( const compressed_compressed_matrix< SCALARTYPE > &  gpu_matrix,
std::vector< std::map< unsigned int, SCALARTYPE > > &  cpu_matrix 
)

Copies a sparse matrix from an OpenCL device to the host. The host type is the std::vector< std::map < > > format .

Parameters
gpu_matrixA compressed_compressed_matrix from ViennaCL
cpu_matrixA sparse matrix on the host.
void viennacl::copy ( const compressed_matrix< SCALARTYPE, ALIGNMENT > &  gpu_matrix,
CPU_MATRIX &  cpu_matrix 
)

Copies a sparse matrix from the OpenCL device (either GPU or multi-core CPU) to the host.

There are two type requirements on the CPU_MATRIX type (fulfilled by e.g. boost::numeric::ublas):

  • resize(rows, cols) A resize function to bring the matrix into the correct size
  • operator(i,j) Write new entries via the parenthesis operator
Parameters
gpu_matrixA compressed_matrix from ViennaCL
cpu_matrixA sparse matrix on the host.
void viennacl::copy ( const compressed_matrix< SCALARTYPE, ALIGNMENT > &  gpu_matrix,
std::vector< std::map< unsigned int, SCALARTYPE > > &  cpu_matrix 
)

Copies a sparse matrix from an OpenCL device to the host. The host type is the std::vector< std::map < > > format .

Parameters
gpu_matrixA compressed_matrix from ViennaCL
cpu_matrixA sparse matrix on the host.
void viennacl::copy ( const CPU_MATRIX &  cpu_matrix,
matrix_slice< matrix< SCALARTYPE, row_major, 1 > > &  gpu_matrix_slice 
)
void viennacl::copy ( const CPU_MATRIX &  cpu_matrix,
matrix_slice< matrix< SCALARTYPE, column_major, 1 > > &  gpu_matrix_slice 
)
void viennacl::copy ( matrix_slice< matrix< SCALARTYPE, row_major, 1 > > const &  gpu_matrix_slice,
CPU_MATRIX &  cpu_matrix 
)
void viennacl::copy ( matrix_slice< matrix< SCALARTYPE, column_major, 1 > > const &  gpu_matrix_slice,
CPU_MATRIX &  cpu_matrix 
)
void viennacl::copy ( const CPU_MATRIX &  cpu_matrix,
matrix< SCALARTYPE, F, ALIGNMENT > &  gpu_matrix 
)

Copies a dense matrix from the host (CPU) to the OpenCL device (GPU or multi-core CPU)

Parameters
cpu_matrixA dense matrix on the host. Type requirements: .size1() returns number of rows, .size2() returns number of columns. Access to entries via operator()
gpu_matrixA dense ViennaCL matrix
void viennacl::copy ( const std::vector< std::vector< SCALARTYPE, A1 >, A2 > &  cpu_matrix,
matrix< SCALARTYPE, F, ALIGNMENT > &  gpu_matrix 
)

Copies a dense STL-type matrix from the host (CPU) to the OpenCL device (GPU or multi-core CPU)

Parameters
cpu_matrixA dense matrix on the host of type std::vector< std::vector<> >. cpu_matrix[i][j] returns the element in the i-th row and j-th columns (both starting with zero)
gpu_matrixA dense ViennaCL matrix
void viennacl::copy ( const matrix< SCALARTYPE, F, ALIGNMENT > &  gpu_matrix,
CPU_MATRIX &  cpu_matrix 
)

Copies a dense matrix from the OpenCL device (GPU or multi-core CPU) to the host (CPU).

Parameters
gpu_matrixA dense ViennaCL matrix
cpu_matrixA dense memory on the host. Must have at least as many rows and columns as the gpu_matrix! Type requirement: Access to entries via operator()
void viennacl::copy ( const matrix< SCALARTYPE, F, ALIGNMENT > &  gpu_matrix,
std::vector< std::vector< SCALARTYPE, A1 >, A2 > &  cpu_matrix 
)

Copies a dense matrix from the OpenCL device (GPU or multi-core CPU) to the host (CPU).

Parameters
gpu_matrixA dense ViennaCL matrix
cpu_matrixA dense memory on the host using STL types, typically std::vector< std::vector<> > Must have at least as many rows and columns as the gpu_matrix! Type requirement: Access to entries via operator()
void viennacl::copy ( const const_vector_iterator< SCALARTYPE, ALIGNMENT > &  gpu_begin,
const const_vector_iterator< SCALARTYPE, ALIGNMENT > &  gpu_end,
CPU_ITERATOR  cpu_begin 
)

STL-like transfer for the entries of a GPU vector to the CPU. The cpu type does not need to lie in a linear piece of memory.

Parameters
gpu_beginGPU constant iterator pointing to the beginning of the gpu vector (STL-like)
gpu_endGPU constant iterator pointing to the end of the vector (STL-like)
cpu_beginOutput iterator for the cpu vector. The cpu vector must be at least as long as the gpu vector!
void viennacl::copy ( const vector_iterator< SCALARTYPE, ALIGNMENT > &  gpu_begin,
const vector_iterator< SCALARTYPE, ALIGNMENT > &  gpu_end,
CPU_ITERATOR  cpu_begin 
)

STL-like transfer for the entries of a GPU vector to the CPU. The cpu type does not need to lie in a linear piece of memory.

Parameters
gpu_beginGPU iterator pointing to the beginning of the gpu vector (STL-like)
gpu_endGPU iterator pointing to the end of the vector (STL-like)
cpu_beginOutput iterator for the cpu vector. The cpu vector must be at least as long as the gpu vector!
void viennacl::copy ( vector_base< NumericT > const &  gpu_vec,
CPUVECTOR &  cpu_vec 
)

Transfer from a gpu vector to a cpu vector. Convenience wrapper for viennacl::linalg::copy(gpu_vec.begin(), gpu_vec.end(), cpu_vec.begin());.

Parameters
gpu_vecA gpu vector
cpu_vecThe cpu vector. Type requirements: Output iterator can be obtained via member function .begin()
void viennacl::copy ( const CPUVECTOR &  cpu_vec,
vector_base< T > &  gpu_vec 
)

Transfer from a cpu vector to a gpu vector. Convenience wrapper for viennacl::linalg::copy(cpu_vec.begin(), cpu_vec.end(), gpu_vec.begin());.

Parameters
cpu_vecA cpu vector. Type requirements: Iterator can be obtained via member function .begin() and .end()
gpu_vecThe gpu vector.
void viennacl::copy ( vector_iterator< SCALARTYPE, ALIGNMENT_SRC > const &  gpu_src_begin,
vector_iterator< SCALARTYPE, ALIGNMENT_SRC > const &  gpu_src_end,
vector_iterator< SCALARTYPE, ALIGNMENT_DEST >  gpu_dest_begin 
)

Copy (parts of a) GPU vector to another GPU vector.

Parameters
gpu_src_beginGPU iterator pointing to the beginning of the gpu vector (STL-like)
gpu_src_endGPU iterator pointing to the end of the vector (STL-like)
gpu_dest_beginOutput iterator for the gpu vector. The gpu vector must be at least as long as the cpu vector!
void viennacl::copy ( vector< SCALARTYPE, ALIGNMENT_SRC > const &  gpu_src_vec,
vector< SCALARTYPE, ALIGNMENT_DEST > &  gpu_dest_vec 
)

Transfer from a ViennaCL vector to another ViennaCL vector. Convenience wrapper for viennacl::linalg::copy(gpu_src_vec.begin(), gpu_src_vec.end(), gpu_dest_vec.begin());.

Parameters
gpu_src_vecA gpu vector
gpu_dest_vecThe cpu vector. Type requirements: Output iterator can be obtained via member function .begin()
vector_expression< const matrix_base<NumericT, F>, const int, op_matrix_diag> viennacl::diag ( const matrix_base< NumericT, F > &  A,
int  k = 0 
)
matrix_expression< const vector_base<NumericT>, const int, op_vector_diag> viennacl::diag ( const vector_base< NumericT > &  v,
int  k = 0 
)
void viennacl::fast_copy ( const CPUVECTOR &  cpu_vec,
vector_range< VectorType > &  gpu_vec 
)

Transfer from a cpu vector to a gpu vector. Convenience wrapper for viennacl::linalg::fast_copy(cpu_vec.begin(), cpu_vec.end(), gpu_vec.begin());.

Parameters
cpu_vecA cpu vector. Type requirements: Iterator can be obtained via member function .begin() and .end()
gpu_vecThe gpu vector.
void viennacl::fast_copy ( vector_range< VectorType > const &  gpu_vec,
CPUVECTOR &  cpu_vec 
)

Transfer from a GPU vector range to a CPU vector. Convenience wrapper for viennacl::linalg::fast_copy(gpu_vec.begin(), gpu_vec.end(), cpu_vec.begin());.

Parameters
gpu_vecA gpu vector range.
cpu_vecThe cpu vector. Type requirements: Output iterator can be obtained via member function .begin()
void fast_copy ( const const_vector_iterator< SCALARTYPE, ALIGNMENT > &  gpu_begin,
const const_vector_iterator< SCALARTYPE, ALIGNMENT > &  gpu_end,
CPU_ITERATOR  cpu_begin 
)

STL-like transfer of a GPU vector to the CPU. The cpu type is assumed to reside in a linear piece of memory, such as e.g. for std::vector.

This method is faster than the plain copy() function, because entries are directly written to the cpu vector, starting with &(*cpu.begin()) However, keep in mind that the cpu type MUST represent a linear piece of memory, otherwise you will run into undefined behavior.

Parameters
gpu_beginGPU iterator pointing to the beginning of the gpu vector (STL-like)
gpu_endGPU iterator pointing to the end of the vector (STL-like)
cpu_beginOutput iterator for the cpu vector. The cpu vector must be at least as long as the gpu vector!
void fast_copy ( CPU_ITERATOR const &  cpu_begin,
CPU_ITERATOR const &  cpu_end,
vector_iterator< SCALARTYPE, ALIGNMENT >  gpu_begin 
)

STL-like transfer of a CPU vector to the GPU. The cpu type is assumed to reside in a linear piece of memory, such as e.g. for std::vector.

This method is faster than the plain copy() function, because entries are directly read from the cpu vector, starting with &(*cpu.begin()). However, keep in mind that the cpu type MUST represent a linear piece of memory, otherwise you will run into undefined behavior.

Parameters
cpu_beginCPU iterator pointing to the beginning of the cpu vector (STL-like)
cpu_endCPU iterator pointing to the end of the vector (STL-like)
gpu_beginOutput iterator for the gpu vector. The gpu iterator must be incrementable (cpu_end - cpu_begin) times, otherwise the result is undefined.
void viennacl::fast_copy ( SCALARTYPE *  cpu_matrix_begin,
SCALARTYPE *  cpu_matrix_end,
matrix< SCALARTYPE, F, ALIGNMENT > &  gpu_matrix 
)

Copies a dense matrix from the host (CPU) to the OpenCL device (GPU or multi-core CPU) without temporary. Matrix-Layout on CPU must be equal to the matrix-layout on the GPU.

Parameters
cpu_matrix_beginPointer to the first matrix entry. Cf. iterator concept in STL
cpu_matrix_endPointer past the last matrix entry. Cf. iterator concept in STL
gpu_matrixA dense ViennaCL matrix
void viennacl::fast_copy ( const matrix< SCALARTYPE, F, ALIGNMENT > &  gpu_matrix,
SCALARTYPE *  cpu_matrix_begin 
)

Copies a dense matrix from the OpenCL device (GPU or multi-core CPU) to the host (CPU).

Parameters
gpu_matrixA dense ViennaCL matrix
cpu_matrix_beginPointer to the output memory on the CPU. User must ensure that provided memory is large enough.
void viennacl::fast_copy ( vector_base< NumericT > const &  gpu_vec,
CPUVECTOR &  cpu_vec 
)

Transfer from a gpu vector to a cpu vector. Convenience wrapper for viennacl::linalg::fast_copy(gpu_vec.begin(), gpu_vec.end(), cpu_vec.begin());.

Parameters
gpu_vecA gpu vector.
cpu_vecThe cpu vector. Type requirements: Output iterator pointing to entries linear in memory can be obtained via member function .begin()
void viennacl::fast_copy ( const CPUVECTOR &  cpu_vec,
vector_base< NumericT > &  gpu_vec 
)

Transfer from a cpu vector to a gpu vector. Convenience wrapper for viennacl::linalg::fast_copy(cpu_vec.begin(), cpu_vec.end(), gpu_vec.begin());.

Parameters
cpu_vecA cpu vector. Type requirements: Iterator can be obtained via member function .begin() and .end()
gpu_vecThe gpu vector.
vector<SCALARTYPE, ALIGNMENT>& viennacl::fast_swap ( vector< SCALARTYPE, ALIGNMENT > &  v1,
vector< SCALARTYPE, ALIGNMENT > &  v2 
)

Swaps the content of two vectors by swapping OpenCL handles only, NO data is copied.

Parameters
v1The first vector
v2The second vector
viennacl::enable_if< viennacl::is_any_scalar<S1>::value, matrix_expression< const matrix_base<NumericT, F>, const S1, op_mult> >::type viennacl::operator* ( S1 const &  value,
matrix_base< NumericT, F > const &  m1 
)

Operator overload for the expression alpha * m1, where alpha is a host scalar (float or double) and m1 is a ViennaCL matrix.

Parameters
valueThe host scalar (float or double)
m1A ViennaCL matrix
viennacl::enable_if< viennacl::is_any_scalar<S1>::value, matrix_expression< const matrix_expression< LHS, RHS, OP>, const S1, op_mult> >::type viennacl::operator* ( matrix_expression< LHS, RHS, OP > const &  proxy,
S1 const &  val 
)

Operator overload for the multiplication of a matrix expression with a scalar from the right, e.g. (beta * m1) * alpha. Here, beta * m1 is wrapped into a matrix_expression and then multiplied with alpha from the right.

Parameters
proxyLeft hand side matrix expression
valRight hand side scalar
viennacl::enable_if< viennacl::is_any_scalar<S1>::value, matrix_expression< const matrix_expression< LHS, RHS, OP>, const S1, op_mult> >::type viennacl::operator* ( S1 const &  val,
matrix_expression< LHS, RHS, OP > const &  proxy 
)

Operator overload for the multiplication of a matrix expression with a ViennaCL scalar from the left, e.g. alpha * (beta * m1). Here, beta * m1 is wrapped into a matrix_expression and then multiplied with alpha from the left.

Parameters
valRight hand side scalar
proxyLeft hand side matrix expression
viennacl::enable_if< viennacl::is_any_scalar<S1>::value, matrix_expression< const matrix_base<NumericT, F>, const S1, op_mult> >::type viennacl::operator* ( matrix_base< NumericT, F > const &  m1,
S1 const &  s1 
)

Scales the matrix by a GPU scalar 'alpha' and returns an expression template.

viennacl::enable_if< viennacl::is_scalar<S1>::value, viennacl::matrix_expression< const viennacl::matrix_expression< const vector_base<NumericT>, const vector_base<NumericT>, op_prod>, const S1, op_mult> >::type viennacl::operator* ( const viennacl::matrix_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_prod > &  proxy,
const S1 &  val 
)
viennacl::enable_if< viennacl::is_cpu_scalar<S1>::value, viennacl::matrix_expression< const viennacl::matrix_expression< const vector_base<NumericT>, const vector_base<NumericT>, op_prod>, const NumericT, op_mult> >::type viennacl::operator* ( const viennacl::matrix_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_prod > &  proxy,
const S1 &  val 
)
viennacl::enable_if< viennacl::is_scalar<S1>::value, viennacl::matrix_expression< const viennacl::matrix_expression< const vector_base<NumericT>, const vector_base<NumericT>, op_prod>, const S1, op_mult> >::type viennacl::operator* ( const S1 &  val,
const viennacl::matrix_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_prod > &  proxy 
)
viennacl::enable_if< viennacl::is_cpu_scalar<S1>::value, viennacl::matrix_expression< const viennacl::matrix_expression< const vector_base<NumericT>, const vector_base<NumericT>, op_prod>, const NumericT, op_mult> >::type viennacl::operator* ( const S1 &  val,
const viennacl::matrix_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_prod > &  proxy 
)
viennacl::enable_if< viennacl::is_any_scalar<S1>::value, vector_expression< const vector_base<T>, const S1, op_mult> >::type viennacl::operator* ( S1 const &  value,
vector_base< T > const &  vec 
)

Operator overload for the expression alpha * v1, where alpha is a host scalar (float or double) and v1 is a ViennaCL vector.

Parameters
valueThe host scalar (float or double)
vecA ViennaCL vector
vector_expression< const vector_base<T>, const T, op_mult> viennacl::operator* ( char  value,
vector_base< T > const &  vec 
)

Operator overload for the expression alpha * v1, where alpha is a char.

Parameters
valueThe host scalar (float or double)
vecA ViennaCL vector
vector_expression< const vector_base<T>, const T, op_mult> viennacl::operator* ( short  value,
vector_base< T > const &  vec 
)

Operator overload for the expression alpha * v1, where alpha is a short.

Parameters
valueThe host scalar (float or double)
vecA ViennaCL vector
vector_expression< const vector_base<T>, const T, op_mult> viennacl::operator* ( int  value,
vector_base< T > const &  vec 
)

Operator overload for the expression alpha * v1, where alpha is a int.

Parameters
valueThe host scalar (float or double)
vecA ViennaCL vector
vector_expression< const vector_base<T>, const T, op_mult> viennacl::operator* ( long  value,
vector_base< T > const &  vec 
)

Operator overload for the expression alpha * v1, where alpha is a long.

Parameters
valueThe host scalar (float or double)
vecA ViennaCL vector
vector_expression< const vector_base<T>, const scalar_expression<LHS, RHS, OP>, op_mult> viennacl::operator* ( scalar_expression< LHS, RHS, OP > const &  expr,
vector_base< T > const &  vec 
)

Operator overload for the expression alpha * v1, where alpha is a scalar expression and v1 is a ViennaCL vector.

Parameters
exprThe scalar expression
vecA ViennaCL vector
viennacl::enable_if< viennacl::is_any_scalar<S1>::value, vector_expression< const vector_base<T>, const S1, op_mult> >::type viennacl::operator* ( vector_base< T > const &  vec,
S1 const &  value 
)

Scales the vector by a scalar 'alpha' and returns an expression template.

vector_expression< const vector_base<T>, const T, op_mult> viennacl::operator* ( vector_base< T > const &  vec,
T const &  value 
)
viennacl::enable_if< viennacl::is_any_scalar<S1>::value, viennacl::vector_expression<const vector_expression<LHS, RHS, OP>, const S1, op_mult> >::type viennacl::operator* ( vector_expression< LHS, RHS, OP > const &  proxy,
S1 const &  val 
)

Operator overload for the multiplication of a vector expression with a scalar from the right, e.g. (beta * vec1) * alpha. Here, beta * vec1 is wrapped into a vector_expression and then multiplied with alpha from the right.

Parameters
proxyLeft hand side vector expression
valRight hand side scalar
viennacl::enable_if< viennacl::is_any_scalar<S1>::value, viennacl::vector_expression<const vector_expression<LHS, RHS, OP>, const S1, op_mult> >::type viennacl::operator* ( S1 const &  val,
vector_expression< LHS, RHS, OP > const &  proxy 
)

Operator overload for the multiplication of a vector expression with a ViennaCL scalar from the left, e.g. alpha * (beta * vec1). Here, beta * vec1 is wrapped into a vector_expression and then multiplied with alpha from the left.

Parameters
valRight hand side scalar
proxyLeft hand side vector expression
viennacl::enable_if< viennacl::is_scalar<S1>::value, matrix_base<NumericT, F> & >::type viennacl::operator*= ( matrix_base< NumericT, F > &  m1,
S1 const &  gpu_val 
)

Scales a matrix by a GPU scalar value.

viennacl::enable_if< viennacl::is_any_scalar<S1>::value, vector_base<T> & >::type viennacl::operator*= ( vector_base< T > &  v1,
S1 const &  gpu_val 
)

Scales this vector by a GPU scalar value.

viennacl::enable_if< viennacl::is_any_sparse_matrix<SparseMatrixType>::value, viennacl::vector<SCALARTYPE> >::type viennacl::operator+ ( viennacl::vector_base< SCALARTYPE > &  result,
const viennacl::vector_expression< const SparseMatrixType, const viennacl::vector_base< SCALARTYPE >, viennacl::op_prod > &  proxy 
)

Implementation of the operation 'result = v1 + A * v2', where A is a matrix.

Parameters
resultThe vector the result is written to.
proxyAn expression template proxy class holding v1, A, and v2.
viennacl::vector<NumericT> viennacl::operator+ ( const vector_base< NumericT > &  v1,
const vector_expression< const matrix_base< NumericT, F >, const vector_base< NumericT >, op_prod > &  proxy 
)

Implementation of the operation 'result = v1 + A * v2', where A is a matrix.

Parameters
v1The addend vector.
proxyAn expression template proxy class.
vector<NumericT> viennacl::operator+ ( const vector_base< NumericT > &  v1,
const vector_expression< const matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_trans >, const vector_base< NumericT >, op_prod > &  proxy 
)

Implementation of the operation 'result = v1 + A * v2', where A is a matrix.

Parameters
v1The addend vector.
proxyAn expression template proxy class.
matrix_expression< const matrix_expression<const LHS1, const RHS1, OP1>, const matrix_expression<const LHS2, const RHS2, OP2>, op_add> viennacl::operator+ ( matrix_expression< const LHS1, const RHS1, OP1 > const &  proxy1,
matrix_expression< const LHS2, const RHS2, OP2 > const &  proxy2 
)

Generic 'catch-all' overload, which enforces a temporary if the expression tree gets too deep.

matrix_expression< const matrix_expression<const LHS1, const RHS1, OP1>, const matrix_base<NumericT, F>, op_add> viennacl::operator+ ( matrix_expression< const LHS1, const RHS1, OP1 > const &  proxy1,
matrix_base< NumericT, F > const &  proxy2 
)
matrix_expression< const matrix_base<NumericT, F>, const matrix_expression<const LHS2, const RHS2, OP2>, op_add> viennacl::operator+ ( matrix_base< NumericT, F > const &  proxy1,
matrix_expression< const LHS2, const RHS2, OP2 > const &  proxy2 
)
matrix_expression< const matrix_base<NumericT, F>, const matrix_base<NumericT, F>, op_add > viennacl::operator+ ( const matrix_base< NumericT, F > &  m1,
const matrix_base< NumericT, F > &  m2 
)

Operator overload for m1 + m2, where m1 and m2 are either dense matrices, matrix ranges, or matrix slices. No mixing of different storage layouts allowed at the moment.

vector_expression< const vector_expression< LHS1, RHS1, OP1>, const vector_expression< LHS2, RHS2, OP2>, viennacl::op_add> viennacl::operator+ ( vector_expression< LHS1, RHS1, OP1 > const &  proxy1,
vector_expression< LHS2, RHS2, OP2 > const &  proxy2 
)

Operator overload for the addition of two vector expressions.

Parameters
proxy1Left hand side vector expression
proxy2Right hand side vector expression
vector_expression< const vector_expression<LHS, RHS, OP>, const vector_base<T>, viennacl::op_add> viennacl::operator+ ( vector_expression< LHS, RHS, OP > const &  proxy,
vector_base< T > const &  vec 
)

Operator overload for the addition of a vector expression with a vector or another vector expression. This is the default implementation for all cases that are too complex in order to be covered within a single kernel, hence a temporary vector is created.

Parameters
proxyLeft hand side vector expression
vecRight hand side vector (also -range and -slice is allowed)
vector_expression< const vector_base<T>, const vector_expression<LHS, RHS, OP>, viennacl::op_add> viennacl::operator+ ( vector_base< T > const &  vec,
vector_expression< LHS, RHS, OP > const &  proxy 
)

Operator overload for the addition of a vector with a vector expression. This is the default implementation for all cases that are too complex in order to be covered within a single kernel, hence a temporary vector is created.

Parameters
proxyLeft hand side vector expression
vecRight hand side vector (also -range and -slice is allowed)
vector_expression< const vector_base<T>, const vector_base<T>, op_add> viennacl::operator+ ( const vector_base< T > &  v1,
const vector_base< T > &  v2 
)

Returns an expression template object for adding up two vectors, i.e. v1 + v2.

vector<NumericT> viennacl::operator+= ( vector_base< NumericT > &  v1,
const viennacl::vector_expression< const matrix_base< NumericT, F >, const vector_base< NumericT >, viennacl::op_prod > &  proxy 
)

Implementation of the operation v1 += A * v2, where A is a matrix.

Parameters
v1The result vector v1 where A * v2 is added to
proxyAn expression template proxy class.
vector<NumericT> viennacl::operator+= ( vector_base< NumericT > &  v1,
const vector_expression< const matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_trans >, const vector_base< NumericT >, op_prod > &  proxy 
)

Implementation of the operation v1 += A * v2, where A is a matrix.

Parameters
v1The addend vector where the result is written to.
proxyAn expression template proxy class.
viennacl::enable_if< viennacl::is_any_sparse_matrix<SparseMatrixType>::value, viennacl::vector<SCALARTYPE> >::type viennacl::operator- ( viennacl::vector_base< SCALARTYPE > &  result,
const viennacl::vector_expression< const SparseMatrixType, const viennacl::vector_base< SCALARTYPE >, viennacl::op_prod > &  proxy 
)

Implementation of the operation 'result = v1 - A * v2', where A is a matrix.

Parameters
resultThe vector the result is written to.
proxyAn expression template proxy class.
viennacl::vector<NumericT> viennacl::operator- ( const vector_base< NumericT > &  v1,
const vector_expression< const matrix_base< NumericT, F >, const vector_base< NumericT >, op_prod > &  proxy 
)

Implementation of the operation 'result = v1 - A * v2', where A is a matrix.

Parameters
v1The addend vector.
proxyAn expression template proxy class.
vector<NumericT> viennacl::operator- ( const vector_base< NumericT > &  v1,
const vector_expression< const matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_trans >, const vector_base< NumericT >, op_prod > &  proxy 
)

Implementation of the operation 'result = v1 - A * v2', where A is a matrix.

Parameters
v1The addend vector.
proxyAn expression template proxy class.
matrix_expression< const matrix_expression<const LHS1, const RHS1, OP1>, const matrix_expression<const LHS2, const RHS2, OP2>, op_sub> viennacl::operator- ( matrix_expression< const LHS1, const RHS1, OP1 > const &  proxy1,
matrix_expression< const LHS2, const RHS2, OP2 > const &  proxy2 
)
matrix_expression< const matrix_expression<const LHS1, const RHS1, OP1>, const matrix_base<NumericT, F>, op_sub> viennacl::operator- ( matrix_expression< const LHS1, const RHS1, OP1 > const &  proxy1,
matrix_base< NumericT, F > const &  proxy2 
)
matrix_expression< const matrix_base<NumericT, F>, const matrix_expression<const LHS2, const RHS2, OP2>, op_sub> viennacl::operator- ( matrix_base< NumericT, F > const &  proxy1,
matrix_expression< const LHS2, const RHS2, OP2 > const &  proxy2 
)
matrix_expression< const matrix_base<NumericT, F>, const matrix_base<NumericT, F>, op_sub > viennacl::operator- ( const matrix_base< NumericT, F > &  m1,
const matrix_base< NumericT, F > &  m2 
)

Operator overload for m1 - m2, where m1 and m2 are either dense matrices, matrix ranges, or matrix slices. No mixing of different storage layouts allowed at the moment.

vector_expression< const vector_expression< LHS1, RHS1, OP1>, const vector_expression< LHS2, RHS2, OP2>, viennacl::op_sub> viennacl::operator- ( vector_expression< LHS1, RHS1, OP1 > const &  proxy1,
vector_expression< LHS2, RHS2, OP2 > const &  proxy2 
)

Operator overload for the subtraction of two vector expressions.

Parameters
proxy1Left hand side vector expression
proxy2Right hand side vector expression
vector_expression< const vector_expression<LHS, RHS, OP>, const vector_base<T>, viennacl::op_sub> viennacl::operator- ( vector_expression< LHS, RHS, OP > const &  proxy,
vector_base< T > const &  vec 
)

Operator overload for the subtraction of a vector expression with a vector or another vector expression. This is the default implementation for all cases that are too complex in order to be covered within a single kernel, hence a temporary vector is created.

Parameters
proxyLeft hand side vector expression
vecRight hand side vector (also -range and -slice is allowed)
vector_expression< const vector_base<T>, const vector_expression<LHS, RHS, OP>, viennacl::op_sub> viennacl::operator- ( vector_base< T > const &  vec,
vector_expression< LHS, RHS, OP > const &  proxy 
)

Operator overload for the subtraction of a vector expression with a vector or another vector expression. This is the default implementation for all cases that are too complex in order to be covered within a single kernel, hence a temporary vector is created.

Parameters
proxyLeft hand side vector expression
vecRight hand side vector (also -range and -slice is allowed)
vector_expression< const vector_base<T>, const vector_base<T>, op_sub> viennacl::operator- ( const vector_base< T > &  v1,
const vector_base< T > &  v2 
)

Returns an expression template object for subtracting two vectors, i.e. v1 - v2.

vector<NumericT> viennacl::operator-= ( vector_base< NumericT > &  v1,
const viennacl::vector_expression< const matrix_base< NumericT, F >, const vector_base< NumericT >, viennacl::op_prod > &  proxy 
)

Implementation of the operation v1 -= A * v2, where A is a matrix.

Parameters
v1The result vector v1 where A * v2 is subtracted from
proxyAn expression template proxy class.
vector<NumericT> viennacl::operator-= ( vector_base< NumericT > &  v1,
const vector_expression< const matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_trans >, const vector_base< NumericT >, op_prod > &  proxy 
)

Implementation of the operation v1 -= A * v2, where A is a matrix.

Parameters
v1The addend vector where the result is written to.
proxyAn expression template proxy class.
viennacl::enable_if< viennacl::is_any_scalar<S1>::value, matrix_expression< const matrix_expression<const LHS, const RHS, OP>, const S1, op_div> >::type viennacl::operator/ ( matrix_expression< const LHS, const RHS, OP > const &  proxy,
S1 const &  val 
)

Operator overload for the division of a matrix expression by a scalar from the right, e.g. (beta * m1) / alpha. Here, beta * m1 is wrapped into a matrix_expression and then divided by alpha.

Parameters
proxyLeft hand side matrix expression
valRight hand side scalar
viennacl::enable_if< viennacl::is_any_scalar<S1>::value, matrix_expression< const matrix_base<NumericT, F>, const S1, op_div> >::type viennacl::operator/ ( matrix_base< NumericT, F > const &  m1,
S1 const &  s1 
)

Returns an expression template for scaling the matrix by a GPU scalar 'alpha'.

viennacl::enable_if< viennacl::is_any_scalar<S1>::value, viennacl::vector_expression<const vector_expression<LHS, RHS, OP>, const S1, op_div> >::type viennacl::operator/ ( vector_expression< LHS, RHS, OP > const &  proxy,
S1 const &  val 
)

Operator overload for the division of a vector expression by a scalar from the right, e.g. (beta * vec1) / alpha. Here, beta * vec1 is wrapped into a vector_expression and then divided by alpha.

Parameters
proxyLeft hand side vector expression
valRight hand side scalar
viennacl::enable_if< viennacl::is_any_scalar<S1>::value, vector_expression< const vector_base<T>, const S1, op_div> >::type viennacl::operator/ ( vector_base< T > const &  v1,
S1 const &  s1 
)

Returns an expression template for scaling the vector by a GPU scalar 'alpha'.

viennacl::enable_if< viennacl::is_scalar<S1>::value, matrix_base<NumericT, F> & >::type viennacl::operator/= ( matrix_base< NumericT, F > &  m1,
S1 const &  gpu_val 
)

Scales a matrix by a GPU scalar value.

viennacl::enable_if< viennacl::is_any_scalar<S1>::value, vector_base<T> & >::type viennacl::operator/= ( vector_base< T > &  v1,
S1 const &  gpu_val 
)

Scales this vector by a GPU scalar value.

std::ostream& viennacl::operator<< ( std::ostream &  s,
vandermonde_matrix< SCALARTYPE, ALIGNMENT > &  gpu_matrix 
)

Prints the matrix. Output is compatible to boost::numeric::ublas.

Parameters
sSTL output stream
gpu_matrixA ViennaCL Vandermonde matrix
std::ostream& viennacl::operator<< ( std::ostream &  s,
hankel_matrix< SCALARTYPE, ALIGNMENT > &  gpu_matrix 
)
std::ostream& viennacl::operator<< ( std::ostream &  s,
circulant_matrix< SCALARTYPE, ALIGNMENT > &  gpu_matrix 
)

Prints the matrix. Output is compatible to boost::numeric::ublas.

Parameters
sSTL output stream
gpu_matrixA ViennaCL circulant matrix
std::ostream& viennacl::operator<< ( std::ostream &  s,
toeplitz_matrix< SCALARTYPE, ALIGNMENT > &  gpu_matrix 
)

Prints the matrix. Output is compatible to boost::numeric::ublas.

Parameters
sSTL output stream
gpu_matrixA ViennaCL Toeplitz matrix
std::ostream& viennacl::operator<< ( std::ostream &  s,
const scalar< SCALARTYPE > &  val 
)

Allows to directly print the value of a scalar to an output stream.

std::ostream& viennacl::operator<< ( std::ostream &  s,
const matrix_base< SCALARTYPE, F > &  gpu_matrix 
)

Prints the matrix. Output is compatible to boost::numeric::ublas.

Parameters
sSTL output stream
gpu_matrixA dense ViennaCL matrix
std::ostream& viennacl::operator<< ( std::ostream &  s,
const matrix_expression< LHS, RHS, OP > &  expr 
)

Prints the matrix. Output is compatible to boost::numeric::ublas.

Parameters
sSTL output stream
exprA matrix expression
std::ostream& viennacl::operator<< ( std::ostream &  os,
vector_base< T > const &  val 
)

Output stream. Output format is ublas compatible.

Parameters
osSTL output stream
valThe vector that should be printed
std::ostream& viennacl::operator<< ( std::ostream &  os,
vector_expression< LHS, RHS, OP > const &  proxy 
)
std::istream& viennacl::operator>> ( std::istream &  s,
const scalar< SCALARTYPE > &  val 
)

Allows to directly read a value of a scalar from an input stream.

vector_range<VectorType> viennacl::project ( VectorType &  vec,
viennacl::range const &  r1 
)
vector_range<VectorType> viennacl::project ( viennacl::vector_range< VectorType > &  vec,
viennacl::range const &  r1 
)
vector_slice<VectorType> viennacl::project ( VectorType &  vec,
viennacl::slice const &  s1 
)
vector_slice<VectorType> viennacl::project ( viennacl::vector_slice< VectorType > &  vec,
viennacl::slice const &  s1 
)
matrix_range<MatrixType> viennacl::project ( MatrixType &  A,
viennacl::range const &  r1,
viennacl::range const &  r2 
)
vector_slice<VectorType> viennacl::project ( viennacl::vector_slice< VectorType > &  vec,
viennacl::range const &  r1 
)
matrix_range<MatrixType> viennacl::project ( matrix_range< MatrixType > &  A,
viennacl::range const &  r1,
viennacl::range const &  r2 
)
vector_slice<VectorType> viennacl::project ( viennacl::vector_range< VectorType > &  vec,
viennacl::slice const &  s1 
)
matrix_slice<MatrixType> viennacl::project ( MatrixType &  A,
viennacl::slice const &  r1,
viennacl::slice const &  r2 
)
matrix_slice<MatrixType> viennacl::project ( matrix_range< MatrixType > &  A,
viennacl::slice const &  r1,
viennacl::slice const &  r2 
)
matrix_slice<MatrixType> viennacl::project ( matrix_slice< MatrixType > &  A,
viennacl::slice const &  r1,
viennacl::slice const &  r2 
)
std::vector<int> viennacl::reorder ( MatrixType const &  matrix,
gibbs_poole_stockmeyer_tag   
)

Function for the calculation of a node numbering permutation vector to reduce the bandwidth of a incidence matrix by the Gibbs-Poole-Stockmeyer algorithm.

references: Werner Neudorf: "Bandbreitenreduktion - Teil 3. Algorithmus von Gibbs-Poole-Stockmeyer. Testbeispiele mit CM und GPS", Preprint No. M 08/02, September 2002. Technische Universität Ilmenau, Fakultät für Mathematik und Naturwissenschaften, Institut für Mathematik. http://www.db-thueringen.de/servlets/DerivateServlet/Derivate-8673/IfM_Preprint_M_02_08.pdf (URL taken on June 14, 2011)

Parameters
matrixvector of n matrix rows, where each row is a map<int, double> containing only the nonzero elements
Returns
permutation vector r. r[l] = i means that the new label of node i will be l.
std::vector<IndexT> viennacl::reorder ( std::vector< std::map< IndexT, ValueT > > const &  matrix,
cuthill_mckee_tag   
)

Function for the calculation of a node number permutation to reduce the bandwidth of an incidence matrix by the Cuthill-McKee algorithm.

references: Algorithm was implemented similary as described in "Tutorial: Bandwidth Reduction - The CutHill- McKee Algorithm" posted by Ciprian Zavoianu as weblog at http://ciprian-zavoianu.blogspot.com/2009/01/project-bandwidth-reduction.html on January 15, 2009 (URL taken on June 14, 2011)

Parameters
matrixvector of n matrix rows, where each row is a map<int, double> containing only the nonzero elements
Returns
permutation vector r. r[l] = i means that the new label of node i will be l.
std::vector<IndexT> viennacl::reorder ( std::vector< std::map< IndexT, ValueT > > const &  matrix,
advanced_cuthill_mckee_tag const &  tag 
)

Function for the calculation of a node number permutation to reduce the bandwidth of an incidence matrix by the advanced Cuthill-McKee algorithm.

references: see description of original Cuthill McKee implementation, and E. Cuthill and J. McKee: "Reducing the Bandwidth of sparse symmetric Matrices". Naval Ship Research and Development Center, Washington, D. C., 20007

vector_expression< const matrix_base<NumericT, F>, const unsigned int, op_row> viennacl::row ( const matrix_base< NumericT, F > &  A,
unsigned int  i 
)
void viennacl::swap ( vector_base< T > &  vec1,
vector_base< T > &  vec2 
)

Swaps the contents of two vectors, data is copied.

Parameters
vec1The first vector
vec2The second vector
void viennacl::switch_memory_context ( T &  obj,
viennacl::context  new_ctx 
)

Generic convenience routine for migrating data of an object to a new memory domain.

vector_tuple<ScalarT> viennacl::tie ( vector_base< ScalarT > const &  v0,
vector_base< ScalarT > const &  v1 
)
vector_tuple<ScalarT> viennacl::tie ( vector_base< ScalarT > &  v0,
vector_base< ScalarT > &  v1 
)
vector_tuple<ScalarT> viennacl::tie ( vector_base< ScalarT > const &  v0,
vector_base< ScalarT > const &  v1,
vector_base< ScalarT > const &  v2 
)
vector_tuple<ScalarT> viennacl::tie ( vector_base< ScalarT > &  v0,
vector_base< ScalarT > &  v1,
vector_base< ScalarT > &  v2 
)
vector_tuple<ScalarT> viennacl::tie ( vector_base< ScalarT > const &  v0,
vector_base< ScalarT > const &  v1,
vector_base< ScalarT > const &  v2,
vector_base< ScalarT > const &  v3 
)
vector_tuple<ScalarT> viennacl::tie ( vector_base< ScalarT > &  v0,
vector_base< ScalarT > &  v1,
vector_base< ScalarT > &  v2,
vector_base< ScalarT > &  v3 
)
vector_tuple<ScalarT> viennacl::tie ( vector_base< ScalarT > const &  v0,
vector_base< ScalarT > const &  v1,
vector_base< ScalarT > const &  v2,
vector_base< ScalarT > const &  v3,
vector_base< ScalarT > const &  v4 
)
vector_tuple<ScalarT> viennacl::tie ( vector_base< ScalarT > &  v0,
vector_base< ScalarT > &  v1,
vector_base< ScalarT > &  v2,
vector_base< ScalarT > &  v3,
vector_base< ScalarT > &  v4 
)
viennacl::enable_if<viennacl::is_any_sparse_matrix<M1>::value, matrix_expression< const M1, const M1, op_trans> >::type viennacl::trans ( const M1 &  mat)

Returns an expression template class representing a transposed matrix.

matrix_expression< const matrix_base<NumericT, F>, const matrix_base<NumericT, F>, op_trans> viennacl::trans ( const matrix_base< NumericT, F > &  mat)

Returns an expression template class representing a transposed matrix.