CMS 3D CMS Logo

Classes | Namespaces | Defines | Functions | Variables

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/DataFormats/Math/interface/VDTMath.h File Reference

#include <iostream>
#include <cmath>
#include <limits>

Go to the source code of this file.

Classes

union  vdt::ieee754
 Used to switch between different type of interpretations of the data (64 bits) More...

Namespaces

namespace  vdt

Defines

#define CMS_VECTORIZE
#define CMS_VECTORIZE_VERBOSE
#define FAST_VECT_FUNC(NAME)
#define VDT_FORCE_INLINE   __attribute__((always_inline)) inline
#define VDT_RESTRICT
#define VECT_FUNC(NAME)

Functions

VDT_FORCE_INLINE unsigned long long vdt::d2ll (double x)
 Converts a double to an unsigned long long.
VDT_FORCE_INLINE double vdt::fast_acos (double x)
VDT_FORCE_INLINE double vdt::fast_approx_inv (double x)
VDT_FORCE_INLINE double vdt::fast_approx_isqrt (double x)
VDT_FORCE_INLINE double vdt::fast_asin (double x)
VDT_FORCE_INLINE double vdt::fast_atan (double x)
VDT_FORCE_INLINE double vdt::fast_cos (double x)
 Cos defined between -2pi and 2pi.
VDT_FORCE_INLINE double vdt::fast_exp (double x)
 Exponential Function.
void vdt::fast_exp_vect_46 (double const *input, double *output, const unsigned int arr_size)
 Some tweaks to make it vectorise with gcc46.
VDT_FORCE_INLINE double vdt::fast_inv (double x)
VDT_FORCE_INLINE double vdt::fast_isqrt (double x)
VDT_FORCE_INLINE double vdt::fast_isqrt_general (double x, const unsigned short ISQRT_ITERATIONS)
VDT_FORCE_INLINE double vdt::fast_log (double x)
void vdt::fast_log_vect_46 (double const *input, double *output, const unsigned int arr_size)
 Some tweaks to make it vectorise with gcc46.
VDT_FORCE_INLINE double vdt::fast_sin (double x)
 Sin defined between -2pi and 2pi.
VDT_FORCE_INLINE double vdt::fast_tan (double x)
 Sin defined between -2pi and 2pi.
VDT_FORCE_INLINE double vdt::getMantExponent (double x, double &fe)
 Like frexp but vectorising and the exponent is a double.
VDT_FORCE_INLINE double vdt::ll2d (unsigned long long x)
 Converts an unsigned long long to a double.
void vdt::print_instructions_info ()
 Print the instructions used on screen.
VDT_FORCE_INLINE double vdt::std_inv (double x)
VDT_FORCE_INLINE void vdt::std_inv_vect (double const *VDT_RESTRICT input, double *VDT_RESTRICT output, const unsigned int arr_size) CMS_VECTORIZE_VERBOSE
VDT_FORCE_INLINE double vdt::std_isqrt (double x)
VDT_FORCE_INLINE void vdt::std_isqrt_vect (double const *VDT_RESTRICT input, double *VDT_RESTRICT output, const unsigned int arr_size) CMS_VECTORIZE_VERBOSE

Variables

constexpr double vdt::ATAN_LIMIT = 1e307
constexpr double vdt::C1cos = -1.13585365213876817300E-11
constexpr double vdt::C1sin = 1.58962301576546568060E-10
constexpr double vdt::C2cos = 2.08757008419747316778E-9
constexpr double vdt::C2sin = -2.50507477628578072866E-8
constexpr double vdt::C3cos = -2.75573141792967388112E-7
constexpr double vdt::C3sin = 2.75573136213857245213E-6
constexpr double vdt::C4cos = 2.48015872888517045348E-5
constexpr double vdt::C4sin = -1.98412698295895385996E-4
constexpr double vdt::C5cos = -1.38888888888730564116E-3
constexpr double vdt::C5sin = 8.33333333332211858878E-3
constexpr double vdt::C6cos = 4.16666666666665929218E-2
constexpr double vdt::C6sin = -1.66666666666666307295E-1
constexpr double vdt::DP1sc = 7.85398125648498535156E-1
constexpr double vdt::DP1tan = 7.853981554508209228515625E-1
constexpr double vdt::DP2sc = 3.77489470793079817668E-8
constexpr double vdt::DP2tan = 7.94662735614792836714E-9
constexpr double vdt::DP3sc = 2.69515142907905952645E-15
constexpr double vdt::DP3tan = 3.06161699786838294307E-17
constexpr double vdt::EXP_LIMIT = 708.
constexpr double vdt::LOG2E = 1.4426950408889634073599
constexpr double vdt::LOG_LOWER_LIMIT = 1e-307
constexpr double vdt::LOG_UPPER_LIMIT = 1e307
constexpr double vdt::MOREBITS = 6.123233995736765886130E-17
constexpr double vdt::MOREBITSO2 = MOREBITS/2.
constexpr double vdt::PI = M_PI
constexpr double vdt::PIO2 = M_PI_2
constexpr double vdt::PIO4 = M_PI_4
constexpr double vdt::PX1asin = 4.253011369004428248960E-3
constexpr double vdt::PX1atan = -8.750608600031904122785E-1
constexpr double vdt::PX1exp = 1.26177193074810590878E-4
constexpr double vdt::PX1log = 1.01875663804580931796E-4
constexpr double vdt::PX1tan = -1.30936939181383777646E4
constexpr double vdt::PX2asin = -6.019598008014123785661E-1
constexpr double vdt::PX2atan = -1.615753718733365076637E1
constexpr double vdt::PX2exp = 3.02994407707441961300E-2
constexpr double vdt::PX2log = 4.97494994976747001425E-1
constexpr double vdt::PX2tan = 1.15351664838587416140E6
constexpr double vdt::PX3asin = 5.444622390564711410273E0
constexpr double vdt::PX3atan = -7.500855792314704667340E1
constexpr double vdt::PX3exp = 9.99999999999999999910E-1
constexpr double vdt::PX3log = 4.70579119878881725854E0
constexpr double vdt::PX3tan = -1.79565251976484877988E7
constexpr double vdt::PX4asin = -1.626247967210700244449E1
constexpr double vdt::PX4atan = -1.228866684490136173410E2
constexpr double vdt::PX4log = 1.44989225341610930846E1
constexpr double vdt::PX5asin = 1.956261983317594739197E1
constexpr double vdt::PX5atan = -6.485021904942025371773E1
constexpr double vdt::PX5log = 1.79368678507819816313E1
constexpr double vdt::PX6asin = -8.198089802484824371615E0
constexpr double vdt::PX6log = 7.70838733755885391666E0
constexpr double vdt::QX1asin = -1.474091372988853791896E1
constexpr double vdt::QX1atan = - 2.485846490142306297962E1
constexpr double vdt::QX1exp = 3.00198505138664455042E-6
constexpr double vdt::QX1log = 1.12873587189167450590E1
constexpr double vdt::QX1tan = 1.36812963470692954678E4
constexpr double vdt::QX2asin = 7.049610280856842141659E1
constexpr double vdt::QX2atan = 1.650270098316988542046E2
constexpr double vdt::QX2exp = 2.52448340349684104192E-3
constexpr double vdt::QX2log = 4.52279145837532221105E1
constexpr double vdt::QX2tan = -1.32089234440210967447E6
constexpr double vdt::QX3asin = -1.471791292232726029859E2
constexpr double vdt::QX3atan = 4.328810604912902668951E2
constexpr double vdt::QX3exp = 2.27265548208155028766E-1
constexpr double vdt::QX3log = 8.29875266912776603211E1
constexpr double vdt::QX3tan = 2.50083801823357915839E7
constexpr double vdt::QX4asin = 1.395105614657485689735E2
constexpr double vdt::QX4atan = 4.853903996359136964868E2
constexpr double vdt::QX4exp = 2.00000000000000000009E0
constexpr double vdt::QX4log = 7.11544750618563894466E1
constexpr double vdt::QX4tan = -5.38695755929454629881E7
constexpr double vdt::QX5asin = -4.918853881490881290097E1
constexpr double vdt::QX5atan = 1.945506571482613964425E2
constexpr double vdt::QX5log = 2.31251620126765340583E1
constexpr double vdt::RX1asin = 2.967721961301243206100E-3
constexpr double vdt::RX2asin = -5.634242780008963776856E-1
constexpr double vdt::RX3asin = 6.968710824104713396794E0
constexpr double vdt::RX4asin = -2.556901049652824852289E1
constexpr double vdt::RX5asin = 2.853665548261061424989E1
constexpr double vdt::SIN_LOWER_LIMIT = -SIN_UPPER_LIMIT
constexpr double vdt::SIN_UPPER_LIMIT = TWOPI
constexpr double vdt::SQRT_LIMIT = 1e307
constexpr double vdt::SQRTH = 0.70710678118654752440
constexpr double vdt::SX1asin = -2.194779531642920639778E1
constexpr double vdt::SX2asin = 1.470656354026814941758E2
constexpr double vdt::SX3asin = -3.838770957603691357202E2
constexpr double vdt::SX4asin = 3.424398657913078477438E2
constexpr double vdt::T3PO8 = 2.41421356237309504880
constexpr double vdt::TAN_LIMIT = TWOPI
constexpr double vdt::TWOPI = 2.*M_PI

Define Documentation

#define CMS_VECTORIZE

Definition at line 24 of file VDTMath.h.

#define CMS_VECTORIZE_VERBOSE

Definition at line 26 of file VDTMath.h.

#define FAST_VECT_FUNC (   NAME)
Value:
__attribute__((always_inline)) inline void NAME##_vect(double const * VDT_RESTRICT input , double * VDT_RESTRICT outupt, const unsigned int arr_size) { \
  for (unsigned int i=0;i<arr_size;++i) \
    outupt[i] = NAME ( input[i] ) CMS_VECTORIZE_VERBOSE; \
    }

Definition at line 802 of file VDTMath.h.

#define VDT_FORCE_INLINE   __attribute__((always_inline)) inline

Definition at line 30 of file VDTMath.h.

#define VDT_RESTRICT

Definition at line 28 of file VDTMath.h.

#define VECT_FUNC (   NAME)
Value:
__attribute__((always_inline)) inline void std_##NAME##_vect(double const * VDT_RESTRICT input , double* VDT_RESTRICT outupt, const unsigned int arr_size) { \
  for (unsigned int i=0;i<arr_size;++i) \
    outupt[i] = std::NAME ( input[i] ) CMS_VECTORIZE_VERBOSE; \
    }

Definition at line 851 of file VDTMath.h.