Implementations of NMF 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 | |
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 |
#define | VIENNACL_INNER_PROD_IMPL_1(RESULTSCALART, TEMPSCALART) |
#define | VIENNACL_INNER_PROD_IMPL_2(RESULTSCALART) |
#define | VIENNACL_NORM_1_IMPL_1(RESULTSCALART, TEMPSCALART) |
#define | VIENNACL_NORM_1_IMPL_2(RESULTSCALART, TEMPSCALART) |
#define | VIENNACL_NORM_2_IMPL_1(RESULTSCALART, TEMPSCALART) |
#define | VIENNACL_NORM_2_IMPL_2(RESULTSCALART, TEMPSCALART) |
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 DestNumericT , typename SrcNumericT > | |
void | viennacl::linalg::host_based::convert (vector_base< DestNumericT > &dest, vector_base< SrcNumericT > const &src) |
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 minimum of a vector. More... | |
template<typename NumericT , typename ScalarT > | |
void | viennacl::linalg::host_based::sum_impl (vector_base< NumericT > const &vec1, ScalarT &result) |
Computes the sum of all elements from the 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... | |
template<typename NumericT > | |
void | viennacl::linalg::host_based::detail::vector_scan_impl (vector_base< NumericT > const &vec1, vector_base< NumericT > &vec2, bool is_inclusive) |
Implementation of inclusive_scan and exclusive_scan for the host (OpenMP) backend. More... | |
template<typename NumericT > | |
void | viennacl::linalg::host_based::inclusive_scan (vector_base< NumericT > const &vec1, vector_base< NumericT > &vec2) |
This function implements an inclusive scan on the host using OpenMP. More... | |
template<typename NumericT > | |
void | viennacl::linalg::host_based::exclusive_scan (vector_base< NumericT > const &vec1, vector_base< NumericT > &vec2) |
This function implements an exclusive scan on the host using OpenMP. More... | |
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.
#define VIENNACL_INNER_PROD_IMPL_1 | ( | RESULTSCALART, | |
TEMPSCALART | |||
) |
Definition at line 405 of file vector_operations.hpp.
#define VIENNACL_INNER_PROD_IMPL_2 | ( | RESULTSCALART | ) |
Definition at line 410 of file vector_operations.hpp.
#define VIENNACL_NORM_1_IMPL_1 | ( | RESULTSCALART, | |
TEMPSCALART | |||
) |
Definition at line 558 of file vector_operations.hpp.
#define VIENNACL_NORM_1_IMPL_2 | ( | RESULTSCALART, | |
TEMPSCALART | |||
) |
Definition at line 562 of file vector_operations.hpp.
#define VIENNACL_NORM_2_IMPL_1 | ( | RESULTSCALART, | |
TEMPSCALART | |||
) |
Definition at line 667 of file vector_operations.hpp.
#define VIENNACL_NORM_2_IMPL_2 | ( | RESULTSCALART, | |
TEMPSCALART | |||
) |
Definition at line 671 of file vector_operations.hpp.
#define VIENNACL_OPENMP_VECTOR_MIN_SIZE 5000 |
Definition at line 45 of file vector_operations.hpp.