libosmscout 1.1.1
Loading...
Searching...
No Matches
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>
Include dependency graph for SSEMath.h:

Go to the source code of this file.

Namespaces

namespace  osmscout

Macros

#define ARRAY2V2DF(name)
#define ARRAY2V2DI(name)
#define DECLARE_COEFFS(name)
#define POLY_EVAL3SINGLE_HORNER(y, x, coeff)
#define POLY_EVAL3_HORNER(y, x, coeff)
#define POLY_EVAL6SINGLE_HORNER(y, x, coeff)
#define POLY_EVAL6_HORNER(y, x, coeff)
#define POLY_EVAL6SINGLE_ESTRIN(y, x, coeff)
#define POLY_EVAL6_ESTRIN(y, x, coeff)
#define POLY_EVAL3SINGLE(y, x, coeff)
#define POLY_EVAL3(y, x, coeff)
#define POLY_EVAL6SINGLE(y, x, coeff)
#define POLY_EVAL6(y, x, coeff)
#define _PS_CONST(Name)
#define _PS_CONST_TYPE(Name, Type)

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_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)
 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)
v2df osmscout::sin_pd (v2df x)
v2df osmscout::dangerous_sin_pd (v2df x)
double osmscout::sin_pd (double x)
double osmscout::dangerous_sin_pd (double x)
void osmscout::sin_pd (double x, double y, double &res_x, double &res_y)
void osmscout::dangerous_sin_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::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::log_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::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)

Macro Definition Documentation

◆ _PS_CONST

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

◆ _PS_CONST_TYPE

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

◆ ARRAY2V2DF

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

◆ ARRAY2V2DI

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

◆ DECLARE_COEFFS

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

◆ POLY_EVAL3

#define POLY_EVAL3 ( y,
x,
coeff )
Value:
POLY_EVAL3_HORNER(y, x, coeff)
#define POLY_EVAL3_HORNER(y, x, coeff)
Definition SSEMath.h:41

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

◆ POLY_EVAL3SINGLE

#define POLY_EVAL3SINGLE ( y,
x,
coeff )
Value:
#define POLY_EVAL3SINGLE_HORNER(y, x, coeff)
Definition SSEMath.h:38

◆ POLY_EVAL3SINGLE_HORNER

#define POLY_EVAL3SINGLE_HORNER ( y,
x,
coeff )
Value:
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 )
Value:
POLY_EVAL6_ESTRIN(y, x, coeff)
#define POLY_EVAL6_ESTRIN(y, x, coeff)
Definition SSEMath.h:64

◆ 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 )
Value:
#define POLY_EVAL6SINGLE_ESTRIN(y, x, coeff)
Definition SSEMath.h:60

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