Function cust::memory::cuda_malloc_async
source · [−]pub unsafe fn cuda_malloc_async<T: DeviceCopy>(
stream: &Stream,
count: usize
) -> CudaResult<DevicePointer<T>>
Expand description
Unsafe wrapper around cuMemAllocAsync
which queues a memory allocation operation on a stream.
Retains all of the unsafe semantics of cuda_malloc
with the extra requirement that the memory
must not be used until it is allocated on the stream. Therefore, proper stream ordering semantics must be
respected.
Safety
The memory behind the returned pointer must not be used in any way until the allocation actually takes place in the stream.