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

Functions

constexpr Real operator""_rt (long double x)
 
constexpr Real operator""_rt (unsigned long long int x)
 
constexpr ParticleReal operator""_prt (long double x)
 
constexpr ParticleReal operator""_prt (unsigned long long int x)
 

Detailed Description

Floating point literals for AMReX precision.

This namespace can be used to write typed numeric literals in expressions.

Function Documentation

◆ operator""_prt() [1/2]

constexpr ParticleReal amrex::literals::operator""_prt ( long double  x)
constexpr

◆ operator""_prt() [2/2]

constexpr ParticleReal amrex::literals::operator""_prt ( unsigned long long int  x)
constexpr

◆ operator""_rt() [1/2]

constexpr Real amrex::literals::operator""_rt ( long double  x)
constexpr

C++ user literals _rt & _prt for short-hand notations

Use this to properly add types to constant such as

++
auto const mypi = 3.14_rt;
auto const sphere_volume = 4_rt / 3_rt * pow(r, 3) * mypi;
__host__ __device__ GpuComplex< T > pow(const GpuComplex< T > &a_z, const T &a_y) noexcept
Raise a complex number to a (real) power.
Definition AMReX_GpuComplex.H:423

◆ operator""_rt() [2/2]

constexpr Real amrex::literals::operator""_rt ( unsigned long long int  x)
constexpr