Block-Structured AMR Software Framework
amrex::Math Namespace Reference

Namespaces

 detail
 

Classes

struct  FastDivmodU64
 

Functions

template<typename T >
constexpr std::enable_if_t< std::is_floating_point_v< T >, T > pi ()
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE double cospi (double x)
 Return cos(x*pi) given x. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE float cospi (float x)
 Return cos(x*pi) given x. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE double sinpi (double x)
 Return sin(x*pi) given x. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE float sinpi (float x)
 Return sin(x*pi) given x. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE std::pair< double, double > sincos (double x)
 Return sine and cosine of given number. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE std::pair< float, float > sincos (float x)
 Return sine and cosine of given number. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE std::pair< double, double > sincospi (double x)
 Return sin(pi*x) and cos(pi*x) given x. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE std::pair< float, float > sincospi (float x)
 Return sin(pi*x) and cos(pi*x) given x. More...
 
template<int Power, typename T , typename = std::enable_if_t<!std::is_integral<T>() || Power>=0>
constexpr AMREX_FORCE_INLINEpowi (T x) noexcept
 Return pow(x, Power), where Power is an integer known at compile time. More...
 
template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINEcomp_ellint_1 (T k)
 
template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINEcomp_ellint_2 (T k)
 

Function Documentation

◆ comp_ellint_1()

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T amrex::Math::comp_ellint_1 ( k)

◆ comp_ellint_2()

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T amrex::Math::comp_ellint_2 ( k)

◆ cospi() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE double amrex::Math::cospi ( double  x)

Return cos(x*pi) given x.

◆ cospi() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE float amrex::Math::cospi ( float  x)

Return cos(x*pi) given x.

◆ pi()

template<typename T >
constexpr std::enable_if_t<std::is_floating_point_v<T>,T> amrex::Math::pi ( )
constexpr

◆ powi()

template<int Power, typename T , typename = std::enable_if_t<!std::is_integral<T>() || Power>=0>
constexpr AMREX_FORCE_INLINE T amrex::Math::powi ( x)
constexprnoexcept

Return pow(x, Power), where Power is an integer known at compile time.

◆ sincos() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE std::pair<double,double> amrex::Math::sincos ( double  x)

Return sine and cosine of given number.

◆ sincos() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE std::pair<float,float> amrex::Math::sincos ( float  x)

Return sine and cosine of given number.

◆ sincospi() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE std::pair<double,double> amrex::Math::sincospi ( double  x)

Return sin(pi*x) and cos(pi*x) given x.

◆ sincospi() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE std::pair<float,float> amrex::Math::sincospi ( float  x)

Return sin(pi*x) and cos(pi*x) given x.

◆ sinpi() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE double amrex::Math::sinpi ( double  x)

Return sin(x*pi) given x.

◆ sinpi() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE float amrex::Math::sinpi ( float  x)

Return sin(x*pi) given x.