libosmscout  0.1
SSEMath.h File Reference
#include <osmscout/lib/CoreFeatures.h>
#include <osmscout/system/Math.h>
#include <osmscout/system/SSEMathPublic.h>
#include <osmscout/system/SystemTypes.h>
#include <osmscout/private/Config.h>

Namespaces

 osmscout
 Original source: https://github.com/philipperemy/easy-encryption/blob/master/b64.h licensed under terms of MIT license.
 

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

double osmscout::atanh_pd (double x)
 
double osmscout::atanh_pd (double x, double y, double &res_x, double &res_y)
 
v2df osmscout::atanh_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::atanh_sin_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::cos_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::dangerous_sin_pd (v2df x)
 
double osmscout::log_pd (double x)
 
double osmscout::log_pd (double x, double y, double &res_x, double &res_y)
 
v2df osmscout::log_pd (v2df x)
 
void osmscout::sin_cos_pd (double x, double &res_sin, double &res_cos)
 
double osmscout::sin_pd (double x)
 
void osmscout::sin_pd (double x, double y, double &res_x, double &res_y)
 
v2df osmscout::sin_pd (v2df x)
 

Variables

const ALIGN16_BEG double SINECOEFF_SSE[] osmscout::ALIGN16_END
 

Macro Definition Documentation

◆ _PS_CONST

#define _PS_CONST (   Name)    extern const ALIGN16_BEG double _pd_##Name[2] ALIGN16_END

◆ _PS_CONST_TYPE

#define _PS_CONST_TYPE (   Name,
  Type 
)    extern const ALIGN16_BEG Type _pd_##Name[2] ALIGN16_END

◆ ARRAY2V2DF

#define ARRAY2V2DF (   name)    * reinterpret_cast<const v2df*>(name)

◆ ARRAY2V2DI

#define ARRAY2V2DI (   name)    * reinterpret_cast<const v2di*>(name)

◆ DECLARE_COEFFS

#define DECLARE_COEFFS (   name)    extern const ALIGN16_BEG double name[] ALIGN16_END;

◆ POLY_EVAL3

#define POLY_EVAL3 (   y,
  x,
  coeff 
)    POLY_EVAL3_HORNER(y, x, coeff)

◆ POLY_EVAL3_HORNER

#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]))

◆ POLY_EVAL3SINGLE

#define POLY_EVAL3SINGLE (   y,
  x,
  coeff 
)    POLY_EVAL3SINGLE_HORNER(y, x, coeff)

◆ POLY_EVAL3SINGLE_HORNER

#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]

◆ POLY_EVAL6

#define POLY_EVAL6 (   y,
  x,
  coeff 
)    POLY_EVAL6_ESTRIN(y, x, coeff)

◆ POLY_EVAL6_ESTRIN

#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))

◆ POLY_EVAL6_HORNER

#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]))

◆ POLY_EVAL6SINGLE

#define POLY_EVAL6SINGLE (   y,
  x,
  coeff 
)    POLY_EVAL6SINGLE_ESTRIN(y, x, coeff)

◆ POLY_EVAL6SINGLE_ESTRIN

#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]; \

◆ POLY_EVAL6SINGLE_HORNER

#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]
ARRAY2V2DF
#define ARRAY2V2DF(name)
Definition: SSEMath.h:33