P4C
The P4 Compiler
|
#include <utils.h>
Public Member Functions | |
RotationalCluster (ordered_set< PHV::AlignedCluster * > clusters) | |
size_t | aggregate_size () const override |
const AlignedCluster & | cluster (const PHV::FieldSlice &slice) const |
const ordered_set< AlignedCluster * > & | clusters () const |
bool | contains (const PHV::Field *f) const override |
bool | contains (const PHV::FieldSlice &slice) const override |
bool | deparsed () const override |
int | exact_containers () const override |
gress_t | gress () const override |
int | max_width () const override |
int | num_constraints () const override |
bool | okIn (PHV::Kind kind) const override |
bool | operator== (const RotationalCluster &other) const |
Semantic equality. | |
std::optional< SliceResult< RotationalCluster > > | slice (int pos) const |
const ordered_set< PHV::FieldSlice > & | slices () const |
Public Member Functions inherited from PHV::ClusterStats |
Additional Inherited Members | |
Public Attributes inherited from PHV::ClusterStats | |
int | uid = nextId++ |
A rotational cluster holds groups of clusters that must be placed in the same MAU group at rotationally-equivalent alignments.
|
inlineoverridevirtual |
Implements PHV::ClusterStats.
|
inline |
slice
. slice
is not in any cluster in this group.
|
inline |
|
overridevirtual |
f
. Implements PHV::ClusterStats.
|
overridevirtual |
slice
. Implements PHV::ClusterStats.
|
inlineoverridevirtual |
Implements PHV::ClusterStats.
|
inlineoverridevirtual |
Implements PHV::ClusterStats.
|
inlineoverridevirtual |
Implements PHV::ClusterStats.
|
inlineoverridevirtual |
Implements PHV::ClusterStats.
|
inlineoverridevirtual |
Implements PHV::ClusterStats.
|
overridevirtual |
kind
. Implements PHV::ClusterStats.
std::optional< PHV::SliceResult< PHV::RotationalCluster > > PHV::RotationalCluster::slice | ( | int | pos | ) | const |
Slices all AlignedClusters in this cluster at the relative field bit pos
. For example, if a cluster contains a field slice [3..7] and pos == 2, then slice
will produce two clusters, one with [3..4] and the other with [5..7].
If pos
is larger than the size of a field slice in this cluster, then the slice is placed entirely in the lo cluster. If pos
is larger than all field sizes, then the hi cluster will not contain any fields.
pos | the position to split, i.e. the first bit of the upper slice. pos must be non-negative. |
pos
or std::nullopt otherwise.
|
inline |