Class CudaRegisteredHostMemory
Registers a managed byte buffer as CUDA pinned host memory for asynchronous transfers. 将托管字节缓冲区注册为 CUDA pinned host memory 以支持异步传输。
public sealed class CudaRegisteredHostMemory : IDisposable
- Inheritance
-
CudaRegisteredHostMemory
- Implements
- Inherited Members
Constructors
CudaRegisteredHostMemory(byte[])
Registers a managed buffer with default CUDA host-registration flags. 使用默认 CUDA host registration 标志注册托管缓冲区。
public CudaRegisteredHostMemory(byte[] buffer)
Parameters
bufferbyte[]The managed buffer to register. 要注册的托管缓冲区。
CudaRegisteredHostMemory(byte[], CudaHostRegistrationFlags)
Registers a managed buffer with explicit CUDA host-registration flags. 使用显式 CUDA host registration 标志注册托管缓冲区。
public CudaRegisteredHostMemory(byte[] buffer, CudaHostRegistrationFlags flags)
Parameters
bufferbyte[]The managed buffer to register. 要注册的托管缓冲区。
flagsCudaHostRegistrationFlagsThe host-registration flags. host registration 标志。
Properties
Buffer
Gets the registered managed buffer. 获取已注册的托管缓冲区。
public byte[] Buffer { get; }
Property Value
- byte[]
Flags
Gets the CUDA host-registration flags. 获取 CUDA host registration 标志。
public CudaHostRegistrationFlags Flags { get; }
Property Value
IsMapped
Gets whether the registered host buffer is mapped into device address space. 获取该注册的主机缓冲区是否映射到了设备地址空间。
public bool IsMapped { get; }
Property Value
MappedDevicePointerAddress
Gets the mapped device pointer address when the registration is mapped. 在该注册已映射时获取对应的设备指针地址。
public ulong MappedDevicePointerAddress { get; }
Property Value
SizeInBytes
Gets the buffer size in bytes. 获取缓冲区大小,单位为字节。
public int SizeInBytes { get; }
Property Value
Methods
Dispose()
Unregisters the host buffer and releases its pinned handle. 取消注册主机缓冲区并释放其固定句柄。
public void Dispose()