libosmscout  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
SSEMath.h File Reference
#include <osmscout/CoreFeatures.h>
#include <osmscout/system/Math.h>
#include <osmscout/system/SSEMathPublic.h>
#include <osmscout/system/Types.h>
#include <osmscout/private/Config.h>

Namespaces

 osmscout
 

Macros

#define _PS_CONST(Name)   extern const ALIGN16_BEG double _pd_##Name[2] ALIGN16_END
 
#define _PS_CONST_TYPE(Name, Type)   extern const ALIGN16_BEG Type _pd_##Name[2] ALIGN16_END
 
#define ARRAY2V2DF(name)   * reinterpret_cast<const v2df*>(name)
 
#define ARRAY2V2DI(name)   * reinterpret_cast<const v2di*>(name)
 
#define DECLARE_COEFFS(name)   extern const ALIGN16_BEG double name[] ALIGN16_END;
 
#define POLY_EVAL3(y, x, coeff)   POLY_EVAL3_HORNER(y, x, coeff)
 
#define POLY_EVAL3_HORNER(y, x, coeff)
 
#define POLY_EVAL3SINGLE(y, x, coeff)   POLY_EVAL3SINGLE_HORNER(y, x, coeff)
 
#define POLY_EVAL3SINGLE_HORNER(y, x, coeff)   y = coeff[0]; y = y*x + coeff[2]; y = y*x + coeff[4]; y = y*x + coeff[6]
 
#define POLY_EVAL6(y, x, coeff)   POLY_EVAL6_ESTRIN(y, x, coeff)
 
#define POLY_EVAL6_ESTRIN(y, x, coeff)
 
#define POLY_EVAL6_HORNER(y, x, coeff)
 
#define POLY_EVAL6SINGLE(y, x, coeff)   POLY_EVAL6SINGLE_ESTRIN(y, x, coeff)
 
#define POLY_EVAL6SINGLE_ESTRIN(y, x, coeff)
 
#define POLY_EVAL6SINGLE_HORNER(y, x, coeff)
 

Functions

 osmscout::_PS_CONST (1)
 
 osmscout::_PS_CONST (2)
 
 osmscout::_PS_CONST (0_5)
 
 osmscout::_PS_CONST (2OPI)
 
 osmscout::_PS_CONST (PIO2)
 
 osmscout::_PS_CONST (LOG_C_2)
 
 osmscout::_PS_CONST (0_66)
 
 osmscout::_PS_CONST (0_87)
 
 osmscout::_PS_CONST (1_74)
 
 osmscout::_PS_CONST (1_32)
 
 osmscout::_PS_CONST (log_inv_1_74)
 
 osmscout::_PS_CONST (log_inv_1_32)
 
 osmscout::_PS_CONST_TYPE (sign_mask, uint64_t)
 
 osmscout::_PS_CONST_TYPE (x01_double_mask, uint64_t)
 
 osmscout::_PS_CONST_TYPE (x03FE_double_mask, uint64_t)
 
 osmscout::_PS_CONST_TYPE (1_exp, uint64_t)
 
 osmscout::_PS_CONST_TYPE (f_fraction_mask, uint64_t)
 
 osmscout::_PS_CONST_TYPE (f_exp_mask, uint64_t)
 
 osmscout::_PS_CONST_TYPE (f_one_mask, uint64_t)
 
 osmscout::_PS_CONST_TYPE (1022, uint64_t)
 
v2df osmscout::atanh_pd (v2df x)
 
double osmscout::atanh_pd (double x)
 
double osmscout::atanh_pd (double x, double y, double &res_x, double &res_y)
 
v2df osmscout::atanh_sin_pd (v2df x)
 
double osmscout::atanh_sin_pd (double x)
 
double osmscout::atanh_sin_pd (double x, double y, double &res_x, double &res_y)
 
v2df osmscout::cos_pd (v2df x)
 
double osmscout::cos_pd (double x)
 
double osmscout::cos_pd (double x, double y, double &res_x, double &res_y)
 
v2df osmscout::dangerous_sin_pd (v2df x)
 
double osmscout::dangerous_sin_pd (double x)
 
void osmscout::dangerous_sin_pd (double x, double y, double &res_x, double &res_y)
 
v2df osmscout::log_pd (v2df x)
 
double osmscout::log_pd (double x)
 
double osmscout::log_pd (double x, double y, double &res_x, double &res_y)
 
void osmscout::sin_cos_pd (double x, double &res_sin, double &res_cos)
 
v2df osmscout::sin_pd (v2df x)
 
double osmscout::sin_pd (double x)
 
void osmscout::sin_pd (double x, double y, double &res_x, double &res_y)
 

Macro Definition Documentation

#define _PS_CONST (   Name)    extern const ALIGN16_BEG double _pd_##Name[2] ALIGN16_END
#define _PS_CONST_TYPE (   Name,
  Type 
)    extern const ALIGN16_BEG Type _pd_##Name[2] ALIGN16_END
#define ARRAY2V2DF (   name)    * reinterpret_cast<const v2df*>(name)
#define ARRAY2V2DI (   name)    * reinterpret_cast<const v2di*>(name)
#define DECLARE_COEFFS (   name)    extern const ALIGN16_BEG double name[] ALIGN16_END;
#define POLY_EVAL3 (   y,
  x,
  coeff 
)    POLY_EVAL3_HORNER(y, x, coeff)

Referenced by osmscout::log_pd().

#define POLY_EVAL3_HORNER (   y,
  x,
  coeff 
)
Value:
y = ARRAY2V2DF(&coeff[0]); \
y = _mm_add_pd(_mm_mul_pd(y, x), ARRAY2V2DF(&coeff[2])); \
y = _mm_add_pd(_mm_mul_pd(y, x), ARRAY2V2DF(&coeff[4])); \
y = _mm_add_pd(_mm_mul_pd(y, x), ARRAY2V2DF(&coeff[6]))
#define ARRAY2V2DF(name)
Definition: SSEMath.h:35
#define POLY_EVAL3SINGLE (   y,
  x,
  coeff 
)    POLY_EVAL3SINGLE_HORNER(y, x, coeff)
#define POLY_EVAL3SINGLE_HORNER (   y,
  x,
  coeff 
)    y = coeff[0]; y = y*x + coeff[2]; y = y*x + coeff[4]; y = y*x + coeff[6]
#define POLY_EVAL6 (   y,
  x,
  coeff 
)    POLY_EVAL6_ESTRIN(y, x, coeff)
#define POLY_EVAL6_ESTRIN (   y,
  x,
  coeff 
)
Value:
v2df pt0 = _mm_add_pd(ARRAY2V2DF(&coeff[0]), _mm_mul_pd(ARRAY2V2DF(&coeff[ 2]), x)); \
v2df pt1 = _mm_add_pd(ARRAY2V2DF(&coeff[4]), _mm_mul_pd(ARRAY2V2DF(&coeff[ 6]), x)); \
v2df pt2 = _mm_add_pd(ARRAY2V2DF(&coeff[8]), _mm_mul_pd(ARRAY2V2DF(&coeff[10]), x)); \
v2df pt3 = ARRAY2V2DF(&coeff[12]); \
v2df ptx2 = _mm_mul_pd(x,x); \
pt0 = _mm_add_pd(pt0, _mm_mul_pd(pt1, ptx2)); \
pt2 = _mm_add_pd(pt2, _mm_mul_pd(pt3, ptx2)); \
v2df ptx4 = _mm_mul_pd(ptx2,ptx2); \
y = _mm_add_pd(pt0, _mm_mul_pd(pt2, ptx4))
#define ARRAY2V2DF(name)
Definition: SSEMath.h:35
#define POLY_EVAL6_HORNER (   y,
  x,
  coeff 
)
Value:
y = ARRAY2V2DF(&coeff[0]); \
y = _mm_add_pd(_mm_mul_pd(y, x), ARRAY2V2DF(&coeff[2])); \
y = _mm_add_pd(_mm_mul_pd(y, x), ARRAY2V2DF(&coeff[4])); \
y = _mm_add_pd(_mm_mul_pd(y, x), ARRAY2V2DF(&coeff[6])); \
y = _mm_add_pd(_mm_mul_pd(y, x), ARRAY2V2DF(&coeff[8])); \
y = _mm_add_pd(_mm_mul_pd(y, x), ARRAY2V2DF(&coeff[10])); \
y = _mm_add_pd(_mm_mul_pd(y, x), ARRAY2V2DF(&coeff[12]))
#define ARRAY2V2DF(name)
Definition: SSEMath.h:35
#define POLY_EVAL6SINGLE (   y,
  x,
  coeff 
)    POLY_EVAL6SINGLE_ESTRIN(y, x, coeff)
#define POLY_EVAL6SINGLE_ESTRIN (   y,
  x,
  coeff 
)
Value:
y = coeff[12]; y = y*x + coeff[10]; y = y*x + coeff[8]; y = y*x + coeff[6]; \
y = y*x + coeff[4]; y = y*x + coeff[2]; y = y*x + coeff[0]; \
#define POLY_EVAL6SINGLE_HORNER (   y,
  x,
  coeff 
)
Value:
y = coeff[0]; y = y*x + coeff[2]; y = y*x + coeff[4]; y = y*x + coeff[6]; \
y = y*x + coeff[8]; y = y*x + coeff[10]; y = y*x + coeff[12]