2.12. __nv_fp8x2_e5m2 Struct Reference

[C++ struct for handling vector type of two fp8 values of e5m2 kind.]

This structure implements the datatype for handling two fp8 floating-point numbers of e5m2 kind each: with 1 sign, 5 exponent, 1 implicit and 2 explicit mantissa bits.

The structure implements converting constructors and operators.

Public Constructors

__host____device__ ​ __nv_fp8x2_e5m2 ( const double2 f )
__host____device__ ​ __nv_fp8x2_e5m2 ( const float2 f )
__host____device__ ​ __nv_fp8x2_e5m2 ( const __nv_bfloat162 f )
__host____device__ ​ __nv_fp8x2_e5m2 ( const __half2 f )
 __nv_fp8x2_e5m2 ( )

Public Member Functions

__host____device__ ​  operator __half2 ( ) const
__host____device__ ​  operator float2 ( ) const

Public Variables

__nv_fp8x2_storage_t __x

Constructors

__host____device____nv_fp8x2_e5m2::__nv_fp8x2_e5m2 ( const double2 f ) [inline, explicit]
Description

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

__host____device____nv_fp8x2_e5m2::__nv_fp8x2_e5m2 ( const float2 f ) [inline, explicit]
Description

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

__host____device____nv_fp8x2_e5m2::__nv_fp8x2_e5m2 ( const __nv_bfloat162 f ) [inline, explicit]
Description

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

__host____device____nv_fp8x2_e5m2::__nv_fp8x2_e5m2 ( const __half2 f ) [inline, explicit]
Description

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

__nv_fp8x2_e5m2::__nv_fp8x2_e5m2 ( )
Description

Constructor by default.

Member Functions

__host____device____nv_fp8x2_e5m2::operator __half2 ( ) const [inherited, inline]
Description

Conversion operator to __half2 data type.

__host____device____nv_fp8x2_e5m2::operator float2 ( ) const [inherited, inline]
Description

Conversion operator to float2 data type.

Variables

__nv_fp8x2_storage_t__nv_fp8x2_e5m2::__x [inherited]

Storage variable contains the vector of two fp8 floating-point data values.