Table of Contents

Class CudaRegisteredHostMemory

Namespace
JYPPX.CudaSharp
Assembly
JYPPX.CudaSharp.dll

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

buffer byte[]

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

buffer byte[]

The managed buffer to register. 要注册的托管缓冲区。

flags CudaHostRegistrationFlags

The 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

CudaHostRegistrationFlags

IsMapped

Gets whether the registered host buffer is mapped into device address space. 获取该注册的主机缓冲区是否映射到了设备地址空间。

public bool IsMapped { get; }

Property Value

bool

MappedDevicePointerAddress

Gets the mapped device pointer address when the registration is mapped. 在该注册已映射时获取对应的设备指针地址。

public ulong MappedDevicePointerAddress { get; }

Property Value

ulong

SizeInBytes

Gets the buffer size in bytes. 获取缓冲区大小,单位为字节。

public int SizeInBytes { get; }

Property Value

int

Methods

Dispose()

Unregisters the host buffer and releases its pinned handle. 取消注册主机缓冲区并释放其固定句柄。

public void Dispose()