Struct CudaGraphEdgeData
Describes the CUDA dependency behavior attached to a graph edge. 描述 CUDA graph 边上的依赖行为。
public readonly struct CudaGraphEdgeData : IEquatable<CudaGraphEdgeData>
- Implements
- Inherited Members
Constructors
CudaGraphEdgeData(byte, byte, CudaGraphDependencyType)
Initializes CUDA graph edge data. 初始化 CUDA graph 边数据。
public CudaGraphEdgeData(byte fromPort, byte toPort, CudaGraphDependencyType dependencyType)
Parameters
fromPortbyteThe upstream node port. 上游节点端口。
toPortbyteThe downstream node port. 下游节点端口。
dependencyTypeCudaGraphDependencyTypeThe dependency type. 依赖类型。
Properties
Default
Gets default full-completion dependency data. 获取默认的全完成依赖数据。
public static CudaGraphEdgeData Default { get; }
Property Value
DependencyType
Gets the dependency type. 获取依赖类型。
public CudaGraphDependencyType DependencyType { get; }
Property Value
FromPort
Gets the upstream node port. 获取上游节点端口。
public byte FromPort { get; }
Property Value
ToPort
Gets the downstream node port. 获取下游节点端口。
public byte ToPort { get; }
Property Value
Methods
Equals(CudaGraphEdgeData)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(CudaGraphEdgeData other)
Parameters
otherCudaGraphEdgeDataAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Formats the edge data for diagnostics. 将 edge data 格式化为诊断字符串。
public override string ToString()
Returns
Operators
operator ==(CudaGraphEdgeData, CudaGraphEdgeData)
Returns whether two edge data values are equal. 返回两个 edge data 是否相等。
public static bool operator ==(CudaGraphEdgeData left, CudaGraphEdgeData right)
Parameters
leftCudaGraphEdgeDatarightCudaGraphEdgeData
Returns
operator !=(CudaGraphEdgeData, CudaGraphEdgeData)
Returns whether two edge data values are not equal. 返回两个 edge data 是否不相等。
public static bool operator !=(CudaGraphEdgeData left, CudaGraphEdgeData right)
Parameters
leftCudaGraphEdgeDatarightCudaGraphEdgeData