Single Precision Floating-point Intrinsics

Single Precision Floating-point Intrinsics#

HIP Runtime API Reference: Single Precision Floating-point Intrinsics
Single Precision Floating-point Intrinsics
Collaboration diagram for Single Precision Floating-point Intrinsics:

Functions

__DEVICE__ float __cosf (float __x)
 Returns the fast approximate cosine of x.
 
__DEVICE__ float __exp10f (float __x)
 Returns the fast approximate for \( 10^x \).
 
__DEVICE__ float __expf (float __x)
 Returns the fast approximate for \( e^x \).
 
__DEVICE__ float __fadd_rn (float __x, float __y)
 Add two floating-point values in round-to-nearest-even mode.
 
__DEVICE__ float __fdiv_rn (float __x, float __y)
 Divide two floating-point values in round-to-nearest-even mode.
 
__DEVICE__ float __fdividef (float __x, float __y)
 Returns the fast approximate of x / y.
 
__DEVICE__ float __fmaf_rn (float __x, float __y, float __z)
 Returns \(x \cdot y + z\) as a single operation, in round-to-nearest-even mode.
 
__DEVICE__ float __fmul_rn (float __x, float __y)
 Multiply two floating-point values in round-to-nearest-even mode.
 
__DEVICE__ float __frcp_rn (float __x)
 Returns 1 / x in round-to-nearest-even mod.
 
__DEVICE__ float __frsqrt_rn (float __x)
 Returns \( 1 / \sqrt{x}\) in round-to-nearest-even mode.
 
__DEVICE__ float __fsqrt_rn (float __x)
 Returns \(\sqrt{x}\) in round-to-nearest-even mode.
 
__DEVICE__ float __fsub_rn (float __x, float __y)
 Subtract two floating-point values in round-to-nearest-even mode.
 
__DEVICE__ float __log10f (float __x)
 Returns the fast approximate for base 10 logarithm of x.
 
__DEVICE__ float __log2f (float __x)
 Returns the fast approximate for base 2 logarithm of x.
 
__DEVICE__ float __logf (float __x)
 Returns the fast approximate for natural logarithm of x.
 
__DEVICE__ float __powf (float __x, float __y)
 Returns the fast approximate of \( x^y \).
 
__DEVICE__ float __saturatef (float __x)
 Clamp x to [+0.0, 1.0].
 
__DEVICE__ void __sincosf (float __x, float *__sinptr, float *__cosptr)
 Returns the fast approximate of sine and cosine of x.
 
__DEVICE__ float __sinf (float __x)
 Returns the fast approximate sine of x.
 
__DEVICE__ float __tanf (float __x)
 Returns the fast approximate tangent of x.
 

Detailed Description

Single Precision Floating-point Intrinsics

Function Documentation

◆ __cosf()

__DEVICE__ float __cosf ( float  __x)

Returns the fast approximate cosine of x.

◆ __exp10f()

__DEVICE__ float __exp10f ( float  __x)

Returns the fast approximate for \( 10^x \).

◆ __expf()

__DEVICE__ float __expf ( float  __x)

Returns the fast approximate for \( e^x \).

◆ __fadd_rn()

__DEVICE__ float __fadd_rn ( float  __x,
float  __y 
)

Add two floating-point values in round-to-nearest-even mode.

◆ __fdiv_rn()

__DEVICE__ float __fdiv_rn ( float  __x,
float  __y 
)

Divide two floating-point values in round-to-nearest-even mode.

◆ __fdividef()

__DEVICE__ float __fdividef ( float  __x,
float  __y 
)

Returns the fast approximate of x / y.

◆ __fmaf_rn()

__DEVICE__ float __fmaf_rn ( float  __x,
float  __y,
float  __z 
)

Returns \(x \cdot y + z\) as a single operation, in round-to-nearest-even mode.

◆ __fmul_rn()

__DEVICE__ float __fmul_rn ( float  __x,
float  __y 
)

Multiply two floating-point values in round-to-nearest-even mode.

◆ __frcp_rn()

__DEVICE__ float __frcp_rn ( float  __x)

Returns 1 / x in round-to-nearest-even mod.

◆ __frsqrt_rn()

__DEVICE__ float __frsqrt_rn ( float  __x)

Returns \( 1 / \sqrt{x}\) in round-to-nearest-even mode.

◆ __fsqrt_rn()

__DEVICE__ float __fsqrt_rn ( float  __x)

Returns \(\sqrt{x}\) in round-to-nearest-even mode.

◆ __fsub_rn()

__DEVICE__ float __fsub_rn ( float  __x,
float  __y 
)

Subtract two floating-point values in round-to-nearest-even mode.

◆ __log10f()

__DEVICE__ float __log10f ( float  __x)

Returns the fast approximate for base 10 logarithm of x.

◆ __log2f()

__DEVICE__ float __log2f ( float  __x)

Returns the fast approximate for base 2 logarithm of x.

◆ __logf()

__DEVICE__ float __logf ( float  __x)

Returns the fast approximate for natural logarithm of x.

◆ __powf()

__DEVICE__ float __powf ( float  __x,
float  __y 
)

Returns the fast approximate of \( x^y \).

◆ __saturatef()

__DEVICE__ float __saturatef ( float  __x)

Clamp x to [+0.0, 1.0].

◆ __sincosf()

__DEVICE__ void __sincosf ( float  __x,
float *  __sinptr,
float *  __cosptr 
)

Returns the fast approximate of sine and cosine of x.

◆ __sinf()

__DEVICE__ float __sinf ( float  __x)

Returns the fast approximate sine of x.

◆ __tanf()

__DEVICE__ float __tanf ( float  __x)

Returns the fast approximate tangent of x.