ViennaCL - The Vienna Computing Library  1.6.0
Free open-source GPU-accelerated linear algebra and solver library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vector_operations.hpp File Reference

Implementations of NMF operations using a plain single-threaded or OpenMP-enabled execution on CPU. More...

Go to the source code of this file.

Namespaces

 viennacl
 Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
 
 viennacl::linalg
 Provides all linear algebra operations which are not covered by operator overloads.
 
 viennacl::linalg::host_based
 Holds all compute kernels with conventional host-based execution (buffers in CPU RAM).
 
 viennacl::linalg::host_based::detail
 Helper functions for the host-based linear algebra backend.
 

Macros

#define VIENNACL_OPENMP_VECTOR_MIN_SIZE   5000
 

Functions

template<typename NumericT >
NumericT viennacl::linalg::host_based::detail::flip_sign (NumericT val)
 
unsigned long viennacl::linalg::host_based::detail::flip_sign (unsigned long val)
 
unsigned int viennacl::linalg::host_based::detail::flip_sign (unsigned int val)
 
unsigned short viennacl::linalg::host_based::detail::flip_sign (unsigned short val)
 
unsigned char viennacl::linalg::host_based::detail::flip_sign (unsigned char val)
 
template<typename NumericT , typename ScalarT1 >
void viennacl::linalg::host_based::av (vector_base< NumericT > &vec1, vector_base< NumericT > const &vec2, ScalarT1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha)
 
template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void viennacl::linalg::host_based::avbv (vector_base< NumericT > &vec1, vector_base< NumericT > const &vec2, ScalarT1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< NumericT > const &vec3, ScalarT2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename NumericT , typename ScalarT1 , typename ScalarT2 >
void viennacl::linalg::host_based::avbv_v (vector_base< NumericT > &vec1, vector_base< NumericT > const &vec2, ScalarT1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< NumericT > const &vec3, ScalarT2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta)
 
template<typename NumericT >
void viennacl::linalg::host_based::vector_assign (vector_base< NumericT > &vec1, const NumericT &alpha, bool up_to_internal_size=false)
 Assign a constant value to a vector (-range/-slice) More...
 
template<typename NumericT >
void viennacl::linalg::host_based::vector_swap (vector_base< NumericT > &vec1, vector_base< NumericT > &vec2)
 Swaps the contents of two vectors, data is copied. More...
 
template<typename NumericT , typename OpT >
void viennacl::linalg::host_based::element_op (vector_base< NumericT > &vec1, vector_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_element_binary< OpT > > const &proxy)
 Implementation of the element-wise operation v1 = v2 .* v3 and v1 = v2 ./ v3 (using MATLAB syntax) More...
 
template<typename NumericT , typename OpT >
void viennacl::linalg::host_based::element_op (vector_base< NumericT > &vec1, vector_expression< const vector_base< NumericT >, const vector_base< NumericT >, op_element_unary< OpT > > const &proxy)
 Implementation of the element-wise operation v1 = v2 .* v3 and v1 = v2 ./ v3 (using MATLAB syntax) More...
 
template<typename NumericT , typename ScalarT >
void viennacl::linalg::host_based::inner_prod_impl (vector_base< NumericT > const &vec1, vector_base< NumericT > const &vec2, ScalarT &result)
 Computes the inner product of two vectors - implementation. Library users should call inner_prod(vec1, vec2). More...
 
template<typename NumericT >
void viennacl::linalg::host_based::inner_prod_impl (vector_base< NumericT > const &x, vector_tuple< NumericT > const &vec_tuple, vector_base< NumericT > &result)
 
template<typename NumericT , typename ScalarT >
void viennacl::linalg::host_based::norm_1_impl (vector_base< NumericT > const &vec1, ScalarT &result)
 Computes the l^1-norm of a vector. More...
 
template<typename NumericT , typename ScalarT >
void viennacl::linalg::host_based::norm_2_impl (vector_base< NumericT > const &vec1, ScalarT &result)
 Computes the l^2-norm of a vector - implementation. More...
 
template<typename NumericT , typename ScalarT >
void viennacl::linalg::host_based::norm_inf_impl (vector_base< NumericT > const &vec1, ScalarT &result)
 Computes the supremum-norm of a vector. More...
 
template<typename NumericT >
vcl_size_t viennacl::linalg::host_based::index_norm_inf (vector_base< NumericT > const &vec1)
 Computes the index of the first entry that is equal to the supremum-norm in modulus. More...
 
template<typename NumericT , typename ScalarT >
void viennacl::linalg::host_based::max_impl (vector_base< NumericT > const &vec1, ScalarT &result)
 Computes the maximum of a vector. More...
 
template<typename NumericT , typename ScalarT >
void viennacl::linalg::host_based::min_impl (vector_base< NumericT > const &vec1, ScalarT &result)
 Computes the maximum of a vector. More...
 
template<typename NumericT >
void viennacl::linalg::host_based::plane_rotation (vector_base< NumericT > &vec1, vector_base< NumericT > &vec2, NumericT alpha, NumericT beta)
 Computes a plane rotation of two vectors. More...
 

Detailed Description

Implementations of NMF operations using a plain single-threaded or OpenMP-enabled execution on CPU.

Implementations of vector operations using a plain single-threaded or OpenMP-enabled execution on CPU.

Definition in file vector_operations.hpp.

Macro Definition Documentation

#define VIENNACL_OPENMP_VECTOR_MIN_SIZE   5000

Definition at line 42 of file vector_operations.hpp.