legate::Half#

class Half#

The half-precision floating point type used in Legate.

Due to the incomplete support for half-precision floating point types in both C++ and standard libraries, it is unspecified which operators and member functions exist on the Half type, except:

#. The type shall be constructible from and convertible to, float. #. The type shall be assignable from float, i.e. some_half = 1.0F shall do what you expect. #. When Legate is compiled with CUDA enabled, Half will be an alias to CUDA’s native __half type.

See for further information on the CUDA __half type.

Public Functions

explicit Half(float) noexcept#

Construct a Half from a float.

Half &operator=(float) noexcept#

Assign a float to a Half.

Returns:

A reference to this.

operator float() const noexcept#

Convert a Half to float.

Returns:

The current value as a float.