Struct CudaDevResourceSnapshot
Pointer-free copy of the observable fields in a CUDA device resource. CUDA 设备资源可观察字段的无指针复制快照。
public readonly struct CudaDevResourceSnapshot : IEquatable<CudaDevResourceSnapshot>
- Implements
- Inherited Members
Remarks
CUDA keeps internal padding, opaque workqueue state, and a linked-resource pointer
inside cudaDevResource. This snapshot intentionally never exposes or reuses
those fields; it is suitable for capability and partition-planning diagnostics only.
CUDA 在 cudaDevResource 内维护内部填充、opaque workqueue 状态和链式资源指针;
此快照有意不暴露或复用这些字段,只适合能力与分区规划诊断。
Properties
DeviceOrdinal
Gets the associated CUDA device ordinal. 获取关联的 CUDA 设备序号。
public int DeviceOrdinal { get; }
Property Value
HasNextResource
Gets whether CUDA reported another linked resource without exposing its pointer. 获取 CUDA 是否报告了另一个链式资源,但不暴露其指针。
public bool HasNextResource { get; }
Property Value
HasOpaqueWorkqueue
Gets whether an opaque workqueue was present. 获取是否存在不透明工作队列。
public bool HasOpaqueWorkqueue { get; }
Property Value
IsSmResource
Gets whether this snapshot describes an SM resource. 获取此快照是否描述 SM 资源。
public bool IsSmResource { get; }
Property Value
IsValid
Gets whether CUDA reported a valid resource. 获取 CUDA 是否报告了有效资源。
public bool IsValid { get; }
Property Value
IsWorkqueue
Gets whether this snapshot describes an opaque workqueue. 获取此快照是否描述不透明工作队列。
public bool IsWorkqueue { get; }
Property Value
IsWorkqueueConfig
Gets whether this snapshot describes workqueue configuration. 获取此快照是否描述工作队列配置。
public bool IsWorkqueueConfig { get; }
Property Value
MinSmPartitionSize
Gets the minimum SM partition size. 获取最小 SM 分区大小。
public uint MinSmPartitionSize { get; }
Property Value
SmCoscheduledAlignment
Gets the SM coscheduling alignment. 获取 SM 协同调度对齐值。
public uint SmCoscheduledAlignment { get; }
Property Value
SmCount
Gets the available SM count for an SM resource. 获取 SM 资源的可用 SM 数量。
public uint SmCount { get; }
Property Value
SmFlags
Gets the copied SM resource flags. 获取复制的 SM 资源标志。
public uint SmFlags { get; }
Property Value
Type
Gets the copied resource variant. 获取复制的资源变体。
public CudaDevResourceType Type { get; }
Property Value
WorkqueueConcurrencyLimit
Gets the workqueue concurrency limit. 获取工作队列并发限制。
public uint WorkqueueConcurrencyLimit { get; }
Property Value
WorkqueueSharingScope
Gets the copied workqueue sharing scope. 获取复制的工作队列共享范围。
public int WorkqueueSharingScope { get; }
Property Value
Methods
Equals(CudaDevResourceSnapshot)
Compares this snapshot with another snapshot. 将此快照与另一个快照进行比较。
public bool Equals(CudaDevResourceSnapshot other)
Parameters
otherCudaDevResourceSnapshot
Returns
Equals(object?)
Compares this snapshot with another object. 将此快照与另一个对象进行比较。
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
Returns a hash code for the copied metadata. 返回复制型元数据的哈希码。
public override int GetHashCode()
Returns
ToString()
Formats the copied resource metadata for diagnostics. 格式化复制型资源元数据以供诊断。
public override string ToString()
Returns
Operators
operator ==(CudaDevResourceSnapshot, CudaDevResourceSnapshot)
Tests two snapshots for equality. 测试两个快照是否相等。
public static bool operator ==(CudaDevResourceSnapshot left, CudaDevResourceSnapshot right)
Parameters
leftCudaDevResourceSnapshotrightCudaDevResourceSnapshot
Returns
operator !=(CudaDevResourceSnapshot, CudaDevResourceSnapshot)
Tests two snapshots for inequality. 测试两个快照是否不相等。
public static bool operator !=(CudaDevResourceSnapshot left, CudaDevResourceSnapshot right)
Parameters
leftCudaDevResourceSnapshotrightCudaDevResourceSnapshot