GADGET-4
functions Struct Reference

Wrapper implementing unspecialized half-precision functions. More...

#include <half.hpp>

Static Public Member Functions

static expr plus (float x, float y)
 
static expr minus (float x, float y)
 
static expr multiplies (float x, float y)
 
static expr divides (float x, float y)
 
template<typename charT , typename traits >
static std::basic_ostream< charT, traits > & write (std::basic_ostream< charT, traits > &out, float arg)
 
template<typename charT , typename traits >
static std::basic_istream< charT, traits > & read (std::basic_istream< charT, traits > &in, half &arg)
 
static expr fmod (float x, float y)
 
static expr remainder (float x, float y)
 
static expr remquo (float x, float y, int *quo)
 
static expr fdim (float x, float y)
 
static expr fma (float x, float y, float z)
 
static half nanh ()
 
static expr exp (float arg)
 
static expr expm1 (float arg)
 
static expr exp2 (float arg)
 
static expr log (float arg)
 
static expr log10 (float arg)
 
static expr log1p (float arg)
 
static expr log2 (float arg)
 
static expr sqrt (float arg)
 
static expr cbrt (float arg)
 
static expr hypot (float x, float y)
 
static expr pow (float base, float exp)
 
static expr sin (float arg)
 
static expr cos (float arg)
 
static expr tan (float arg)
 
static expr asin (float arg)
 
static expr acos (float arg)
 
static expr atan (float arg)
 
static expr atan2 (float x, float y)
 
static expr sinh (float arg)
 
static expr cosh (float arg)
 
static expr tanh (float arg)
 
static expr asinh (float arg)
 
static expr acosh (float arg)
 
static expr atanh (float arg)
 
static expr erf (float arg)
 
static expr erfc (float arg)
 
static expr lgamma (float arg)
 
static expr tgamma (float arg)
 
static half floor (half arg)
 
static half ceil (half arg)
 
static half trunc (half arg)
 
static half round (half arg)
 
static long lround (half arg)
 
static half rint (half arg)
 
static long lrint (half arg)
 
static half frexp (half arg, int *exp)
 
static half modf (half arg, half *iptr)
 
static half scalbln (half arg, long exp)
 
static int ilogb (half arg)
 
static half logb (half arg)
 
static half nextafter (half from, half to)
 
static half nexttoward (half from, long double to)
 
static half copysign (half x, half y)
 
static int fpclassify (half arg)
 
static bool isfinite (half arg)
 
static bool isinf (half arg)
 
static bool isnan (half arg)
 
static bool isnormal (half arg)
 
static bool signbit (half arg)
 
static bool isequal (half x, half y)
 
static bool isnotequal (half x, half y)
 
static bool isgreater (half x, half y)
 
static bool isgreaterequal (half x, half y)
 
static bool isless (half x, half y)
 
static bool islessequal (half x, half y)
 
static bool islessgreater (half x, half y)
 
static bool isunordered (half x, half y)
 

Detailed Description

Wrapper implementing unspecialized half-precision functions.

Definition at line 1513 of file half.hpp.

Member Function Documentation

◆ acos()

static expr acos ( float  arg)
inlinestatic

Arc cosine implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1803 of file half.hpp.

◆ acosh()

static expr acosh ( float  arg)
inlinestatic

Hyperbolic area cosine implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1847 of file half.hpp.

◆ asin()

static expr asin ( float  arg)
inlinestatic

Arc sine implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1798 of file half.hpp.

◆ asinh()

static expr asinh ( float  arg)
inlinestatic

Hyperbolic area sine implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1834 of file half.hpp.

◆ atan()

static expr atan ( float  arg)
inlinestatic

Arc tangent implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1808 of file half.hpp.

◆ atan2()

static expr atan2 ( float  x,
float  y 
)
inlinestatic

Arc tangent implementation.

Parameters
xfirst argument
ysecond argument
Returns
function value stored in single-preicision

Definition at line 1814 of file half.hpp.

◆ atanh()

static expr atanh ( float  arg)
inlinestatic

Hyperbolic area tangent implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1860 of file half.hpp.

◆ cbrt()

static expr cbrt ( float  arg)
inlinestatic

Cubic root implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1747 of file half.hpp.

◆ ceil()

static half ceil ( half  arg)
inlinestatic

Ceiling implementation.

Parameters
argvalue to round
Returns
rounded value

Definition at line 1948 of file half.hpp.

◆ copysign()

static half copysign ( half  x,
half  y 
)
inlinestatic

Sign implementation

Parameters
xfirst operand
ysecond operand
Returns
composed value

Definition at line 2159 of file half.hpp.

◆ cos()

static expr cos ( float  arg)
inlinestatic

Cosine implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1788 of file half.hpp.

◆ cosh()

static expr cosh ( float  arg)
inlinestatic

Hyperbolic cosine implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1824 of file half.hpp.

◆ divides()

static expr divides ( float  x,
float  y 
)
inlinestatic

Division implementation.

Parameters
xfirst operand
ysecond operand
Returns
Half-precision quotient stored in single-precision

Definition at line 1537 of file half.hpp.

◆ erf()

static expr erf ( float  arg)
inlinestatic

Error function implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1872 of file half.hpp.

◆ erfc()

static expr erfc ( float  arg)
inlinestatic

Complementary implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1884 of file half.hpp.

◆ exp()

static expr exp ( float  arg)
inlinestatic

Exponential implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1679 of file half.hpp.

◆ exp2()

static expr exp2 ( float  arg)
inlinestatic

Binary exponential implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1696 of file half.hpp.

◆ expm1()

static expr expm1 ( float  arg)
inlinestatic

Exponential implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1684 of file half.hpp.

◆ fdim()

static expr fdim ( float  x,
float  y 
)
inlinestatic

Positive difference implementation.

Parameters
xfirst operand
ysecond operand
Returns
Positive difference stored in single-precision

Definition at line 1649 of file half.hpp.

◆ floor()

static half floor ( half  arg)
inlinestatic

Floor implementation.

Parameters
argvalue to round
Returns
rounded value

Definition at line 1943 of file half.hpp.

◆ fma()

static expr fma ( float  x,
float  y,
float  z 
)
inlinestatic

Fused multiply-add implementation.

Parameters
xfirst operand
ysecond operand
zthird operand
Returns
x * y + z stored in single-precision

Definition at line 1663 of file half.hpp.

◆ fmod()

static expr fmod ( float  x,
float  y 
)
inlinestatic

Modulo implementation.

Parameters
xfirst operand
ysecond operand
Returns
Half-precision division remainder stored in single-precision

Definition at line 1566 of file half.hpp.

◆ fpclassify()

static int fpclassify ( half  arg)
inlinestatic

Classification implementation.

Parameters
argvalue to classify
Return values
trueif infinite number
falseelse

Definition at line 2165 of file half.hpp.

◆ frexp()

static half frexp ( half  arg,
int *  exp 
)
inlinestatic

Decompression implementation.

Parameters
argnumber to decompress
expaddress to store exponent at
Returns
normalized significant

Definition at line 1991 of file half.hpp.

◆ hypot()

static expr hypot ( float  x,
float  y 
)
inlinestatic

Hypotenuse implementation.

Parameters
xfirst argument
ysecond argument
Returns
function value stored in single-preicision

Definition at line 1763 of file half.hpp.

◆ ilogb()

static int ilogb ( half  arg)
inlinestatic

Exponent implementation.

Parameters
argnumber to query
Returns
floating point exponent

Definition at line 2074 of file half.hpp.

◆ isequal()

static bool isequal ( half  x,
half  y 
)
inlinestatic

Comparison implementation.

Parameters
xfirst operand
ysecond operand
Return values
trueif operands equal
falseelse

Definition at line 2206 of file half.hpp.

◆ isfinite()

static bool isfinite ( half  arg)
inlinestatic

Classification implementation.

Parameters
argvalue to classify
Return values
trueif finite number
falseelse

Definition at line 2175 of file half.hpp.

◆ isgreater()

static bool isgreater ( half  x,
half  y 
)
inlinestatic

Comparison implementation.

Parameters
xfirst operand
ysecond operand
Return values
trueif x > y
falseelse

Definition at line 2220 of file half.hpp.

◆ isgreaterequal()

static bool isgreaterequal ( half  x,
half  y 
)
inlinestatic

Comparison implementation.

Parameters
xfirst operand
ysecond operand
Return values
trueif x >= y
falseelse

Definition at line 2231 of file half.hpp.

◆ isinf()

static bool isinf ( half  arg)
inlinestatic

Classification implementation.

Parameters
argvalue to classify
Return values
trueif infinite number
falseelse

Definition at line 2181 of file half.hpp.

◆ isless()

static bool isless ( half  x,
half  y 
)
inlinestatic

Comparison implementation.

Parameters
xfirst operand
ysecond operand
Return values
trueif x < y
falseelse

Definition at line 2242 of file half.hpp.

◆ islessequal()

static bool islessequal ( half  x,
half  y 
)
inlinestatic

Comparison implementation.

Parameters
xfirst operand
ysecond operand
Return values
trueif x <= y
falseelse

Definition at line 2253 of file half.hpp.

◆ islessgreater()

static bool islessgreater ( half  x,
half  y 
)
inlinestatic

Comparison implementation.

Parameters
xfirst operand
ysecond operand
Return values
trueif either x > y nor x < y
falseelse

Definition at line 2264 of file half.hpp.

◆ isnan()

static bool isnan ( half  arg)
inlinestatic

Classification implementation.

Parameters
argvalue to classify
Return values
trueif not a number
falseelse

Definition at line 2187 of file half.hpp.

◆ isnormal()

static bool isnormal ( half  arg)
inlinestatic

Classification implementation.

Parameters
argvalue to classify
Return values
trueif normal number
falseelse

Definition at line 2193 of file half.hpp.

◆ isnotequal()

static bool isnotequal ( half  x,
half  y 
)
inlinestatic

Comparison implementation.

Parameters
xfirst operand
ysecond operand
Return values
trueif operands not equal
falseelse

Definition at line 2213 of file half.hpp.

◆ isunordered()

static bool isunordered ( half  x,
half  y 
)
inlinestatic

Comparison implementation.

Parameters
xfirst operand
ysecond operand
Return values
trueif operand unordered
falseelse

Definition at line 2278 of file half.hpp.

◆ lgamma()

static expr lgamma ( float  arg)
inlinestatic

Gamma logarithm implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1896 of file half.hpp.

◆ log()

static expr log ( float  arg)
inlinestatic

Logarithm implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1708 of file half.hpp.

◆ log10()

static expr log10 ( float  arg)
inlinestatic

Common logarithm implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1713 of file half.hpp.

◆ log1p()

static expr log1p ( float  arg)
inlinestatic

Logarithm implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1718 of file half.hpp.

◆ log2()

static expr log2 ( float  arg)
inlinestatic

Binary logarithm implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1730 of file half.hpp.

◆ logb()

static half logb ( half  arg)
inlinestatic

Exponent implementation.

Parameters
argnumber to query
Returns
floating point exponent

Definition at line 2095 of file half.hpp.

◆ lrint()

static long lrint ( half  arg)
inlinestatic

Nearest integer implementation.

Parameters
argvalue to round
Returns
rounded value

Definition at line 1973 of file half.hpp.

◆ lround()

static long lround ( half  arg)
inlinestatic

Nearest integer implementation.

Parameters
argvalue to round
Returns
rounded value

Definition at line 1963 of file half.hpp.

◆ minus()

static expr minus ( float  x,
float  y 
)
inlinestatic

Subtraction implementation.

Parameters
xfirst operand
ysecond operand
Returns
Half-precision difference stored in single-precision

Definition at line 1525 of file half.hpp.

◆ modf()

static half modf ( half  arg,
half iptr 
)
inlinestatic

Decompression implementation.

Parameters
argnumber to decompress
iptraddress to store integer part at
Returns
fractional part

Definition at line 2005 of file half.hpp.

◆ multiplies()

static expr multiplies ( float  x,
float  y 
)
inlinestatic

Multiplication implementation.

Parameters
xfirst operand
ysecond operand
Returns
Half-precision product stored in single-precision

Definition at line 1531 of file half.hpp.

◆ nanh()

static half nanh ( )
inlinestatic

Get NaN.

Returns
Half-precision quiet NaN

Definition at line 1674 of file half.hpp.

◆ nextafter()

static half nextafter ( half  from,
half  to 
)
inlinestatic

Enumeration implementation.

Parameters
fromnumber to increase/decrease
todirection to enumerate into
Returns
next representable number

Definition at line 2125 of file half.hpp.

◆ nexttoward()

static half nexttoward ( half  from,
long double  to 
)
inlinestatic

Enumeration implementation.

Parameters
fromnumber to increase/decrease
todirection to enumerate into
Returns
next representable number

Definition at line 2143 of file half.hpp.

◆ plus()

static expr plus ( float  x,
float  y 
)
inlinestatic

Addition implementation.

Parameters
xfirst operand
ysecond operand
Returns
Half-precision sum stored in single-precision

Definition at line 1519 of file half.hpp.

◆ pow()

static expr pow ( float  base,
float  exp 
)
inlinestatic

Power implementation.

Parameters
basevalue to exponentiate
exppower to expontiate to
Returns
function value stored in single-preicision

Definition at line 1778 of file half.hpp.

◆ read()

static std::basic_istream< charT, traits > & read ( std::basic_istream< charT, traits > &  in,
half arg 
)
inlinestatic

Input implementation.

Parameters
instream to read from
arghalf to read into
Returns
reference to stream

Definition at line 1554 of file half.hpp.

◆ remainder()

static expr remainder ( float  x,
float  y 
)
inlinestatic

Remainder implementation.

Parameters
xfirst operand
ysecond operand
Returns
Half-precision division remainder stored in single-precision

Definition at line 1572 of file half.hpp.

◆ remquo()

static expr remquo ( float  x,
float  y,
int *  quo 
)
inlinestatic

Remainder implementation.

Parameters
xfirst operand
ysecond operand
quoaddress to store quotient bits at
Returns
Half-precision division remainder stored in single-precision

Definition at line 1603 of file half.hpp.

◆ rint()

static half rint ( half  arg)
inlinestatic

Nearest integer implementation.

Parameters
argvalue to round
Returns
rounded value

Definition at line 1968 of file half.hpp.

◆ round()

static half round ( half  arg)
inlinestatic

Nearest integer implementation.

Parameters
argvalue to round
Returns
rounded value

Definition at line 1958 of file half.hpp.

◆ scalbln()

static half scalbln ( half  arg,
long  exp 
)
inlinestatic

Scaling implementation.

Parameters
argnumber to scale
exppower of two to scale by
Returns
scaled number

Definition at line 2026 of file half.hpp.

◆ signbit()

static bool signbit ( half  arg)
inlinestatic

Sign bit implementation.

Parameters
argvalue to check
Return values
trueif signed
falseif unsigned

Definition at line 2199 of file half.hpp.

◆ sin()

static expr sin ( float  arg)
inlinestatic

Sine implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1783 of file half.hpp.

◆ sinh()

static expr sinh ( float  arg)
inlinestatic

Hyperbolic sine implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1819 of file half.hpp.

◆ sqrt()

static expr sqrt ( float  arg)
inlinestatic

Square root implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1742 of file half.hpp.

◆ tan()

static expr tan ( float  arg)
inlinestatic

Tan implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1793 of file half.hpp.

◆ tanh()

static expr tanh ( float  arg)
inlinestatic

Hyperbolic tangent implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1829 of file half.hpp.

◆ tgamma()

static expr tgamma ( float  arg)
inlinestatic

Gamma implementation.

Parameters
argfunction argument
Returns
function value stored in single-preicision

Definition at line 1918 of file half.hpp.

◆ trunc()

static half trunc ( half  arg)
inlinestatic

Truncation implementation.

Parameters
argvalue to round
Returns
rounded value

Definition at line 1953 of file half.hpp.

◆ write()

static std::basic_ostream< charT, traits > & write ( std::basic_ostream< charT, traits > &  out,
float  arg 
)
inlinestatic

Output implementation.

Parameters
outstream to write to
argvalue to write
Returns
reference to stream

Definition at line 1544 of file half.hpp.


The documentation for this struct was generated from the following file: