ViennaCL - The Vienna Computing Library
1.5.2
|
Implementations of vector operations using a plain single-threaded or OpenMP-enabled execution on CPU. More...
#include <cmath>
#include <algorithm>
#include "viennacl/forwards.h"
#include "viennacl/scalar.hpp"
#include "viennacl/tools/tools.hpp"
#include "viennacl/meta/predicate.hpp"
#include "viennacl/meta/enable_if.hpp"
#include "viennacl/traits/size.hpp"
#include "viennacl/traits/start.hpp"
#include "viennacl/linalg/host_based/common.hpp"
#include "viennacl/linalg/detail/op_applier.hpp"
#include "viennacl/traits/stride.hpp"
Go to the source code of this file.
Namespaces | |
namespace | viennacl |
Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them. | |
namespace | viennacl::linalg |
Provides all linear algebra operations which are not covered by operator overloads. | |
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. | |
Defines | |
#define | VIENNACL_OPENMP_VECTOR_MIN_SIZE 5000 |
Functions | |
template<typename NumericT > | |
NumericT | flip_sign (NumericT val) |
unsigned long | flip_sign (unsigned long val) |
unsigned int | flip_sign (unsigned int val) |
unsigned short | flip_sign (unsigned short val) |
unsigned char | flip_sign (unsigned char val) |
template<typename T , typename ScalarType1 > | |
void | av (vector_base< T > &vec1, vector_base< T > const &vec2, ScalarType1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha) |
template<typename T , typename ScalarType1 , typename ScalarType2 > | |
void | avbv (vector_base< T > &vec1, vector_base< T > const &vec2, ScalarType1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< T > const &vec3, ScalarType2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta) |
template<typename T , typename ScalarType1 , typename ScalarType2 > | |
void | avbv_v (vector_base< T > &vec1, vector_base< T > const &vec2, ScalarType1 const &alpha, vcl_size_t, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< T > const &vec3, ScalarType2 const &beta, vcl_size_t, bool reciprocal_beta, bool flip_sign_beta) |
template<typename T > | |
void | vector_assign (vector_base< T > &vec1, const T &alpha, bool up_to_internal_size=false) |
Assign a constant value to a vector (-range/-slice) | |
template<typename T > | |
void | vector_swap (vector_base< T > &vec1, vector_base< T > &vec2) |
Swaps the contents of two vectors, data is copied. | |
template<typename T , typename OP > | |
void | element_op (vector_base< T > &vec1, vector_expression< const vector_base< T >, const vector_base< T >, op_element_binary< OP > > const &proxy) |
Implementation of the element-wise operation v1 = v2 .* v3 and v1 = v2 ./ v3 (using MATLAB syntax) | |
template<typename T , typename OP > | |
void | element_op (vector_base< T > &vec1, vector_expression< const vector_base< T >, const vector_base< T >, op_element_unary< OP > > const &proxy) |
Implementation of the element-wise operation v1 = v2 .* v3 and v1 = v2 ./ v3 (using MATLAB syntax) | |
template<typename T , typename S3 > | |
void | inner_prod_impl (vector_base< T > const &vec1, vector_base< T > const &vec2, S3 &result) |
Computes the inner product of two vectors - implementation. Library users should call inner_prod(vec1, vec2). | |
template<typename T > | |
void | inner_prod_impl (vector_base< T > const &x, vector_tuple< T > const &vec_tuple, vector_base< T > &result) |
template<typename T , typename S2 > | |
void | norm_1_impl (vector_base< T > const &vec1, S2 &result) |
Computes the l^1-norm of a vector. | |
template<typename T , typename S2 > | |
void | norm_2_impl (vector_base< T > const &vec1, S2 &result) |
Computes the l^2-norm of a vector - implementation. | |
template<typename T , typename S2 > | |
void | norm_inf_impl (vector_base< T > const &vec1, S2 &result) |
Computes the supremum-norm of a vector. | |
template<typename T > | |
vcl_size_t | index_norm_inf (vector_base< T > const &vec1) |
Computes the index of the first entry that is equal to the supremum-norm in modulus. | |
template<typename T > | |
void | plane_rotation (vector_base< T > &vec1, vector_base< T > &vec2, T alpha, T beta) |
Computes a plane rotation of two vectors. |
Implementations of vector operations using a plain single-threaded or OpenMP-enabled execution on CPU.
#define VIENNACL_OPENMP_VECTOR_MIN_SIZE 5000 |