Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
AMReX_Math.H File Reference
#include <AMReX_Config.H>
#include <AMReX_GpuQualifiers.H>
#include <AMReX_Extension.H>
#include <AMReX_INT.H>
#include <AMReX_SIMD.H>
#include <AMReX_REAL.H>
#include <concepts>
#include <cmath>
#include <cstdlib>
#include <limits>
#include <numbers>
#include <type_traits>
#include <utility>

Go to the source code of this file.

Classes

struct  amrex::Math::FastDivmodU64
 

Namespaces

namespace  amrex
 
namespace  amrex::Math
 

Functions

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

Function Documentation

◆ __nv_powi()

__device__ double __nv_powi ( double  ,
int   
)

◆ __nv_powif()

__device__ float __nv_powif ( float  ,
int   
)