HIP: Heterogenous-computing Interface for Portability
Loading...
Searching...
No Matches
__hip_fp8_e4m3_fnuz Struct Reference

struct representing single fp8 number with e4m3 interpretation More...

#include <amd_hip_fp8.h>

Public Member Functions

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz (const long int val)
 
__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz (const int val)
 
__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz (const short int val)
 
__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz (const unsigned long int val)
 
__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz (const unsigned int val)
 
__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz (const unsigned short int val)
 
__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz (const double f)
 
__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz (const float f)
 
__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz (const __hip_bfloat16 f)
 
__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz (const __half f)
 
__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz ()=default
 
__FP8_HOST_DEVICE__ operator __half () const
 
__FP8_HOST_DEVICE__ operator __hip_bfloat16 () const
 
__FP8_HOST_DEVICE__ operator bool () const
 
__FP8_HOST_DEVICE__ operator char () const
 
__FP8_HOST_DEVICE__ operator double () const
 
__FP8_HOST_DEVICE__ operator float () const
 
__FP8_HOST_DEVICE__ operator int () const
 
__FP8_HOST_DEVICE__ operator long int () const
 
__FP8_HOST_DEVICE__ operator long long int () const
 
__FP8_HOST_DEVICE__ operator short int () const
 
__FP8_HOST_DEVICE__ operator signed char () const
 
__FP8_HOST_DEVICE__ operator unsigned char () const
 
__FP8_HOST_DEVICE__ operator unsigned int () const
 
__FP8_HOST_DEVICE__ operator unsigned long int () const
 
__FP8_HOST_DEVICE__ operator unsigned long long int () const
 
__FP8_HOST_DEVICE__ operator unsigned short int () const
 

Public Attributes

__hip_fp8_storage_t __x
 

Static Public Attributes

static constexpr __hip_saturation_t __default_saturation = __HIP_SATFINITE
 raw storage of fp8 number
 
static constexpr __hip_fp8_interpretation_t __default_interpret = __HIP_E4M3_FNUZ
 
static constexpr unsigned int __we = 4
 
static constexpr unsigned int __wm = 3
 

Detailed Description

struct representing single fp8 number with e4m3 interpretation

Constructor & Destructor Documentation

◆ __hip_fp8_e4m3_fnuz() [1/11]

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::__hip_fp8_e4m3_fnuz ( const long int val)
inline

create fp8 e4m3 from long

◆ __hip_fp8_e4m3_fnuz() [2/11]

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::__hip_fp8_e4m3_fnuz ( const int val)
inline

create fp8 e4m3 from int

◆ __hip_fp8_e4m3_fnuz() [3/11]

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::__hip_fp8_e4m3_fnuz ( const short int val)
inline

create fp8 e4m3 from short int

◆ __hip_fp8_e4m3_fnuz() [4/11]

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::__hip_fp8_e4m3_fnuz ( const unsigned long int val)
inline

create fp8 e4m3 from unsigned long

◆ __hip_fp8_e4m3_fnuz() [5/11]

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::__hip_fp8_e4m3_fnuz ( const unsigned int val)
inline

create fp8 e4m3 from unsigned int

◆ __hip_fp8_e4m3_fnuz() [6/11]

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::__hip_fp8_e4m3_fnuz ( const unsigned short int val)
inline

create fp8 e4m3 from unsigned short

◆ __hip_fp8_e4m3_fnuz() [7/11]

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::__hip_fp8_e4m3_fnuz ( const double f)
inline

create fp8 e4m3 from double

◆ __hip_fp8_e4m3_fnuz() [8/11]

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::__hip_fp8_e4m3_fnuz ( const float f)
inline

create fp8 e4m3 from float

◆ __hip_fp8_e4m3_fnuz() [9/11]

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::__hip_fp8_e4m3_fnuz ( const __hip_bfloat16 f)
inline

create fp8 e4m3 from __hip_bfloat16

◆ __hip_fp8_e4m3_fnuz() [10/11]

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::__hip_fp8_e4m3_fnuz ( const __half f)
inline

create fp8 e4m3 from __half

◆ __hip_fp8_e4m3_fnuz() [11/11]

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::__hip_fp8_e4m3_fnuz ( )
default

default construct fp8 e4m3

Member Function Documentation

◆ operator __half()

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::operator __half ( ) const
inline

convert fp8 e4m3 to __half

◆ operator __hip_bfloat16()

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::operator __hip_bfloat16 ( ) const
inline

convert fp8 e4m3 to __hip_bfloat16

◆ operator bool()

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::operator bool ( ) const
inline

convert fp8 e4m3 to bool, return false if value is 0, true otherwise

◆ operator char()

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::operator char ( ) const
inline

convert fp8 e4m3 to char, clamp number to CHAR_MIN/CHAR_MAX if its out of range

◆ operator double()

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::operator double ( ) const
inline

convert fp8 e4m3 to double

◆ operator float()

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::operator float ( ) const
inline

convert fp8 e4m3 to float

◆ operator int()

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::operator int ( ) const
inline

convert fp8 e4m3 to int, return 0 if value is NaN

◆ operator long int()

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::operator long int ( ) const
inline

convert fp8 e4m3 to long, return 0 if value is NaN

◆ operator long long int()

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::operator long long int ( ) const
inline

convert fp8 e4m3 to long long, return 0 if value is NaN

◆ operator short int()

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::operator short int ( ) const
inline

convert fp8 e4m3 to short int, clamp out of bound values, return 0 if value is NaN

◆ operator signed char()

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::operator signed char ( ) const
inline

convert fp8 e4m3 to signed char, clamp out of bound values, return 0 if value is NaN

◆ operator unsigned char()

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::operator unsigned char ( ) const
inline

convert fp8 e4m3 to unsigned char, clamp out of bound values, return 0 if value is NaN

◆ operator unsigned int()

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::operator unsigned int ( ) const
inline

convert fp8 e4m3 to unsigned int, return 0 if value is NaN

◆ operator unsigned long int()

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::operator unsigned long int ( ) const
inline

convert fp8 e4m3 to unsigned long, return 0 if value is NaN

◆ operator unsigned long long int()

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::operator unsigned long long int ( ) const
inline

convert fp8 e4m3 to long long int, return 0 if value is NaN

◆ operator unsigned short int()

__FP8_HOST_DEVICE__ __hip_fp8_e4m3_fnuz::operator unsigned short int ( ) const
inline

convert fp8 e4m3 to unsigned short, return 0 if value is NaN


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