SPA 5.0:
{@{!}Pg}
R2B{.mode}
#BarNameU4, Ra
{&req_6}
{&rdN}
{?sched}
;
.mode: { .BAR*, .WARP }
R2B writes the data contained in the Barrier specified by #BarNameU4 with Ra. The intention of this instruction is to enable writing and restoring of barrier state for context restore. Use B2R to access barrier state.
For R2B.BAR, the source must contain counts associated with the given barrier. The register must have the format of BarrierState_t
If the BarInUse field is 0, the rest of the values are UNPREDICTABLE.
Barriers are shared resources across a CTA and thus among the threads in a warp. If multiple threads in a warp execute R2B.BAR, the hardware selects an arbitrary thread to perform the last write.
R2B.WARP writes into the per-warp RedCntResult, WaitingOnBarrier, and BarSel state. Use B2R.WARP to read this state. R2B.WARP ignores #BarNameU4.
If multiple threads in a warp execute R2B, the hardware selects an arbitrary thread to perform the last write.
R2B 0, R5; // Barrier[0] = R5; R2B 3, R0; // Barrier[3] = R0;