HIP: Heterogenous-computing Interface for Portability
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
__hip_fp8_e5m2_fnuz Struct Reference

struct representing one fp8 number with e5m2 interpretation More...

#include <amd_hip_fp8.h>

Public Member Functions

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz (const long int val)
 
__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz (const int val)
 
__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz (const short int val)
 
__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz (const unsigned long int val)
 
__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz (const unsigned int val)
 
__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz (const unsigned short int val)
 
__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz (const double f)
 
__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz (const float f)
 
__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz (const __hip_bfloat16 f)
 
__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz (const __half f)
 
__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz ()=default
 
__FP8_HOST_DEVICE__ operator float () const
 
__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 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 one fp8 numbers
 
static constexpr __hip_fp8_interpretation_t __default_interpret = __HIP_E5M2_FNUZ
 
static constexpr unsigned int __we = 5
 
static constexpr unsigned int __wm = 2
 

Detailed Description

struct representing one fp8 number with e5m2 interpretation

Constructor & Destructor Documentation

◆ __hip_fp8_e5m2_fnuz() [1/11]

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

create fp8 e5m2 type from long

◆ __hip_fp8_e5m2_fnuz() [2/11]

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz::__hip_fp8_e5m2_fnuz ( const int  val)
inline

create fp8 e5m2 type from int

◆ __hip_fp8_e5m2_fnuz() [3/11]

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

create fp8 e5m2 type from short int

◆ __hip_fp8_e5m2_fnuz() [4/11]

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

create fp8 e5m2 type from unsigned long

◆ __hip_fp8_e5m2_fnuz() [5/11]

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

create fp8 e5m2 type from unsigned int

◆ __hip_fp8_e5m2_fnuz() [6/11]

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

create fp8 e5m2 type from unsigned short

◆ __hip_fp8_e5m2_fnuz() [7/11]

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz::__hip_fp8_e5m2_fnuz ( const double  f)
inline

create fp8 e5m2 type from double

◆ __hip_fp8_e5m2_fnuz() [8/11]

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz::__hip_fp8_e5m2_fnuz ( const float  f)
inline

create fp8 e5m2 type from float

◆ __hip_fp8_e5m2_fnuz() [9/11]

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz::__hip_fp8_e5m2_fnuz ( const __hip_bfloat16  f)
inline

create fp8 e5m2 type from __hip_bfloat16

◆ __hip_fp8_e5m2_fnuz() [10/11]

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz::__hip_fp8_e5m2_fnuz ( const __half  f)
inline

create fp8 e5m2 type from __hip_bfloat16

◆ __hip_fp8_e5m2_fnuz() [11/11]

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz::__hip_fp8_e5m2_fnuz ( )
default

default construct fp8 e5m2

Member Function Documentation

◆ operator __half()

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz::operator __half ( ) const
inline

convert fp8 e5m2 to __half

◆ operator __hip_bfloat16()

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz::operator __hip_bfloat16 ( ) const
inline

convert fp8 e5m2 to __hip_bfloat16

◆ operator bool()

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_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_e5m2_fnuz::operator char ( ) const
inline

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

◆ operator double()

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz::operator double ( ) const
inline

convert fp8 e5m2 to double

◆ operator float()

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz::operator float ( ) const
inline

convert fp8 e5m2 to float

◆ operator int()

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz::operator int ( ) const
inline

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

◆ operator long int()

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz::operator long int ( ) const
inline

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

◆ operator long long int()

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

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

◆ operator short int()

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz::operator short int ( ) const
inline

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

◆ operator signed char()

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz::operator signed char ( ) const
inline

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

◆ operator unsigned char()

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz::operator unsigned char ( ) const
inline

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

◆ operator unsigned int()

__FP8_HOST_DEVICE__ __hip_fp8_e5m2_fnuz::operator unsigned int ( ) const
inline

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

◆ operator unsigned long int()

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

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

◆ operator unsigned long long int()

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

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

◆ operator unsigned short int()

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

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


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