openjij
Framework for the Ising model and QUBO.
Loading...
Searching...
No Matches
fmath.hpp File Reference
#include <assert.h>
#include <float.h>
#include <limits>
#include <math.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <x86intrin.h>
Include dependency graph for fmath.hpp:

Go to the source code of this file.

Classes

union  fmath::local::fi
union  fmath::local::di
struct  fmath::local::ExpVar< N >
struct  fmath::local::ExpdVar< sbit_ >
struct  fmath::local::LogVar< N >
struct  fmath::local::C< EXP_N, LOG_N, EXPD_N >
class  fmath::PowGenerator

Namespaces

namespace  fmath
namespace  fmath::local

Macros

#define __GNUC_PREREQ(major, minor)
#define MIE_ALIGN(x)
#define MIE_PACK(x, y, z, w)

Typedefs

typedef unsigned long long fmath::local::uint64_t

Functions

unsigned int fmath::local::mask (int x)
uint64_t fmath::local::mask64 (int x)
template<class T>
const T * fmath::local::cast_to (const void *p)
template<class T, size_t N>
size_t fmath::local::NumOfArray (const T(&)[N])
float fmath::exp (float x)
double fmath::expd (double x)
__m128d fmath::exp_pd (__m128d x)
void fmath::expd_v (double *px, size_t n)
__m128 fmath::exp_ps (__m128 x)
float fmath::log (float x)
__m128 fmath::log_ps (__m128 x)
float fmath::log2 (float x)
float fmath::exp2 (float x)
__m128d fmath::log_pd (__m128d x)
__m128 fmath::pow_ps (__m128 x, __m128 y)
__m128d fmath::pow_pd (__m128d x, __m128d y)

Variables

const size_t fmath::local::EXP_TABLE_SIZE = 10
const size_t fmath::local::EXPD_TABLE_SIZE = 11
const size_t fmath::local::LOG_TABLE_SIZE = 12
template<size_t EXP_N, size_t LOG_N, size_t EXPD_N>
const ExpVar< EXP_N > fmath::local::C< EXP_N, LOG_N, EXPD_N >::expVar
template<size_t EXP_N, size_t LOG_N, size_t EXPD_N>
const LogVar< LOG_N > fmath::local::C< EXP_N, LOG_N, EXPD_N >::logVar
template<size_t EXP_N, size_t LOG_N, size_t EXPD_N>
const ExpdVar< EXPD_N > fmath::local::C< EXP_N, LOG_N, EXPD_N >::expdVar

Macro Definition Documentation

◆ __GNUC_PREREQ

#define __GNUC_PREREQ ( major,
minor )
Value:
((((__GNUC__) << 16) + (__GNUC_MINOR__)) >= (((major) << 16) + (minor)))
 @brief fast math library for float
 @author herumi
 @url https://github.com/herumi/fmath/
 @note modified new BSD license
 http://opensource.org/licenses/BSD-3-Clause

 cl /Ox /Ob2 /arch:SSE2 /fp:fast bench.cpp -I../xbyak /EHsc /DNOMINMAX
 g++ -O3 -fomit-frame-pointer -fno-operator-names -march=core2 -mssse3

-mfpmath=sse -ffast-math -fexcess-precision=fast

◆ MIE_ALIGN

#define MIE_ALIGN ( x)
Value:
__attribute__((aligned(x)))

Referenced by fmath::exp_pd().

◆ MIE_PACK

#define MIE_PACK ( x,
y,
z,
w )
Value:
((x)*64 + (y)*16 + (z)*4 + (w))

Referenced by fmath::log_ps().