Vector#

classnvmath.device.Vector(real_dtype,size)[source]#

Vector type that can be used to represent vector numbers bothon host and device side. Host side representation uses numpy structureddtypes to represent the vector components, while device side representationuses custom numba types. This difference is necessary because devicefunctions expect alignment of the vector types to be the same as the size ofthe vector, which is not the case for numpy structured dtypes.np_float16x2 andnp_float16x4 are the host sidedtypes andfloat16x2_type andfloat16x4_type are thedevice side types.

Methods

__init__(real_dtype,size)[source]#

Attributes

dtype#
make#
real_dtype#
size#