1.3.1. Bfloat16 Arithmetic Constants
[Bfloat16 Precision Intrinsics]
To use these constants, include the header file cuda_bf16.h in your program.
Defines
- #define CUDART_INF_BF16
- Defines floating-point positive infinity value for the nv_bfloat16 data type.
- #define CUDART_MAX_NORMAL_BF16
- Defines a maximum representable value for the nv_bfloat16 data type.
- #define CUDART_MIN_DENORM_BF16
- Defines a minimum representable (denormalized) value for the nv_bfloat16 data type.
- #define CUDART_NAN_BF16
- Defines canonical NaN value for the nv_bfloat16 data type.
- #define CUDART_NEG_ZERO_BF16
- Defines a negative zero value for the nv_bfloat16 data type.
- #define CUDART_ONE_BF16
- Defines a value of 1.0 for the nv_bfloat16 data type.
- #define CUDART_ZERO_BF16
- Defines a positive zero value for the nv_bfloat16 data type.
Defines
- #define CUDART_INF_BF16
-
Value
__ushort_as_bfloat16((unsigned short)0x7F80U)
- #define CUDART_MAX_NORMAL_BF16
-
Value
__ushort_as_bfloat16((unsigned short)0x7F7FU)
- #define CUDART_MIN_DENORM_BF16
-
Value
__ushort_as_bfloat16((unsigned short)0x0001U)
- #define CUDART_NAN_BF16
-
Value
__ushort_as_bfloat16((unsigned short)0x7FFFU)
- #define CUDART_NEG_ZERO_BF16
-
Value
__ushort_as_bfloat16((unsigned short)0x8000U)
- #define CUDART_ONE_BF16
-
Value
__ushort_as_bfloat16((unsigned short)0x3F80U)
- #define CUDART_ZERO_BF16
-
Value
__ushort_as_bfloat16((unsigned short)0x0000U)