half2#

nvmath.device.half2 = <nvmath.device.types.Vector object>#

Vector type that can be used to represent vector numbers both on host and device side. Host side representation uses numpy structured dtypes to represent the vector components, while device side representation uses custom numba types. This difference is necessary because device functions expect alignment of the vector types to be the same as the size of the vector, which is not the case for numpy structured dtypes. np_float16x2 and np_float16x4 are the host side dtypes and float16x2_type and float16x4_type are the device side types.