P4C
The P4 Compiler
|
#include <allocate_phv.h>
Public Member Functions | |
AllocationStrategy (cstring name, const PHV::AllocUtils &utils, const CoreAllocation &core) | |
virtual AllocResult | tryAllocation (const PHV::Allocation &alloc, const std::list< PHV::SuperCluster * > &cluster_groups_input, const std::list< PHV::ContainerGroup * > &container_groups)=0 |
Protected Attributes | |
const CoreAllocation & | core_alloc_i |
const cstring | name |
const PHV::AllocUtils & | utils_i |
The abstract class of Phv allocation strategy. The AllocationStrategy controls the core of PHV allocation: matching SuperClusters to ContainerGroup by tryAllocation function. Strategies can:
The result of core function tryAllocation:
|
pure virtual |
Run this strategy Returns: a AllocResult that
container_groups
, except for sorting it. Implemented in BruteForceAllocationStrategy.