complex32#

nvmath.device.complex32 = <nvmath.device.types.Complex object>#

Complex type that can be used to represent complex numbers both on host and device side. Numpy does not provide a built-in complex type with 16-bit real and imaginary parts, so we define our own dtype for that case. For 32-bit and 64-bit complex numbers, we can use the built-in numpy dtypes. However on device side we expect those types to be aligned to the full size of the complex type, so the array defined on host and device side will have different type and alignment. np_float16x2, numpy.dtype(numpy.complex64) and numpy.dtype(numpy.complex128) are the host side dtypes and float16x2_type, float32x2_type and float64x2_type are the device side types.