Class CudaIpcExportToken
Immutable managed copy of an opaque CUDA IPC export token. CUDA IPC opaque 导出 token 的不可变托管副本。
public sealed class CudaIpcExportToken
- Inheritance
-
CudaIpcExportToken
- Inherited Members
Remarks
This value does not own the exported CUDA resource. Keep the source event or memory allocation alive while another process uses the token. This API intentionally does not open imported resources. 此值不拥有被导出的 CUDA 资源。其他进程使用 token 期间必须保持源 event 或 memory allocation 存活; 本 API 有意不负责打开 imported resource。
Properties
Kind
Gets the exported CUDA resource kind. 获取导出的 CUDA 资源类型。
public CudaIpcExportTokenKind Kind { get; }
Property Value
Length
Gets the copied token length in bytes. 获取复制 token 的字节长度。
public int Length { get; }
Property Value
Methods
FromBytes(CudaIpcExportTokenKind, byte[])
Creates an immutable token from transported bytes. 从传输后的字节创建不可变 token。
public static CudaIpcExportToken FromBytes(CudaIpcExportTokenKind kind, byte[] bytes)
Parameters
kindCudaIpcExportTokenKindThe CUDA resource kind represented by the token. token 表示的 CUDA 资源类型。
bytesbyte[]The opaque token bytes received from the exporting process. 从导出进程接收的 opaque token 字节。
Returns
- CudaIpcExportToken
An immutable managed token copy. 不可变的托管 token 副本。
ToArray()
Returns a new copy of the opaque token bytes. 返回 opaque token 字节的新副本。
public byte[] ToArray()
Returns
- byte[]
ToHexString()
Returns the opaque token as uppercase hexadecimal text. 将 opaque token 返回为大写十六进制文本。
public string ToHexString()
Returns
ToString()
Returns a non-secret diagnostic summary. 返回不包含 token 内容的诊断摘要。
public override string ToString()