e8m0_bexp_t Struct Reference#
Public Types |
Public Member Functions |
Public Attributes |
Static Public Attributes |
List of all members  
  ck::e8m0_bexp_t Struct Reference
  Unsigned representation of a conventional biased Float32 exponent. More...
#include <e8m0.hpp>
Public Types | |
| using | type = uint8_t | 
Public Member Functions | |
| __host__ constexpr __device__ | e8m0_bexp_t () | 
| __host__ constexpr __device__ | e8m0_bexp_t (type init) | 
| __host__ constexpr __device__ | e8m0_bexp_t (int init) | 
| __host__ constexpr __device__ | e8m0_bexp_t (float scale) | 
| __host__ constexpr __device__ | operator float () const | 
| __host__ constexpr __device__ bool | operator== (const e8m0_bexp_t &other) const | 
| __host__ constexpr __device__ bool | is_nan () const | 
Public Attributes | |
| type | data | 
Static Public Attributes | |
| constexpr static type | bias = 127 | 
| constexpr static type | nan_mask = 0xFF | 
Detailed Description
Unsigned representation of a conventional biased Float32 exponent.
bias = 127;
E8M0_1 = 0b01111111; => 2^(127-127) = 1 E8M0_2 = 0b10000000; => 2^(128-127) = 2^1 = 2 E8M0_3 = 0b10000010; => 2^(130-127) = 2^3 = 8 E8M0_135 = 0b10000111; => 2^(135-127) = 2^8 = 256 E8M0_142 = 0b10001110; => 2^(142-127) = 2^15 = 32768 E8M0_MIN = 0b00000000; => 2^-127 E8M0_MAX = 0b11111110; => 2^127 E8M0_NAN = 0b11111111; => NaN
Member Typedef Documentation
◆ type
| using ck::e8m0_bexp_t::type = uint8_t | 
Constructor & Destructor Documentation
◆ e8m0_bexp_t() [1/4]
      
  | 
  inlineconstexpr | 
◆ e8m0_bexp_t() [2/4]
      
  | 
  inlineconstexpr | 
◆ e8m0_bexp_t() [3/4]
      
  | 
  inlineconstexpr | 
◆ e8m0_bexp_t() [4/4]
      
  | 
  inlineexplicitconstexpr | 
Member Function Documentation
◆ is_nan()
      
  | 
  inlineconstexpr | 
◆ operator float()
      
  | 
  inlineexplicitconstexpr | 
◆ operator==()
      
  | 
  inlineconstexpr | 
Member Data Documentation
◆ bias
      
  | 
  staticconstexpr | 
◆ data
| type ck::e8m0_bexp_t::data | 
◆ nan_mask
      
  | 
  staticconstexpr | 
The documentation for this struct was generated from the following file:
- include/ck/utility/e8m0.hpp