Implementations of NMF operations using OpenCL. More...
#include <cmath>
#include "viennacl/forwards.h"
#include "viennacl/detail/vector_def.hpp"
#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/linalg/opencl/kernels/scan.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 | |
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::opencl | |
Holds all routines providing OpenCL linear algebra operations. | |
viennacl::linalg::opencl::detail | |
Helper functions for OpenCL-accelerated linear algebra operations. | |
Functions | |
template<typename DestNumericT , typename SrcNumericT > | |
void | viennacl::linalg::opencl::convert (vector_base< DestNumericT > &dest, vector_base< SrcNumericT > const &src) |
template<typename T , typename ScalarType1 > | |
void | viennacl::linalg::opencl::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 | viennacl::linalg::opencl::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 | viennacl::linalg::opencl::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 | viennacl::linalg::opencl::vector_assign (vector_base< T > &vec1, const T &alpha, bool up_to_internal_size=false) |
Assign a constant value to a vector (-range/-slice) More... | |
template<typename T > | |
void | viennacl::linalg::opencl::vector_swap (vector_base< T > &vec1, vector_base< T > &vec2) |
Swaps the contents of two vectors, data is copied. More... | |
template<typename T , typename OP > | |
void | viennacl::linalg::opencl::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) More... | |
template<typename T , typename OP > | |
void | viennacl::linalg::opencl::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) More... | |
template<typename T > | |
void | viennacl::linalg::opencl::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). More... | |
template<typename T > | |
void | viennacl::linalg::opencl::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). More... | |
template<typename NumericT > | |
viennacl::ocl::packed_cl_uint | viennacl::linalg::opencl::detail::make_layout (vector_base< NumericT > const &vec) |
template<typename NumericT > | |
void | viennacl::linalg::opencl::inner_prod_impl (vector_base< NumericT > const &x, vector_tuple< NumericT > const &vec_tuple, vector_base< NumericT > &result) |
Computes multiple inner products where one argument is common to all inner products. <x, y1>, <x, y2>, ..., <x, yN> More... | |
template<typename T > | |
void | viennacl::linalg::opencl::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). More... | |
template<typename T > | |
void | viennacl::linalg::opencl::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. More... | |
template<typename T > | |
void | viennacl::linalg::opencl::norm_1_impl (vector_base< T > const &vec, scalar< T > &result) |
Computes the l^1-norm of a vector. More... | |
template<typename T > | |
void | viennacl::linalg::opencl::norm_1_cpu (vector_base< T > const &vec, T &result) |
Computes the l^1-norm of a vector with final reduction on CPU. More... | |
template<typename T > | |
void | viennacl::linalg::opencl::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. More... | |
template<typename T > | |
void | viennacl::linalg::opencl::norm_2_cpu (vector_base< T > const &vec, T &result) |
Computes the l^1-norm of a vector with final reduction on CPU. More... | |
template<typename T > | |
void | viennacl::linalg::opencl::norm_inf_impl (vector_base< T > const &vec, scalar< T > &result) |
Computes the supremum-norm of a vector. More... | |
template<typename T > | |
void | viennacl::linalg::opencl::norm_inf_cpu (vector_base< T > const &vec, T &result) |
Computes the supremum-norm of a vector. More... | |
template<typename T > | |
cl_uint | viennacl::linalg::opencl::index_norm_inf (vector_base< T > const &vec) |
Computes the index of the first entry that is equal to the supremum-norm in modulus. More... | |
template<typename NumericT > | |
void | viennacl::linalg::opencl::max_impl (vector_base< NumericT > const &x, scalar< NumericT > &result) |
Computes the maximum value of a vector, where the result is stored in an OpenCL buffer. More... | |
template<typename NumericT > | |
void | viennacl::linalg::opencl::max_cpu (vector_base< NumericT > const &x, NumericT &result) |
Computes the maximum value of a vector, where the value is stored in a host value. More... | |
template<typename NumericT > | |
void | viennacl::linalg::opencl::min_impl (vector_base< NumericT > const &x, scalar< NumericT > &result) |
Computes the minimum of a vector, where the result is stored in an OpenCL buffer. More... | |
template<typename NumericT > | |
void | viennacl::linalg::opencl::min_cpu (vector_base< NumericT > const &x, NumericT &result) |
Computes the minimum of a vector, where the result is stored on a CPU scalar. More... | |
template<typename NumericT > | |
void | viennacl::linalg::opencl::sum_impl (vector_base< NumericT > const &x, scalar< NumericT > &result) |
Computes the sum over all entries of a vector. More... | |
template<typename NumericT > | |
void | viennacl::linalg::opencl::sum_cpu (vector_base< NumericT > const &x, NumericT &result) |
Computes the sum over all entries of a vector. More... | |
template<typename T > | |
void | viennacl::linalg::opencl::plane_rotation (vector_base< T > &vec1, vector_base< T > &vec2, T alpha, T beta) |
Computes a plane rotation of two vectors. More... | |
template<typename NumericT > | |
void | viennacl::linalg::opencl::detail::scan_impl (vector_base< NumericT > const &input, vector_base< NumericT > &output, bool is_inclusive) |
Worker routine for scan routines using OpenCL. More... | |
template<typename NumericT > | |
void | viennacl::linalg::opencl::inclusive_scan (vector_base< NumericT > const &input, vector_base< NumericT > &output) |
This function implements an inclusive scan using CUDA. More... | |
template<typename NumericT > | |
void | viennacl::linalg::opencl::exclusive_scan (vector_base< NumericT > const &input, vector_base< NumericT > &output) |
This function implements an exclusive scan using CUDA. More... | |
Implementations of NMF operations using OpenCL.
Implementations of vector operations using OpenCL.
Definition in file vector_operations.hpp.