Vector#
-
class nvmath.
device. Vector(real_dtype, size)[source]# 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_float16x2andnp_float16x4are the host side dtypes andfloat16x2_typeandfloat16x4_typeare the device side types.Methods
Attributes
- dtype#
- make#
- real_dtype#
- size#