cuvec.cpython#
Thin wrappers around cuvec_cpython
C++/CUDA module
CuVec Objects#
class CuVec(np.ndarray)
A numpy.ndarray
compatible view with a cuvec
member containing the underlying cuvec.PyCuVec_*
object (for use in CPython API function calls).
__array_interface__#
https://numpy.org/doc/stable/reference/arrays.interface.html
__cuda_array_interface__#
@property
def __cuda_array_interface__() -> Dict[str, Any]
https://numba.readthedocs.io/en/stable/cuda/cuda_array_interface.html
zeros#
def zeros(shape: Shape, dtype="float32") -> CuVec
Returns a cuvec.CuVec
view of a new numpy.ndarray
of the specified shape and data type (cuvec
equivalent of numpy.zeros
).
copy#
def copy(arr) -> CuVec
Returns a cuvec.CuVec
view of a new numpy.ndarray
with data copied from the specified arr
(cuvec
equivalent of numpy.copy
).
asarray#
def asarray(arr, dtype=None, order=None) -> CuVec
Returns a cuvec.CuVec
view of arr
, avoiding memory copies if possible. (cuvec
equivalent of numpy.asarray
).