Block-Structured AMR Software Framework
AMReX_Math.H File Reference
#include <AMReX_Config.H>
#include <AMReX_GpuQualifiers.H>
#include <AMReX_Extension.H>
#include <AMReX_INT.H>
#include <AMReX_REAL.H>
#include <cmath>
#include <cstdlib>
#include <type_traits>
#include <utility>

Go to the source code of this file.

Classes

struct  amrex::Math::FastDivmodU64
 

Namespaces

 amrex
 
 amrex::disabled
 
 amrex::Math
 
 amrex::Math::detail
 

Functions

AMREX_GPU_HOST_DEVICE double amrex::disabled::abs (double)
 
AMREX_GPU_HOST_DEVICE float amrex::disabled::abs (float)
 
AMREX_GPU_HOST_DEVICE long double amrex::disabled::abs (long double)
 
AMREX_GPU_HOST_DEVICE int amrex::disabled::abs (int)
 
AMREX_GPU_HOST_DEVICE long amrex::disabled::abs (long)
 
AMREX_GPU_HOST_DEVICE long long amrex::disabled::abs (long long)
 
template<typename T >
constexpr std::enable_if_t< std::is_floating_point_v< T >, T > amrex::Math::pi ()
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE double amrex::Math::cospi (double x)
 Return cos(x*pi) given x. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE float amrex::Math::cospi (float x)
 Return cos(x*pi) given x. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE double amrex::Math::sinpi (double x)
 Return sin(x*pi) given x. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE float amrex::Math::sinpi (float x)
 Return sin(x*pi) given x. More...
 
AMREX_FORCE_INLINE void amrex::Math::detail::sincos (double x, double *sinx, double *cosx)
 
AMREX_FORCE_INLINE void amrex::Math::detail::sincosf (float x, float *sinx, float *cosx)
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE std::pair< double, double > amrex::Math::sincos (double x)
 Return sine and cosine of given number. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE std::pair< float, float > amrex::Math::sincos (float x)
 Return sine and cosine of given number. More...
 
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. More...
 
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. More...
 
template<int Power, typename T , typename = std::enable_if_t<!std::is_integral<T>() || Power>=0>
constexpr AMREX_FORCE_INLINEamrex::Math::powi (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_INLINEamrex::Math::comp_ellint_1 (T k)
 
template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINEamrex::Math::comp_ellint_2 (T k)