1.1.2. C++ struct for handling fp8 data type of e5m2 kind.

[FP8 Intrinsics]

Classes

struct 
__nv_fp8_e5m2 datatype

Functions

__host____device__ ​  __nv_fp8_e5m2::__nv_fp8_e5m2 ( const long long int val )
__host____device__ ​  __nv_fp8_e5m2::__nv_fp8_e5m2 ( const int  val )
__host____device__ ​  __nv_fp8_e5m2::__nv_fp8_e5m2 ( const short int val )
__host____device__ ​  __nv_fp8_e5m2::__nv_fp8_e5m2 ( const unsigned long long int val )
__host____device__ ​  __nv_fp8_e5m2::__nv_fp8_e5m2 ( const unsigned int  val )
__host____device__ ​  __nv_fp8_e5m2::__nv_fp8_e5m2 ( const unsigned short int val )
__host____device__ ​  __nv_fp8_e5m2::__nv_fp8_e5m2 ( const double  f )
__host____device__ ​  __nv_fp8_e5m2::__nv_fp8_e5m2 ( const float  f )
__host____device__ ​  __nv_fp8_e5m2::__nv_fp8_e5m2 ( const __nv_bfloat16 f )
__host____device__ ​  __nv_fp8_e5m2::__nv_fp8_e5m2 ( const __half f )
 __nv_fp8_e5m2::__nv_fp8_e5m2 ( )
__host____device__ ​  __nv_fp8_e5m2::operator __half ( ) const
__host____device__ ​  __nv_fp8_e5m2::operator __nv_bfloat16 ( ) const
__host____device__ ​  __nv_fp8_e5m2::operator bool ( ) const
__host____device__ ​  __nv_fp8_e5m2::operator double ( ) const
__host____device__ ​  __nv_fp8_e5m2::operator float ( ) const
__host____device__ ​  __nv_fp8_e5m2::operator int ( ) const
__host____device__ ​  __nv_fp8_e5m2::operator long long int ( ) const
__host____device__ ​  __nv_fp8_e5m2::operator short int ( ) const
__host____device__ ​  __nv_fp8_e5m2::operator signed char ( ) const
__host____device__ ​  __nv_fp8_e5m2::operator unsigned char ( ) const
__host____device__ ​  __nv_fp8_e5m2::operator unsigned int ( ) const
__host____device__ ​  __nv_fp8_e5m2::operator unsigned long long int ( ) const
__host____device__ ​  __nv_fp8_e5m2::operator unsigned short int ( ) const

Variables

__nv_fp8_storage_t __nv_fp8_e5m2::__x

Functions

__host____device__ ​ __nv_fp8_e5m2::__nv_fp8_e5m2 ( const long long int val ) [inline]
Description

Constructor from longlongint data type, relies on __NV_SATFINITE behavior for out-of-range values.

__host____device__ ​ __nv_fp8_e5m2::__nv_fp8_e5m2 ( const int  val ) [inline]
Description

Constructor from int data type, relies on __NV_SATFINITE behavior for out-of-range values.

__host____device__ ​ __nv_fp8_e5m2::__nv_fp8_e5m2 ( const short int val ) [inline]
Description

Constructor from shortint data type.

__host____device__ ​ __nv_fp8_e5m2::__nv_fp8_e5m2 ( const unsigned long long int val ) [inline]
Description

Constructor from unsignedlonglongint data type, relies on __NV_SATFINITE behavior for out-of-range values.

__host____device__ ​ __nv_fp8_e5m2::__nv_fp8_e5m2 ( const unsigned int  val ) [inline]
Description

Constructor from unsignedint data type, relies on __NV_SATFINITE behavior for out-of-range values.

__host____device__ ​ __nv_fp8_e5m2::__nv_fp8_e5m2 ( const unsigned short int val ) [inline]
Description

Constructor from unsignedshortint data type, relies on __NV_SATFINITE behavior for out-of-range values.

__host____device__ ​ __nv_fp8_e5m2::__nv_fp8_e5m2 ( const double  f ) [inline]
Description

Constructor from double data type, relies on __NV_SATFINITE behavior for out-of-range values.

__host____device__ ​ __nv_fp8_e5m2::__nv_fp8_e5m2 ( const float  f ) [inline]
Description

Constructor from float data type, relies on __NV_SATFINITE behavior for out-of-range values.

__host____device__ ​ __nv_fp8_e5m2::__nv_fp8_e5m2 ( const __nv_bfloat16 f ) [inline]
Description

Constructor from __nv_bfloat16 data type, relies on __NV_SATFINITE behavior for out-of-range values.

__host____device__ ​ __nv_fp8_e5m2::__nv_fp8_e5m2 ( const __half f ) [inline]
Description

Constructor from __half data type, relies on __NV_SATFINITE behavior for out-of-range values.

__nv_fp8_e5m2::__nv_fp8_e5m2 ( )
Description

Constructor by default.

__host____device__ ​ __nv_fp8_e5m2::operator __half ( ) const [inline]
Description

Conversion operator to __half data type.

__host____device__ ​ __nv_fp8_e5m2::operator __nv_bfloat16 ( ) const [inline]
Description

Conversion operator to __nv_bfloat16 data type.

__host____device__ ​ __nv_fp8_e5m2::operator bool ( ) const [inline]
Description

Conversion operator to bool data type. +0 and -0 inputs convert to false. Non-zero inputs convert to true.

__host____device__ ​ __nv_fp8_e5m2::operator double ( ) const [inline]
Description

Conversion operator to double data type.

__host____device__ ​ __nv_fp8_e5m2::operator float ( ) const [inline]
Description

Conversion operator to float data type.

__host____device__ ​ __nv_fp8_e5m2::operator int ( ) const [inline]
Description

Conversion operator to int data type. Clamps too large inputs to the output range. NaN inputs convert to zero.

__host____device__ ​ __nv_fp8_e5m2::operator long long int ( ) const [inline]
Description

Conversion operator to longlongint data type. Clamps too large inputs to the output range. NaN inputs convert to 0x8000000000000000LL.

__host____device__ ​ __nv_fp8_e5m2::operator short int ( ) const [inline]
Description

Conversion operator to shortint data type. Clamps too large inputs to the output range. NaN inputs convert to zero.

__host____device__ ​ __nv_fp8_e5m2::operator signed char ( ) const [inline]
Description

Conversion operator to signedchar data type. Clamps too large inputs to the output range. NaN inputs convert to zero.

__host____device__ ​ __nv_fp8_e5m2::operator unsigned char ( ) const [inline]
Description

Conversion operator to unsignedchar data type. Clamps negative and too large inputs to the output range. NaN inputs convert to zero.

__host____device__ ​ __nv_fp8_e5m2::operator unsigned int ( ) const [inline]
Description

Conversion operator to unsignedint data type. Clamps negative and too large inputs to the output range. NaN inputs convert to zero.

__host____device__ ​ __nv_fp8_e5m2::operator unsigned long long int ( ) const [inline]
Description

Conversion operator to unsignedlonglongint data type. Clamps negative and too large inputs to the output range. NaN inputs convert to 0x8000000000000000ULL.

__host____device__ ​ __nv_fp8_e5m2::operator unsigned short int ( ) const [inline]
Description

Conversion operator to unsignedshortint data type. Clamps negative and too large inputs to the output range. NaN inputs convert to zero.

Variables

__nv_fp8_storage_t __nv_fp8_e5m2::__x

Storage variable contains the fp8 floating-point data.