Block-Structured AMR Software Framework
 
Loading...
Searching...
No Matches
amrex::Math Namespace Reference

Namespaces

namespace  detail
 

Classes

struct  FastDivmodU64
 

Functions

template<typename T >
constexpr std::enable_if_t< std::is_floating_point_v< T >, T > pi ()
 
__host__ __device__ double cospi (double x)
 Return cos(x*pi) given x.
 
__host__ __device__ float cospi (float x)
 Return cos(x*pi) given x.
 
__host__ __device__ double sinpi (double x)
 Return sin(x*pi) given x.
 
__host__ __device__ float sinpi (float x)
 Return sin(x*pi) given x.
 
__host__ __device__ std::pair< double, double > sincos (double x)
 Return sine and cosine of given number.
 
__host__ __device__ std::pair< float, float > sincos (float x)
 Return sine and cosine of given number.
 
__host__ __device__ std::pair< double, double > sincospi (double x)
 Return sin(pi*x) and cos(pi*x) given x.
 
__host__ __device__ std::pair< float, float > sincospi (float x)
 Return sin(pi*x) and cos(pi*x) given x.
 
template<int Power, typename T , typename = std::enable_if_t<!std::is_integral<T>() || Power>=0>
constexpr T powi (T x) noexcept
 Return pow(x, Power), where Power is an integer known at compile time.
 
template<typename T >
__host__ __device__ T comp_ellint_1 (T k)
 
template<typename T >
__host__ __device__ T comp_ellint_2 (T k)
 
__host__ __device__ double rsqrt (double x)
 Return inverse square root of x.
 
__host__ __device__ float rsqrt (float x)
 Return inverse square root of x.
 

Function Documentation

◆ comp_ellint_1()

template<typename T >
__host__ __device__ T amrex::Math::comp_ellint_1 ( k)
inline

◆ comp_ellint_2()

template<typename T >
__host__ __device__ T amrex::Math::comp_ellint_2 ( k)
inline

◆ cospi() [1/2]

__host__ __device__ double amrex::Math::cospi ( double  x)
inline

Return cos(x*pi) given x.

◆ cospi() [2/2]

__host__ __device__ float amrex::Math::cospi ( float  x)
inline

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 T amrex::Math::powi ( x)
inlineconstexprnoexcept

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

◆ rsqrt() [1/2]

__host__ __device__ double amrex::Math::rsqrt ( double  x)
inline

Return inverse square root of x.

◆ rsqrt() [2/2]

__host__ __device__ float amrex::Math::rsqrt ( float  x)
inline

Return inverse square root of x.

◆ sincos() [1/2]

__host__ __device__ std::pair< double, double > amrex::Math::sincos ( double  x)
inline

Return sine and cosine of given number.

◆ sincos() [2/2]

__host__ __device__ std::pair< float, float > amrex::Math::sincos ( float  x)
inline

Return sine and cosine of given number.

◆ sincospi() [1/2]

__host__ __device__ std::pair< double, double > amrex::Math::sincospi ( double  x)
inline

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

◆ sincospi() [2/2]

__host__ __device__ std::pair< float, float > amrex::Math::sincospi ( float  x)
inline

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

◆ sinpi() [1/2]

__host__ __device__ double amrex::Math::sinpi ( double  x)
inline

Return sin(x*pi) given x.

◆ sinpi() [2/2]

__host__ __device__ float amrex::Math::sinpi ( float  x)
inline

Return sin(x*pi) given x.