Namespaces | Functions

/data/development/ViennaCL/ViennaCL-1.1.2/viennacl/linalg/vector_operations.hpp File Reference

Implementations of vector operations. More...

#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/kernels/vector_kernels.h"

Go to the source code of this file.

Namespaces

namespace  viennacl
namespace  viennacl::linalg

Functions

template<class SCALARTYPE , unsigned int ALIGNMENT>
void add (const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec1, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec2, viennacl::vector< SCALARTYPE, ALIGNMENT > &result)
 Addition of two vectors. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void inplace_add (viennacl::vector< SCALARTYPE, ALIGNMENT > &vec1, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec2)
 Inplace addition of two vectors. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void sub (const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec1, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec2, viennacl::vector< SCALARTYPE, ALIGNMENT > &result)
 Subtraction of two vectors. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void inplace_sub (viennacl::vector< SCALARTYPE, ALIGNMENT > &vec1, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec2)
 Inplace addition of two vectors. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void mult (const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec, scalar< SCALARTYPE > const &alpha, viennacl::vector< SCALARTYPE, ALIGNMENT > &result)
 Scales a vector. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void mult (const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec, SCALARTYPE alpha, viennacl::vector< SCALARTYPE, ALIGNMENT > &result)
 Scales a vector. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void inplace_mult (viennacl::vector< SCALARTYPE, ALIGNMENT > &vec, scalar< SCALARTYPE > const &alpha)
 Scales a vector inplace. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void inplace_mult (viennacl::vector< SCALARTYPE, ALIGNMENT > &vec, SCALARTYPE alpha)
 Scales a vector inplace. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void divide (const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec, scalar< SCALARTYPE > const &alpha, viennacl::vector< SCALARTYPE, ALIGNMENT > &result)
 Scales a vector. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void inplace_divide (viennacl::vector< SCALARTYPE, ALIGNMENT > &vec, scalar< SCALARTYPE > const &alpha)
 Scales a vector inplace. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void mul_add (const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec1, scalar< SCALARTYPE > const &alpha, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec2, viennacl::vector< SCALARTYPE, ALIGNMENT > &result)
 Multiply-add operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void mul_add (const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec1, SCALARTYPE alpha, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec2, viennacl::vector< SCALARTYPE, ALIGNMENT > &result)
 Multiply-add operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void inplace_mul_add (viennacl::vector< SCALARTYPE, ALIGNMENT > &vec1, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec2, scalar< SCALARTYPE > const &alpha)
 Inplace Multiply-add operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void inplace_mul_add (viennacl::vector< SCALARTYPE, ALIGNMENT > &vec1, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec2, SCALARTYPE alpha)
 Inplace Multiply-add operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void mul_sub (const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec1, scalar< SCALARTYPE > const &alpha, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec2, viennacl::vector< SCALARTYPE, ALIGNMENT > &result)
 Multiply-subtract operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void inplace_mul_sub (viennacl::vector< SCALARTYPE, ALIGNMENT > &vec1, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec2, scalar< SCALARTYPE > const &alpha)
 Inplace Multiply-subtract operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void inplace_div_add (viennacl::vector< SCALARTYPE, ALIGNMENT > &vec1, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec2, scalar< SCALARTYPE > const &alpha)
 Inplace divide-add operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void inplace_div_sub (viennacl::vector< SCALARTYPE, ALIGNMENT > &vec1, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec2, scalar< SCALARTYPE > const &alpha)
 Inplace divide-subtract operation. Try to use the overloaded operators for vector instead, unless you want to fine-tune the number of GPU threads involved.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void inner_prod_impl (const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec1, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec2, scalar< SCALARTYPE > &result)
 Computes the inner product of two vectors - implementation. Library users should call inner_prod(vec1, vec2).
template<class SCALARTYPE , unsigned int ALIGNMENT1, unsigned int ALIGNMENT2>
viennacl::scalar_expression
< const viennacl::vector
< SCALARTYPE, ALIGNMENT1 >
, const viennacl::vector
< SCALARTYPE, ALIGNMENT2 >
, viennacl::op_inner_prod > 
inner_prod_impl (const viennacl::vector< SCALARTYPE, ALIGNMENT1 > &vec1, const viennacl::vector< SCALARTYPE, ALIGNMENT2 > &vec2)
 Computes the inner product of two vectors.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void norm_1_impl (const viennacl::vector< SCALARTYPE, ALIGNMENT > &vcl_vec, scalar< SCALARTYPE > &result)
 Computes the l^1-norm of a vector.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void norm_2_impl (const viennacl::vector< SCALARTYPE, ALIGNMENT > &vcl_vec, scalar< SCALARTYPE > &result)
 Computes the l^2-norm of a vector - implementation.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void norm_inf_impl (const viennacl::vector< SCALARTYPE, ALIGNMENT > &vcl_vec, scalar< SCALARTYPE > &result)
 Computes the supremum-norm of a vector.
template<class SCALARTYPE , unsigned int ALIGNMENT>
cl_uint index_norm_inf (const viennacl::vector< SCALARTYPE, ALIGNMENT > &vcl_vec)
 Computes the index of the first entry that is equal to the supremum-norm in modulus.
template<class SCALARTYPE , unsigned int ALIGNMENT>
void plane_rotation (viennacl::vector< SCALARTYPE, ALIGNMENT > &vec1, const viennacl::vector< SCALARTYPE, ALIGNMENT > &vec2, SCALARTYPE alpha, SCALARTYPE beta)
 Computes a plane rotation of two vectors.

Detailed Description

Implementations of vector operations.