gem5 v24.0.0.0
|
WF barrier slots. More...
#include <compute_unit.hh>
Public Member Functions | |
WFBarrier () | |
int | numAtBarrier () const |
int | numYetToReachBarrier () const |
Number of WFs that have not yet reached the barrier. | |
int | maxBarrierCnt () const |
void | setMaxBarrierCnt (int max_barrier_cnt) |
Set the maximum barrier count (i.e., the number of WFs that are participating in the barrier). | |
void | incNumAtBarrier () |
Mark that a WF has reached the barrier. | |
bool | allAtBarrier () const |
Have all WFs participating in this barrier reached the barrier? If so, then the barrier is satisfied and WFs may proceed past the barrier. | |
void | decMaxBarrierCnt () |
Decrement the number of WFs that are participating in this barrier. | |
void | release () |
Release this barrier resource so it can be used by other WGs. | |
void | reset () |
Reset the barrier. | |
Static Public Attributes | |
static const int | InvalidID = -1 |
Private Attributes | |
int | _numAtBarrier |
The number of WFs in the WG that have reached the barrier. | |
int | _maxBarrierCnt |
The maximum number of WFs that can reach this barrier. | |
WF barrier slots.
This represents the barrier resource for WF-level barriers (i.e., barriers to sync WFs within a WG).
Definition at line 91 of file compute_unit.hh.
|
inline |
Definition at line 94 of file compute_unit.hh.
|
inline |
Have all WFs participating in this barrier reached the barrier? If so, then the barrier is satisfied and WFs may proceed past the barrier.
Definition at line 147 of file compute_unit.hh.
References _maxBarrierCnt, and _numAtBarrier.
|
inline |
Decrement the number of WFs that are participating in this barrier.
This should be called when a WF exits.
Definition at line 157 of file compute_unit.hh.
References _maxBarrierCnt.
|
inline |
Mark that a WF has reached the barrier.
Definition at line 135 of file compute_unit.hh.
References _maxBarrierCnt, and _numAtBarrier.
|
inline |
Definition at line 116 of file compute_unit.hh.
References _maxBarrierCnt.
|
inline |
Definition at line 101 of file compute_unit.hh.
References _numAtBarrier.
|
inline |
Number of WFs that have not yet reached the barrier.
Definition at line 110 of file compute_unit.hh.
References _maxBarrierCnt, and _numAtBarrier.
|
inline |
Release this barrier resource so it can be used by other WGs.
This is generally called when a WG has finished.
Definition at line 168 of file compute_unit.hh.
References _maxBarrierCnt, and _numAtBarrier.
|
inline |
Reset the barrier.
This is used to reset the barrier, usually when a dynamic instance of a barrier has been satisfied.
Definition at line 179 of file compute_unit.hh.
References _numAtBarrier.
|
inline |
Set the maximum barrier count (i.e., the number of WFs that are participating in the barrier).
Definition at line 126 of file compute_unit.hh.
References _maxBarrierCnt.
|
private |
The maximum number of WFs that can reach this barrier.
This is essentially the number of WFs in the WG, and a barrier is satisfied when the number of WFs that reach the barrier equal this value. If a WF exits early it must decrement this value so that it is no longer considered for this barrier.
Definition at line 199 of file compute_unit.hh.
Referenced by allAtBarrier(), decMaxBarrierCnt(), incNumAtBarrier(), maxBarrierCnt(), numYetToReachBarrier(), release(), and setMaxBarrierCnt().
|
private |
The number of WFs in the WG that have reached the barrier.
Once the number of WFs that reach a barrier matches the number of WFs in the WG, the barrier is satisfied.
Definition at line 190 of file compute_unit.hh.
Referenced by allAtBarrier(), incNumAtBarrier(), numAtBarrier(), numYetToReachBarrier(), release(), and reset().
|
static |
Definition at line 98 of file compute_unit.hh.
Referenced by gem5::Wavefront::barrierId(), gem5::ComputeUnit::barrierSlot(), gem5::ComputeUnit::dispWorkgroup(), gem5::VegaISA::Inst_SOPP__S_ENDPGM::execute(), gem5::Wavefront::hasBarrier(), gem5::Wavefront::releaseBarrier(), and gem5::ComputeUnit::startWavefront().