P4C
The P4 Compiler
Loading...
Searching...
No Matches
phv_slicing_iterator.h
1
19#ifndef BF_P4C_PHV_SLICING_PHV_SLICING_ITERATOR_H_
20#define BF_P4C_PHV_SLICING_PHV_SLICING_ITERATOR_H_
21
22#include "backends/tofino/bf-p4c/parde/parser_info.h"
23#include "backends/tofino/bf-p4c/phv/action_packing_validator_interface.h"
24#include "backends/tofino/bf-p4c/phv/parser_packing_validator_interface.h"
25#include "backends/tofino/bf-p4c/phv/phv_fields.h"
26#include "backends/tofino/bf-p4c/phv/slicing/types.h"
27#include "backends/tofino/bf-p4c/phv/utils/utils.h"
28
29namespace PHV {
30namespace Slicing {
31
40 private:
41 IteratorInterface *pImpl;
42
43 public:
44 ItrContext(const PhvInfo &phv, const MapFieldToParserStates &fs, const CollectParserInfo &pi,
45 const SuperCluster *sc, const PHVContainerSizeLayout &pa,
46 const ActionPackingValidatorInterface &action_packing_validator,
47 const ParserPackingValidatorInterface &parser_packing_validator,
48 const PackConflictChecker pack_conflict, const IsReferencedChecker is_referenced);
49
51 void iterate(const IterateCb &cb) override { pImpl->iterate(cb); }
52
58 void invalidate(const SuperCluster::SliceList *sl) override { pImpl->invalidate(sl); }
59
61 void set_config(const IteratorConfig &cfg) override { pImpl->set_config(cfg); };
62};
63
64} // namespace Slicing
65} // namespace PHV
66
67#endif /* BF_P4C_PHV_SLICING_PHV_SLICING_ITERATOR_H_ */
Definition action_packing_validator_interface.h:33
Definition parser_packing_validator_interface.h:26
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.
Definition phv_slicing_iterator.h:39
void set_config(const IteratorConfig &cfg) override
set iterator configs.
Definition phv_slicing_iterator.h:61
void iterate(const IterateCb &cb) override
iterate will pass valid slicing results to cb. Stop when cb returns false.
Definition phv_slicing_iterator.h:51
void invalidate(const SuperCluster::SliceList *sl) override
Definition phv_slicing_iterator.h:58
Definition phv/utils/utils.h:1049
Definition phv_fields.h:1095
The namespace encapsulating PHV-related stuff.
Definition gateway.h:32
Map field to the parser states in which they are extracted or assigned from checksums.
Definition phv_fields.h:1755
Definition slicing/types.h:52