1 #ifndef VIENNACL_LINALG_NORM_INF_HPP_
2 #define VIENNACL_LINALG_NORM_INF_HPP_
41 #ifdef VIENNACL_WITH_UBLAS
45 template<
typename VectorT >
47 typename VectorT::value_type
59 template<
typename T,
typename A >
64 for (
typename std::vector<T, A>::size_type i=0; i<v1.size(); ++i)
66 if (std::fabs(v1[i]) > result)
67 result = std::fabs(v1[i]);
76 template<
typename ScalarType>
84 const viennacl::vector_base<ScalarType>,
89 template<
typename LHS,
typename RHS,
typename OP>
93 norm_inf(viennacl::vector_expression<const LHS, const RHS, OP>
const &
vector)
96 const viennacl::vector_expression<const LHS, const RHS, OP>,
Simple enable-if variant that uses the SFINAE pattern.
Dispatch facility for distinguishing between ublas, STL and ViennaCL types.
This file provides the forward declarations for the main types used within ViennaCL.
A proxy for scalar expressions (e.g. from inner vector products)
An expression template class that represents a binary operation that yields a vector.
Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
viennacl::vector< float > v1
T norm_inf(std::vector< T, A > const &v1)
viennacl::scalar_expression< const viennacl::vector_expression< const LHS, const RHS, OP >, const viennacl::vector_expression< const LHS, const RHS, OP >, viennacl::op_norm_inf > norm_inf(viennacl::vector_expression< const LHS, const RHS, OP > const &vector)
A tag class representing the inf-norm of a vector.
Simple enable-if variant that uses the SFINAE pattern.