2.6. __nv_bfloat162 Struct Reference

[Bfloat16 Precision Intrinsics]

This structure implements the datatype for storing two nv_bfloat16 floating-point numbers. The structure implements assignment, arithmetic and comparison operators, and type conversions.

Public Constructors

__host____device__ ​ __nv_bfloat162 ( const __nv_bfloat162_raw& h2r )
__host____device__ ​ __nv_bfloat162 ( const __nv_bfloat162& src )
__host____device__ ​ __nv_bfloat162 ( const __nv_bfloat16& a, const __nv_bfloat16& b )
__host____device__ ​ __nv_bfloat162 ( )

Public Member Functions

__host____device__ ​  operator __nv_bfloat162_raw ( ) const
__host____device____nv_bfloat162operator= ( const __nv_bfloat162_raw& h2r )
__host____device____nv_bfloat162operator= ( const __nv_bfloat162& src )

Public Variables

struct __nv_bfloat16 x
struct __nv_bfloat16 y

Constructors

__host____device____nv_bfloat162::__nv_bfloat162 ( const __nv_bfloat162_raw& h2r )
Description

Constructor from __nv_bfloat162_raw

__host____device____nv_bfloat162::__nv_bfloat162 ( const __nv_bfloat162& src )
Description

Copy constructor

__host____device____nv_bfloat162::__nv_bfloat162 ( const __nv_bfloat16& a, const __nv_bfloat16& b ) [inline]
Description

Constructor from two __nv_bfloat16 variables

__host____device____nv_bfloat162::__nv_bfloat162 ( )
Description

Constructor by default.

Member Functions

__host____device____nv_bfloat162::operator __nv_bfloat162_raw ( ) const [inherited]
Description

Conversion operator to __nv_bfloat162_raw

__host____device____nv_bfloat162& __nv_bfloat162::operator= ( const __nv_bfloat162_raw& h2r ) [inherited]
Description

Assignment operator from __nv_bfloat162_raw

__host____device____nv_bfloat162& __nv_bfloat162::operator= ( const __nv_bfloat162& src ) [inherited]
Description

Copy assignment operator

Variables

struct __nv_bfloat16__nv_bfloat162::x [inherited]

Storage field holding lower __nv_bfloat16 part.

struct __nv_bfloat16__nv_bfloat162::y [inherited]

Storage field holding upper __nv_bfloat16 part.