ViennaCL - The Vienna Computing Library
1.5.1
|
Implementations of vector operations using OpenCL. More...
#include <cmath>
#include "viennacl/forwards.h"
#include "viennacl/ocl/device.hpp"
#include "viennacl/ocl/handle.hpp"
#include "viennacl/ocl/kernel.hpp"
#include "viennacl/scalar.hpp"
#include "viennacl/tools/tools.hpp"
#include "viennacl/linalg/opencl/common.hpp"
#include "viennacl/linalg/opencl/kernels/vector.hpp"
#include "viennacl/linalg/opencl/kernels/vector_element.hpp"
#include "viennacl/meta/predicate.hpp"
#include "viennacl/meta/enable_if.hpp"
#include "viennacl/traits/size.hpp"
#include "viennacl/traits/start.hpp"
#include "viennacl/traits/handle.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::opencl |
Holds all routines providing OpenCL linear algebra operations. | |
namespace | viennacl::linalg::opencl::detail |
Helper functions for OpenCL-accelerated linear algebra operations. | |
Functions | |
template<typename T , typename ScalarType1 > | |
void | av (vector_base< T > &vec1, vector_base< T > const &vec2, ScalarType1 const &alpha, vcl_size_t len_alpha, 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 len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< T > const &vec3, ScalarType2 const &beta, vcl_size_t len_beta, 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 len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, vector_base< T > const &vec3, ScalarType2 const &beta, vcl_size_t len_beta, 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 unary element-wise operations v1 = OP(v2) | |
template<typename T > | |
void | inner_prod_impl (vector_base< T > const &vec1, vector_base< T > const &vec2, vector_base< T > &partial_result) |
Computes the partial 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 &vec1, vector_base< T > const &vec2, scalar< T > &result) |
Computes the inner product of two vectors - implementation. Library users should call inner_prod(vec1, vec2). | |
template<typename ScalarT > | |
viennacl::ocl::packed_cl_uint | make_layout (vector_base< ScalarT > const &vec) |
template<typename T > | |
void | inner_prod_impl (vector_base< T > const &x, vector_tuple< T > const &vec_tuple, vector_base< T > &result) |
Computes multiple inner products where one argument is common to all inner products. <x, y1>, <x, y2>, ..., <x, yN> | |
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 - implementation. Library users should call inner_prod(vec1, vec2). | |
template<typename T > | |
void | norm_reduction_impl (vector_base< T > const &vec, vector_base< T > &partial_result, cl_uint norm_id) |
Computes the partial work group results for vector norms. | |
template<typename T > | |
void | norm_1_impl (vector_base< T > const &vec, scalar< T > &result) |
Computes the l^1-norm of a vector. | |
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 CPU. | |
template<typename T > | |
void | norm_2_impl (vector_base< T > const &vec, scalar< T > &result) |
Computes the l^2-norm of a vector - implementation using OpenCL summation at second step. | |
template<typename T > | |
void | norm_2_cpu (vector_base< T > const &vec, T &result) |
Computes the l^1-norm of a vector with final reduction on CPU. | |
template<typename T > | |
void | norm_inf_impl (vector_base< T > const &vec, scalar< T > &result) |
Computes the supremum-norm of a vector. | |
template<typename T > | |
void | norm_inf_cpu (vector_base< T > const &vec, T &result) |
Computes the supremum-norm of a vector. | |
template<typename T > | |
cl_uint | 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 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 OpenCL.