15.2.__half2
- struct__half2
__half2 data type
This structure implements the datatype for storing two half-precision floating-point numbers. The structure implements assignment, arithmetic and comparison operators, and type conversions.
NOTE:__half2 is visible to non-nvcc host compilers
Public Functions
- __half2()=default
Constructor by default.
Emtpy default constructor, result is uninitialized.
- __host____device__inlineconstexpr__half2(const__half&a,const__half&b)
Constructor from two
__halfvariables.
- __host____device__inline__half2(const__half2&&src)
Move constructor, available for
C++11and later dialects.
- __host____device__inline__half2(const__half2_raw&h2r)
Constructor from
__half2_raw.
- __host____device__operator__half2_raw()const
Conversion operator to
__half2_raw.
- __host____device____half2&operator=(const__half2&&src)
Move assignment operator, available for
C++11and later dialects.
- __host____device____half2&operator=(const__half2_raw&h2r)
Assignment operator from
__half2_raw.