1.1.5. C++ struct for handling fp8 data type of e4m3 kind.

[FP8 Intrinsics]

Classes

struct 
__nv_fp8_e4m3 datatype

Functions

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

Variables

__nv_fp8_storage_t __nv_fp8_e4m3::__x

Functions

__host____device__ ​ __nv_fp8_e4m3::__nv_fp8_e4m3 ( 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_e4m3::__nv_fp8_e4m3 ( const long int  val ) [inline]
Description

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

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

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

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

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

__host____device__ ​ __nv_fp8_e4m3::__nv_fp8_e4m3 ( 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_e4m3::__nv_fp8_e4m3 ( const unsigned long int val ) [inline]
Description

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

__host____device__ ​ __nv_fp8_e4m3::__nv_fp8_e4m3 ( 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_e4m3::__nv_fp8_e4m3 ( 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_e4m3::__nv_fp8_e4m3 ( const double  f ) [inline]
Description

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

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

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

__host____device__ ​ __nv_fp8_e4m3::__nv_fp8_e4m3 ( 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_e4m3::__nv_fp8_e4m3 ( const __half f ) [inline]
Description

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

__nv_fp8_e4m3::__nv_fp8_e4m3 ( )
Description

Constructor by default.

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

Conversion operator to __half data type.

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

Conversion operator to __nv_bfloat16 data type.

__host____device__ ​ __nv_fp8_e4m3::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_e4m3::operator char ( ) const [inline]
Description

Conversion operator to an implementation defined char data type.

Detects signedness of the char type and proceeds accordingly, see further details in signed and unsigned char operators.

Clamps inputs to the output range. NaN inputs convert to zero.

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

Conversion operator to double data type.

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

Conversion operator to float data type.

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

Conversion operator to int data type. NaN inputs convert to zero.

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

Conversion operator to longint data type. Clamps too large inputs to the output range. NaN inputs convert to zero if output type is 32-bit. NaN inputs convert to 0x8000000000000000ULL if output type is 64-bit.

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

Conversion operator to longlongint data type. NaN inputs convert to 0x8000000000000000LL.

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

Conversion operator to shortint data type. NaN inputs convert to zero.

__host____device__ ​ __nv_fp8_e4m3::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_e4m3::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_e4m3::operator unsigned int ( ) const [inline]
Description

Conversion operator to unsignedint data type. Clamps negative inputs to zero. NaN inputs convert to zero.

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

Conversion operator to unsignedlongint data type. Clamps negative and too large inputs to the output range. NaN inputs convert to zero if output type is 32-bit. NaN inputs convert to 0x8000000000000000ULL if output type is 64-bit.

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

Conversion operator to unsignedlonglongint data type. Clamps negative inputs to zero. NaN inputs convert to 0x8000000000000000ULL.

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

Conversion operator to unsignedshortint data type. Clamps negative inputs to zero. NaN inputs convert to zero.

Variables

__nv_fp8_storage_t __nv_fp8_e4m3::__x

Storage variable contains the fp8 floating-point data.