hipCUB
|
Host-based fp16 data type compatible and convertible with __half. More...
#include <half.hpp>
Public Member Functions | |
__host__ __device__ __forceinline__ | half_t (const __half &other) |
Constructor from __half. | |
__host__ __device__ __forceinline__ | half_t (int a) |
Constructor from integer. | |
half_t ()=default | |
Default constructor. | |
__host__ __device__ __forceinline__ | half_t (float a) |
Constructor from float. | |
__host__ __device__ __forceinline__ | operator float () const |
Cast to float. | |
__host__ __device__ __forceinline__ uint16_t | raw () const |
Get raw storage. | |
__host__ __device__ __forceinline__ bool | operator== (const half_t &other) const |
Equality. | |
__host__ __device__ __forceinline__ bool | operator!= (const half_t &other) const |
Inequality. | |
__host__ __device__ __forceinline__ half_t & | operator+= (const half_t &rhs) |
Assignment by sum. | |
__host__ __device__ __forceinline__ half_t | operator* (const half_t &other) |
Multiply. | |
__host__ __device__ __forceinline__ half_t | operator/ (const half_t &other) const |
Divide. | |
__host__ __device__ __forceinline__ half_t | operator+ (const half_t &other) |
Add. | |
__host__ __device__ __forceinline__ half_t | operator- (const half_t &other) |
Subtract. | |
__host__ __device__ __forceinline__ bool | operator< (const half_t &other) const |
Less-than. | |
__host__ __device__ __forceinline__ bool | operator<= (const half_t &other) const |
Less-than-equal. | |
__host__ __device__ __forceinline__ bool | operator> (const half_t &other) const |
Greater-than. | |
__host__ __device__ __forceinline__ bool | operator>= (const half_t &other) const |
Greater-than-equal. | |
Static Public Member Functions | |
__host__ __device__ static __forceinline__ half_t | max () |
numeric_traits<half_t>::max | |
__host__ __device__ static __forceinline__ half_t | lowest () |
numeric_traits<half_t>::lowest | |
Public Attributes | |
uint16_t | __x |
Host-based fp16 data type compatible and convertible with __half.