C-XSC - A C++ Class Library for Extended Scientific Computing
2.5.4
|
26 #ifndef _CXSC_DOT_HPP_INCLUDED
27 #define _CXSC_DOT_HPP_INCLUDED
44 typedef d_otpr Dotprecision;
50 #include "ioflags.hpp"
57 template<
typename S,
typename T>
58 static inline void addDot( dotprecision&,
const S&,
const T&);
59 template<
typename S,
typename T>
60 static inline void addDot( cdotprecision&,
const S&,
const T&);
61 template<
typename S,
typename T>
62 static inline void addDot( cidotprecision&,
const S&,
const T&);
63 template<
typename S,
typename T>
64 static inline void addDot_op( dotprecision&,
const S&,
const T&);
65 template<
typename S,
typename T>
66 static inline void addDot_op( cdotprecision&,
const S&,
const T&);
68 static inline void addSum( dotprecision&,
const S&);
82 #ifdef CXSC_USE_TLS_PREC
85 extern __declspec(thread)
unsigned int opdotprec;
87 extern __thread
unsigned int opdotprec;
92 extern unsigned int opdotprec;
129 inline int get_k()
const {
return k; }
131 inline void set_k(
unsigned int i) { k=i; }
278 template<
typename S,
typename T>
279 friend INLINE
void addDot(
dotprecision&,
const S&,
const T&);
280 template<
typename S,
typename T>
281 friend INLINE
void addDot(
cdotprecision&,
const S&,
const T&);
282 template<
typename S,
typename T>
285 template<
typename S,
typename T>
286 friend INLINE
void addDot_op(
dotprecision&,
const S&,
const T&);
287 template<
typename S,
typename T>
288 friend INLINE
void addDot_op(
cdotprecision&,
const S&,
const T&);
295 inline Dotprecision* ptr() {
return &akku; }
305 std::string & operator <<(std::string &,
const dotprecision &) noexcept;
306 std::string & operator >>(std::string &,dotprecision &) noexcept;
307 void operator >>(
const std::string &,dotprecision &) noexcept;
308 void operator >>(
const char *,dotprecision &) noexcept;
309 std::ostream & operator <<(std::ostream &,
const dotprecision &) noexcept;
310 std::istream & operator >>(std::istream &,dotprecision &) noexcept;
311 dotprecision operator -(
const dotprecision &) noexcept;
312 dotprecision operator +(
const dotprecision &) noexcept;
313 dotprecision operator +(
const dotprecision &,
const dotprecision &) noexcept;
314 dotprecision operator -(
const dotprecision &,
const dotprecision &) noexcept;
315 inline idotprecision operator |(
const dotprecision &,
const dotprecision &) noexcept;
316 dotprecision operator +(
const dotprecision &,
const real &) noexcept;
317 dotprecision operator +(
const real &,
const dotprecision &) noexcept;
318 dotprecision operator -(
const dotprecision &,
const real &) noexcept;
319 dotprecision operator -(
const real &,
const dotprecision &) noexcept;
320 inline idotprecision operator |(
const real &,
const dotprecision &) noexcept;
321 inline idotprecision operator |(
const dotprecision &,
const real &) noexcept;
322 dotprecision &
operator +=(dotprecision &,
const dotprecision &) noexcept;
323 dotprecision & operator -=(dotprecision &,
const dotprecision &) noexcept;
324 dotprecision &
operator +=(dotprecision &,
const real &) noexcept;
325 dotprecision & operator -=(dotprecision &,
const real &) noexcept;
326 bool operator !(
const dotprecision &) noexcept;
327 bool operator ==(
const dotprecision &,
const dotprecision &) noexcept;
328 bool operator !=(
const dotprecision &,
const dotprecision &) noexcept;
329 bool operator <(
const dotprecision &,
const dotprecision &) noexcept;
330 bool operator >(
const dotprecision &,
const dotprecision &) noexcept;
331 bool operator <=(
const dotprecision &,
const dotprecision &) noexcept;
332 bool operator >=(
const dotprecision &,
const dotprecision &) noexcept;
333 bool operator ==(
const real &,
const dotprecision &) noexcept;
334 bool operator !=(
const real &,
const dotprecision &) noexcept;
335 bool operator <(
const real &,
const dotprecision &) noexcept;
336 bool operator >(
const real &,
const dotprecision &) noexcept;
337 bool operator <=(
const real &,
const dotprecision &) noexcept;
338 bool operator >=(
const real &,
const dotprecision &) noexcept;
339 bool operator ==(
const dotprecision &,
const real &) noexcept;
340 bool operator !=(
const dotprecision &,
const real &) noexcept;
341 bool operator <(
const dotprecision &,
const real &) noexcept;
342 bool operator >(
const dotprecision &,
const real &) noexcept;
343 bool operator <=(
const dotprecision &,
const real &) noexcept;
344 bool operator >=(
const dotprecision &,
const real &) noexcept;
345 void rnd (
const dotprecision&, real&, rndtype = RND_NEXT) noexcept;
346 void rnd (
const dotprecision&, real&, real&) noexcept;
347 void rnd (
const dotprecision&, interval&) noexcept;
348 real rnd (
const dotprecision&, rndtype = RND_NEXT) noexcept;
349 dotprecision
abs(
const dotprecision &) noexcept;
350 int sign(
const dotprecision &) noexcept;
351 dotprecision & accumulate (dotprecision&,
const real&,
const real&) noexcept;
357 #endif // _CXSC_DOT_HPP_INCLUDED
friend std::string & operator>>(std::string &, dotprecision &) noexcept
Implementation of standard input method.
friend std::string & operator<<(std::string &, const dotprecision &) noexcept
Implementation of standard output method.
friend bool operator==(const dotprecision &, const dotprecision &) noexcept
Implementation of standard equality operation.
friend dotprecision abs(const dotprecision &) noexcept
The absolute value of a dotprecision value.
friend dotprecision _dotprecision(const real &d) noexcept
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
The Scalar Type interval.
dotprecision _dotprecision(const real &d) noexcept
friend dotprecision operator+(const dotprecision &) noexcept
Implementation of standard algebraic positive sign operation.
friend bool operator>=(const dotprecision &, const dotprecision &) noexcept
Implementation of standard greater-or-equal-than operation.
ivector abs(const cimatrix_subv &mv) noexcept
Returns the absolute value of the matrix.
void set_dotprec(unsigned int i)
Set precision for computation of dot products.
The Data Type idotprecision.
friend bool operator!=(const dotprecision &, const dotprecision &) noexcept
Implementation of standard negated equality operation.
friend idotprecision operator|(const dotprecision &, const dotprecision &) noexcept
Returns the convex hull of the arguments.
friend void rnd(const dotprecision &, real &, rndtype) noexcept
Converting the exact dotprecision value with one rounding into a real value.
friend dotprecision & accumulate(dotprecision &, const real &, const real &) noexcept
The accurate scalar product of the last two arguments added to the value of the first argument.
friend bool operator!(const dotprecision &) noexcept
Implementation of standard negation operation.
friend bool operator<=(const dotprecision &, const dotprecision &) noexcept
Implementation of standard less-or-equal-than operation.
The Data Type dotprecision.
friend dotprecision & operator+=(dotprecision &, const dotprecision &) noexcept
Implementation of standard algebraic addition and allocation operation.
void set_err(real e)
Set the current error value, use with caution.
The Data Type cidotprecision.
void set_k(unsigned int i)
Set precision for computation of dot products.
The namespace cxsc, providing all functionality of the class library C-XSC.
friend dotprecision & operator-=(dotprecision &, const dotprecision &) noexcept
Implementation of standard algebraic subtraction and allocation operation.
dotprecision & operator=(const dotprecision &) noexcept
Implementation of standard assigning operator.
friend dotprecision & accumulate_approx(dotprecision &, const real &, const real &) noexcept
The accurate scalar product of the last two arguments added to the value of the first argument (no er...
cdotprecision & operator+=(cdotprecision &cd, const l_complex &lc) noexcept
Implementation of standard algebraic addition and allocation operation.
The Multiple-Precision Data Type l_real.
friend int sign(const dotprecision &) noexcept
The sign of a dotprecision value.
int get_k() const
Get currently set precision for computation of dot products.
The Data Type cdotprecision.
dotprecision(void) noexcept
Constructor of class dotprecision.
real get_err() const
Get the current error value (if dot products not computed in maximum precision)
friend bool operator>(const dotprecision &, const dotprecision &) noexcept
Implementation of standard greater-than operation.
friend dotprecision operator-(const dotprecision &) noexcept
Implementation of standard algebraic negative sign operation.
int get_dotprec() const
Get currently set precision for computation of dot products.
friend bool operator<(const dotprecision &, const dotprecision &) noexcept
Implementation of standard less-than operation.