2.10. __nv_fp8_e5m2 Struct Reference
[C++ struct for handling fp8 data type of e5m2 kind.]
This structure implements the datatype for handling fp8 floating-point numbers of e5m2 kind: with 1 sign, 5 exponent, 1 implicit and 2 explicit mantissa bits.
The structure implements converting constructors and operators.
Public Constructors
- __host__ __device__ __nv_fp8_e5m2 ( const long long int val )
- __host__ __device__ __nv_fp8_e5m2 ( const long int val )
- __host__ __device__ __nv_fp8_e5m2 ( const int val )
- __host__ __device__ __nv_fp8_e5m2 ( const short int val )
- __host__ __device__ __nv_fp8_e5m2 ( const unsigned long long int val )
- __host__ __device__ __nv_fp8_e5m2 ( const unsigned long int val )
- __host__ __device__ __nv_fp8_e5m2 ( const unsigned int val )
- __host__ __device__ __nv_fp8_e5m2 ( const unsigned short int val )
- __host__ __device__ __nv_fp8_e5m2 ( const double f )
- __host__ __device__ __nv_fp8_e5m2 ( const float f )
- __host__ __device__ __nv_fp8_e5m2 ( const __nv_bfloat16 f )
- __host__ __device__ __nv_fp8_e5m2 ( const __half f )
- __nv_fp8_e5m2 ( )
Public Member Functions
- __host__ __device__ operator __half ( ) const
- __host__ __device__ operator __nv_bfloat16 ( ) const
- __host__ __device__ operator bool ( ) const
- __host__ __device__ operator char ( ) const
- __host__ __device__ operator double ( ) const
- __host__ __device__ operator float ( ) const
- __host__ __device__ operator int ( ) const
- __host__ __device__ operator long int ( ) const
- __host__ __device__ operator long long int ( ) const
- __host__ __device__ operator short int ( ) const
- __host__ __device__ operator signed char ( ) const
- __host__ __device__ operator unsigned char ( ) const
- __host__ __device__ operator unsigned int ( ) const
- __host__ __device__ operator unsigned long int ( ) const
- __host__ __device__ operator unsigned long long int ( ) const
- __host__ __device__ operator unsigned short int ( ) const
Public Variables
Constructors
- __host__ __device__ __nv_fp8_e5m2::__nv_fp8_e5m2 ( const long long int val ) [inline, explicit]
-
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 long int val ) [inline, explicit]
-
Description
Constructor from longint data type, relies on __NV_SATFINITE behavior for out-of-range values.
- __host__ __device__ __nv_fp8_e5m2::__nv_fp8_e5m2 ( const int val ) [inline, explicit]
-
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, explicit]
-
Description
Constructor from shortint data type.
- __host__ __device__ __nv_fp8_e5m2::__nv_fp8_e5m2 ( const unsigned long long int val ) [inline, explicit]
-
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 long int val ) [inline, explicit]
-
Description
Constructor from unsignedlongint 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, explicit]
-
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, explicit]
-
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, explicit]
-
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, explicit]
-
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, explicit]
-
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, explicit]
-
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.
Member Functions
- __host__ __device__ __nv_fp8_e5m2::operator __half ( ) const [inherited, inline]
-
Description
Conversion operator to __half data type.
- __host__ __device__ __nv_fp8_e5m2::operator __nv_bfloat16 ( ) const [inherited, inline]
-
Description
Conversion operator to __nv_bfloat16 data type.
- __host__ __device__ __nv_fp8_e5m2::operator bool ( ) const [inherited, 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 char ( ) const [inherited, 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_e5m2::operator double ( ) const [inherited, inline]
-
Description
Conversion operator to double data type.
- __host__ __device__ __nv_fp8_e5m2::operator float ( ) const [inherited, inline]
-
Description
Conversion operator to float data type.
- __host__ __device__ __nv_fp8_e5m2::operator int ( ) const [inherited, 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 int ( ) const [inherited, 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_e5m2::operator long long int ( ) const [inherited, 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 [inherited, 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 [inherited, 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 [inherited, 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 [inherited, 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 int ( ) const [inherited, 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_e5m2::operator unsigned long long int ( ) const [inherited, 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 [inherited, 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 [inherited]
-
Storage variable contains the fp8 floating-point data.