Class FenceRequest
- Namespace
- DotCompute.Abstractions.Memory
- Assembly
- DotCompute.Abstractions.dll
Represents a fence injection request to be processed during kernel compilation.
public sealed record FenceRequest : IEquatable<FenceRequest>
- Inheritance
-
FenceRequest
- Implements
- Inherited Members
Remarks
Fence requests are created by InsertFence(FenceType, FenceLocation?) and consumed by the kernel compiler to inject appropriate fence instructions (e.g., PTX membar instructions for CUDA).
Properties
Location
Gets the location specification for fence placement.
public required FenceLocation Location { get; init; }
Property Value
RequestedAt
Gets the timestamp when this request was created.
public DateTimeOffset RequestedAt { get; init; }
Property Value
Type
Gets the fence type (scope) for this request.
public required FenceType Type { get; init; }
Property Value
Methods
GetCudaCIntrinsic()
Gets the CUDA C intrinsic for this fence type.
public string GetCudaCIntrinsic()
Returns
- string
The CUDA C fence intrinsic call.
GetPtxInstruction()
Gets the PTX instruction for this fence type.
public string GetPtxInstruction()
Returns
- string
The PTX fence instruction string.
Remarks
PTX fence instructions:
- ThreadBlock:
bar.sync 0;(block-level synchronization barrier) - Device:
membar.gl;(global memory barrier) - System:
membar.sys;(system-wide memory barrier)