10#ifndef EIGEN_STABLENORM_H
11#define EIGEN_STABLENORM_H
17template<
typename ExpressionType,
typename Scalar>
20 Scalar maxCoeff =
bl.cwiseAbs().maxCoeff();
42 else if(maxCoeff!=maxCoeff)
53template<
typename VectorType,
typename RealScalar>
56 typedef typename VectorType::Scalar
Scalar;
70 typename VectorTypeCopyClean::ConstSegmentReturnType>::type
SegmentWrapper;
80template<
typename VectorType>
81typename VectorType::RealScalar
90 return abs(vec.coeff(0));
92 typedef typename VectorType::RealScalar
RealScalar;
102template<
typename MatrixType>
103typename MatrixType::RealScalar
108 typedef typename MatrixType::RealScalar
RealScalar;
118template<
typename Derived>
122 typedef typename Derived::RealScalar
RealScalar;
135 static const int ibeta = std::numeric_limits<RealScalar>::radix;
147 const Derived& vec(
_vec.derived());
154 for(
Index j=0;
j<vec.outerSize(); ++
j)
156 for(
typename Derived::InnerIterator iter(vec,
j); iter; ++iter)
211template<
typename Derived>
212inline typename NumTraits<typename internal::traits<Derived>::Scalar>
::Real
227template<
typename Derived>
239template<
typename Derived>
int n
Definition BiCGSTAB_simple.cpp:1
#define EIGEN_STACK_ALLOCATION_LIMIT
Definition Macros.h:54
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseAbsReturnType cwiseAbs() const
Definition MatrixCwiseUnaryOps.h:33
MatrixXf mat
Definition Tutorial_AdvancedInitialization_CommaTemporary.cpp:1
Scalar Scalar int size
Definition benchVecAdd.cpp:17
SCALAR Scalar
Definition bench_gemm.cpp:46
NumTraits< Scalar >::Real RealScalar
Definition bench_gemm.cpp:47
MatrixXf MatrixType
Definition benchmark-blocking-sizes.cpp:52
mp::number< mp::cpp_dec_float< 100 >, mp::et_on > Real
Definition boostmultiprec.cpp:78
RealScalar blueNorm() const
Definition StableNorm.h:229
RealScalar hypotNorm() const
Definition StableNorm.h:241
RealScalar stableNorm() const
Definition StableNorm.h:213
Definition TensorRef.h:81
#define abs(x)
Definition datatypes.h:17
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics scale
Definition gnuplot_common_settings.hh:54
const unsigned int DirectAccessBit
Definition Constants.h:155
int EIGEN_BLAS_FUNC() copy(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy)
Definition level1_impl.h:29
Derived::RealScalar relerr(const MatrixBase< Derived > &A, const MatrixBase< OtherDerived > &B)
Definition matrix_functions.h:64
VectorType::RealScalar stable_norm_impl(const VectorType &vec, typename enable_if< VectorType::IsVectorAtCompileTime >::type *=0)
Definition StableNorm.h:82
void stable_norm_impl_inner_step(const VectorType &vec, RealScalar &ssq, RealScalar &scale, RealScalar &invScale)
Definition StableNorm.h:54
void stable_norm_kernel(const ExpressionType &bl, Scalar &ssq, Scalar &scale, Scalar &invScale)
Definition StableNorm.h:18
NumTraits< typenametraits< Derived >::Scalar >::Real blueNorm_impl(const EigenBase< Derived > &_vec)
Definition StableNorm.h:120
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T maxi(const T &x, const T &y)
Definition MathFunctions.h:1091
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T mini(const T &x, const T &y)
Definition MathFunctions.h:1083
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE internal::enable_if< NumTraits< T >::IsSigned||NumTraits< T >::IsComplex, typenameNumTraits< T >::Real >::type abs(const T &x)
Definition MathFunctions.h:1509
EIGEN_DEVICE_FUNC bool abs2(bool x)
Definition MathFunctions.h:1292
Namespace containing all symbols from the Eigen library.
Definition bench_norm.cpp:85
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
Definition BandTriangularSolver.h:13
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition NumTraits.h:233
Definition CoreEvaluators.h:91
Definition ForwardDeclarations.h:17
std::ptrdiff_t j
Definition tut_arithmetic_redux_minmax.cpp:2