P4C
The P4 Compiler
Loading...
Searching...
No Matches
slicing/types.h
1
19#ifndef BF_P4C_PHV_SLICING_TYPES_H_
20#define BF_P4C_PHV_SLICING_TYPES_H_
21
22#include <functional>
23
24#include "bf-p4c/ir/bitrange.h"
25#include "bf-p4c/phv/utils/utils.h"
26#include "lib/bitvec.h"
27#include "lib/ordered_map.h"
28
29namespace PHV {
30namespace Slicing {
31
41using IterateCb = std::function<bool(std::list<SuperCluster *>)>;
42
44using PHVContainerSizeLayout = ordered_map<const PHV::Field *, std::vector<int>>;
45
47using PackConflictChecker = std::function<bool(const FieldSlice &fs1, const FieldSlice &fs2)>;
48
50using IsReferencedChecker = std::function<bool(const Field *f1)>;
51
106
109 public:
111 virtual void iterate(const IterateCb &cb) = 0;
112
115 virtual void invalidate(const SuperCluster::SliceList *sl) = 0;
116
118 virtual void set_config(const IteratorConfig &cfg) = 0;
119};
120
121} // namespace Slicing
122} // namespace PHV
123
124#endif /* BF_P4C_PHV_SLICING_TYPES_H_ */
Definition ordered_map.h:32
The interface that the iterator must satisfy.
Definition slicing/types.h:108
virtual void set_config(const IteratorConfig &cfg)=0
set iterator configs.
virtual void invalidate(const SuperCluster::SliceList *sl)=0
virtual void iterate(const IterateCb &cb)=0
iterate will pass valid slicing results to cb. Stop when cb returns false.
The namespace encapsulating PHV-related stuff.
Definition gateway.h:32
Definition slicing/types.h:52
bool smart_slicing
Definition slicing/types.h:76
bool disable_packing_check
Definition slicing/types.h:93
int max_search_steps
the total number of steps that the search can take.
Definition slicing/types.h:82
bool minimal_packing_mode
Definition slicing/types.h:56
bool loose_action_packing_check_mode
Definition slicing/types.h:63
bool smart_backtracking_mode
Definition slicing/types.h:68
int max_search_steps_per_solution
Definition slicing/types.h:89
bool homogeneous_slicing
Do not examine split decisions rejected by previous slicings.
Definition slicing/types.h:79