ViennaCL - The Vienna Computing Library  1.5.1
Data Structures | Namespaces | Typedefs | Enumerations | Functions
viennacl/forwards.h File Reference

This file provides the forward declarations for the main types used within ViennaCL. More...

#include <cstddef>
#include <cassert>
#include <string>
#include "viennacl/meta/enable_if.hpp"

Go to the source code of this file.

Data Structures

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< OP >
 A tag class representing element-wise binary operations (like multiplication) on vectors or matrices. More...
struct  op_element_unary< OP >
 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...
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...
struct  is_cpu_scalar< T >
 Helper struct for checking whether a type is a host scalar type (e.g. float, double) More...
struct  is_scalar< T >
 Helper struct for checking whether a type is a viennacl::scalar<> More...
struct  is_flip_sign_scalar< T >
 Helper struct for checking whether a type represents a sign flip on a viennacl::scalar<> More...
struct  is_any_scalar< T >
 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< T >
 Checks for a type being either vector_base or implicit_vector_base. More...
struct  is_any_dense_matrix< T >
 Checks for either matrix_base or implicit_matrix_base. More...
struct  is_row_major< T >
 Helper class for checking whether a matrix has a row-major layout. More...
struct  is_compressed_matrix< T >
 Helper class for checking whether a matrix is a compressed_matrix (CSR format) More...
struct  is_coordinate_matrix< T >
 Helper class for checking whether a matrix is a coordinate_matrix (COO format) More...
struct  is_ell_matrix< T >
 Helper class for checking whether a matrix is an ell_matrix (ELL format) More...
struct  is_hyb_matrix< T >
 Helper class for checking whether a matrix is a hyb_matrix (hybrid format: ELL plus CSR) More...
struct  is_any_sparse_matrix< T >
 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< T >
 Helper class for checking whether a matrix is a circulant matrix. More...
struct  is_hankel_matrix< T >
 Helper class for checking whether a matrix is a Hankel matrix. More...
struct  is_toeplitz_matrix< T >
 Helper class for checking whether a matrix is a Toeplitz matrix. More...
struct  is_vandermonde_matrix< T >
 Helper class for checking whether a matrix is a Vandermonde matrix. More...
struct  is_any_dense_structured_matrix< T >
 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  MATRIX_ITERATOR_INCREMENTER< ROWCOL, MATRIXTYPE >
 Helper class for incrementing an iterator in a dense matrix. More...
struct  lower_tag
 A tag class representing a lower triangular matrix. More...
struct  upper_tag
 A tag class representing an upper triangular matrix. More...
struct  unit_lower_tag
 A tag class representing a lower triangular matrix with unit diagonal. More...
struct  unit_upper_tag
 A tag class representing an upper triangular matrix with unit diagonal. More...
class  no_precond
 A tag class representing the use of no preconditioner. More...

Namespaces

namespace  viennacl
 

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


namespace  viennacl::tools
 

Namespace for various tools used within ViennaCL.


namespace  viennacl::linalg
 

Provides all linear algebra operations which are not covered by operator overloads.


namespace  viennacl::linalg::detail
 

Namespace holding implementation details for linear algebra routines. Usually not of interest for a library user.


namespace  viennacl::backend
 

Namespace providing routines for handling the different memory domains.


namespace  viennacl::backend::cpu_ram
 

Provides implementations for handling memory buffers in CPU RAM.


namespace  viennacl::backend::cpu_ram::detail
 

Holds implementation details for handling memory buffers in CPU RAM. Not intended for direct use by library users.


namespace  viennacl::backend::cuda
 

Provides implementations for handling CUDA memory buffers.


namespace  viennacl::backend::cuda::detail
 

Holds implementation details for handling CUDA memory buffers. Not intended for direct use by library users.


namespace  viennacl::backend::detail
 

Implementation details for the generic memory backend interface.


namespace  viennacl::backend::opencl
 

Provides implementations for handling OpenCL memory buffers.


namespace  viennacl::backend::opencl::detail
 

Holds implementation details for handling OpenCL memory buffers. Not intended for direct use by library users.


namespace  viennacl::detail
 

Holds implementation details for functionality in the main viennacl-namespace. Not intended for direct use by library users.


namespace  viennacl::detail::fft
 

Helper namespace for fast Fourier transforms. Not to be used directly by library users.


namespace  viennacl::detail::fft::FFT_DATA_ORDER
 

Helper namespace for fast-Fourier transformation. Deprecated.


namespace  viennacl::generator
 

Provides an OpenCL kernel generator.


namespace  viennacl::generator::autotune
 

Provides the implementation for tuning the kernels for a particular device.


namespace  viennacl::generator::detail
 

Contains implementation details of the kernel generator.


namespace  viennacl::generator::profiles
 

Namespace holding the various device-specific parameters for generating the best kernels.


namespace  viennacl::generator::utils
 

Contains various helper routines for kernel generation.


namespace  viennacl::io
 

Provides basic input-output functionality.


namespace  viennacl::io::detail
 

Implementation details for IO functionality. Usually not of interest for a library user.


namespace  viennacl::io::tag
 

Namespace holding the various XML tag definitions for the kernel parameter tuning facility.


namespace  viennacl::io::val
 

Namespace holding the various XML strings for the kernel parameter tuning facility.


namespace  viennacl::linalg::cuda
 

Holds all CUDA compute kernels used by ViennaCL.


namespace  viennacl::linalg::cuda::detail
 

Helper functions for the CUDA linear algebra backend.


namespace  viennacl::linalg::detail::amg
 

Implementation namespace for algebraic multigrid preconditioner.


namespace  viennacl::linalg::detail::spai
 

Implementation namespace for sparse approximate inverse preconditioner.


namespace  viennacl::linalg::host_based
 

Holds all compute kernels with conventional host-based execution (buffers in CPU RAM).


namespace  viennacl::linalg::host_based::detail
 

Helper functions for the host-based linear algebra backend.


namespace  viennacl::linalg::kernels
 

Namespace containing the OpenCL kernels. Deprecated, will be moved to viennacl::linalg::opencl in future releases.


namespace  viennacl::linalg::opencl
 

Holds all routines providing OpenCL linear algebra operations.


namespace  viennacl::linalg::opencl::detail
 

Helper functions for OpenCL-accelerated linear algebra operations.


namespace  viennacl::linalg::opencl::kernels
 

Contains the OpenCL kernel generation functions for a predefined set of functionality.


namespace  viennacl::linalg::opencl::kernels::detail
 

Implementation details for the predefined OpenCL kernels.


namespace  viennacl::ocl
 

OpenCL backend. Manages platforms, contexts, buffers, kernels, etc.


namespace  viennacl::result_of
 

Namespace containing many meta-functions.


namespace  viennacl::tools::detail
 

Contains implementation details for the tools. Usually not of interest for the library user.


namespace  viennacl::traits
 

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


namespace  viennacl::scheduler
 

Contains the scheduling functionality which allows for dynamic kernel generation as well as the fusion of multiple statements into a single kernel.


namespace  viennacl::scheduler::detail
 

Implementation details for the scheduler.


namespace  viennacl::scheduler::result_of
 

Helper metafunctions used for the scheduler.


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 }
enum  row_info_types { SPARSE_ROW_NORM_INF = 0, SPARSE_ROW_NORM_1, SPARSE_ROW_NORM_2, SPARSE_ROW_DIAGONAL }

Functions

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.
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.
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.
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.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void convolve_i (viennacl::vector< SCALARTYPE, ALIGNMENT > &input1, viennacl::vector< SCALARTYPE, ALIGNMENT > &input2, viennacl::vector< SCALARTYPE, ALIGNMENT > &output)
template<typename T >
viennacl::vector_expression
< const vector_base< T >
, const vector_base< T >
, op_element_binary< op_prod > > 
element_prod (vector_base< T > const &v1, vector_base< T > const &v2)
template<typename T >
viennacl::vector_expression
< const vector_base< T >
, const vector_base< T >
, op_element_binary< op_div > > 
element_div (vector_base< T > const &v1, vector_base< T > const &v2)
template<typename T >
void inner_prod_impl (vector_base< T > const &vec1, vector_base< T > const &vec2, scalar< T > &result)
 Computes the inner product of two vectors - dispatcher interface.
template<typename LHS , typename RHS , typename OP , typename T >
void inner_prod_impl (viennacl::vector_expression< LHS, RHS, OP > const &vec1, vector_base< T > const &vec2, scalar< T > &result)
template<typename T , typename LHS , typename RHS , typename OP >
void inner_prod_impl (vector_base< T > const &vec1, viennacl::vector_expression< LHS, RHS, OP > const &vec2, scalar< T > &result)
template<typename LHS1 , typename RHS1 , typename OP1 , typename LHS2 , typename RHS2 , typename OP2 , typename T >
void inner_prod_impl (viennacl::vector_expression< LHS1, RHS1, OP1 > const &vec1, viennacl::vector_expression< LHS2, RHS2, OP2 > const &vec2, scalar< T > &result)
template<typename T >
void inner_prod_cpu (vector_base< T > const &vec1, vector_base< T > const &vec2, T &result)
 Computes the inner product of two vectors with the final reduction step on the CPU - dispatcher interface.
template<typename LHS , typename RHS , typename OP , typename T >
void inner_prod_cpu (viennacl::vector_expression< LHS, RHS, OP > const &vec1, vector_base< T > const &vec2, T &result)
template<typename T , typename LHS , typename RHS , typename OP >
void inner_prod_cpu (vector_base< T > const &vec1, viennacl::vector_expression< LHS, RHS, OP > const &vec2, T &result)
template<typename LHS1 , typename RHS1 , typename OP1 , typename LHS2 , typename RHS2 , typename OP2 , typename S3 >
void inner_prod_cpu (viennacl::vector_expression< LHS1, RHS1, OP1 > const &vec1, viennacl::vector_expression< LHS2, RHS2, OP2 > const &vec2, S3 &result)
template<typename T >
void norm_1_impl (vector_base< T > const &vec, scalar< T > &result)
 Computes the l^1-norm of a vector - dispatcher interface.
template<typename LHS , typename RHS , typename OP , typename T >
void norm_1_impl (viennacl::vector_expression< LHS, RHS, OP > const &vec, scalar< T > &result)
template<typename T >
void norm_1_cpu (vector_base< T > const &vec, T &result)
 Computes the l^1-norm of a vector with final reduction on the CPU.
template<typename LHS , typename RHS , typename OP , typename S2 >
void norm_1_cpu (viennacl::vector_expression< LHS, RHS, OP > const &vec, S2 &result)
 Computes the l^1-norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary.
template<typename T >
void norm_2_impl (vector_base< T > const &vec, scalar< T > &result)
 Computes the l^2-norm of a vector - dispatcher interface.
template<typename LHS , typename RHS , typename OP , typename T >
void norm_2_impl (viennacl::vector_expression< LHS, RHS, OP > const &vec, scalar< T > &result)
 Computes the l^2-norm of a vector - interface for a vector expression. Creates a temporary.
template<typename T >
void norm_2_cpu (vector_base< T > const &vec, T &result)
 Computes the l^2-norm of a vector with final reduction on the CPU - dispatcher interface.
template<typename LHS , typename RHS , typename OP , typename S2 >
void norm_2_cpu (viennacl::vector_expression< LHS, RHS, OP > const &vec, S2 &result)
 Computes the l^2-norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary.
template<typename T >
void norm_inf_impl (vector_base< T > const &vec, scalar< T > &result)
 Computes the supremum-norm of a vector.
template<typename LHS , typename RHS , typename OP , typename T >
void norm_inf_impl (viennacl::vector_expression< LHS, RHS, OP > const &vec, scalar< T > &result)
 Computes the supremum norm of a vector - interface for a vector expression. Creates a temporary.
template<typename T >
void norm_inf_cpu (vector_base< T > const &vec, T &result)
 Computes the supremum-norm of a vector with final reduction on the CPU.
template<typename LHS , typename RHS , typename OP , typename S2 >
void norm_inf_cpu (viennacl::vector_expression< LHS, RHS, OP > const &vec, S2 &result)
 Computes the supremum norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary.
template<typename T , typename F >
void norm_frobenius_impl (matrix_base< T, F > const &A, scalar< T > &result)
 Computes the Frobenius norm of a matrix - dispatcher interface.
template<typename T , typename F >
void norm_frobenius_cpu (matrix_base< T, F > const &A, T &result)
 Computes the Frobenius norm of a vector with final reduction on the CPU.
template<typename T >
vcl_size_t index_norm_inf (vector_base< T > const &vec)
 Computes the index of the first entry that is equal to the supremum-norm in modulus.
template<typename LHS , typename RHS , typename OP >
vcl_size_t index_norm_inf (viennacl::vector_expression< LHS, RHS, OP > const &vec)
 Computes the supremum norm of a vector with final reduction on the CPU - interface for a vector expression. Creates a temporary.
template<typename NumericT , typename F >
void prod_impl (const matrix_base< NumericT, F > &mat, const vector_base< NumericT > &vec, vector_base< NumericT > &result)
 Carries out matrix-vector multiplication.
template<typename NumericT , typename F >
void prod_impl (const matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_trans > &mat_trans, const vector_base< NumericT > &vec, vector_base< NumericT > &result)
 Carries out matrix-vector multiplication with a transposed matrix.
template<typename SparseMatrixType , class SCALARTYPE , unsigned int ALIGNMENT>
viennacl::enable_if
< viennacl::is_any_sparse_matrix
< SparseMatrixType >::value,
vector_expression< const
SparseMatrixType, const vector
< SCALARTYPE, ALIGNMENT >
, op_prod > >::type 
prod_impl (const SparseMatrixType &mat, const vector< SCALARTYPE, ALIGNMENT > &vec)

Detailed Description

This file provides the forward declarations for the main types used within ViennaCL.