CGRA-ME
ILPMapper.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * The software programs comprising "CGRA-ME" and the documentation provided
3  * with them are copyright by its authors and the University of Toronto. Only
4  * non-commercial, not-for-profit use of this software is permitted without ex-
5  * plicit permission. This software is provided "as is" with no warranties or
6  * guarantees of support. See the LICENCE for more details. You should have re-
7  * ceived a copy of the full licence along with this software. If not, see
8  * <http://cgra-me.ece.utoronto.ca/license/>.
9  ******************************************************************************/
10 
11 #pragma once
12 
13 #include <CGRA/Mapper.h>
14 
15 #include <set>
16 #include <string>
17 
18 enum class ILPMapperStatus
19 {
20  INFEASIBLE,
21  TIMEOUT,
26 };
27 
28 class ILPMapper : public Mapper {
29  public:
30  enum class ConstraintGroup : int;
31  using ConstraintGroupSet = std::set<ConstraintGroup>;
32 
33  ILPMapper(std::shared_ptr<CGRA> cgra, int timelimit, const ConfigStore& args);
34  ~ILPMapper() = default;
35 
36  Mapping mapOpGraph(std::shared_ptr<OpGraph> opgraph, int II, const MRRG& mrrg, std::unordered_map<std::string, std::string> fix_port) override;
37 
40  private:
41  ILPMapperStatus GurobiMap(const OpGraph& opgraph, int II, Mapping* mapping, const MRRG& mrrg, std::unordered_map<std::string, std::string> fix_port);
42 
43  double mipgap;
44  int solnlimit;
45 };
ILPMapperStatus::INFEASIBLE
@ INFEASIBLE
MRRG
Definition: MRRG.h:216
ILPMapper::solnlimit
int solnlimit
Definition: ILPMapper.h:44
ILPMapperStatus
ILPMapperStatus
Definition: ILPMapper.h:18
ConfigStore
Definition: ConfigStore.h:76
ILPMapperStatus::INTERRUPTED
@ INTERRUPTED
Mapper
Common interface for mappers.
Definition: Mapper.h:28
set
dot tab cc set(dot_y_cc ${gen_dir}/dot.y.cc) if(BISON_FOUND) bison_target(dotparser_parser dot.y $
Definition: CMakeLists.txt:8
ILPMapper::GurobiMap
ILPMapperStatus GurobiMap(const OpGraph &opgraph, int II, Mapping *mapping, const MRRG &mrrg, std::unordered_map< std::string, std::string > fix_port)
Definition: ILPMapper.cpp:171
ILPMapperStatus::OPTIMAL_FOUND
@ OPTIMAL_FOUND
ILPMapper::ConstraintGroup
ConstraintGroup
Definition: ILPMapper.cpp:24
Mapping
Definition: Mapping.h:31
ILPMapper::mipgap
double mipgap
Definition: ILPMapper.h:43
ILPMapperStatus::UNLISTED_STATUS
@ UNLISTED_STATUS
ILPMapper::flags
ConfigStore flags
Definition: ILPMapper.h:38
ILPMapperStatus::TIMEOUT
@ TIMEOUT
ILPMapperStatus::SUBOPTIMAL_FOUND
@ SUBOPTIMAL_FOUND
Mapper.h
ILPMapper::ConstraintGroupSet
int std::set< ConstraintGroup > ConstraintGroupSet
Definition: ILPMapper.h:31
OpGraph
Definition: OpGraph.h:215
ILPMapper::mapOpGraph
Mapping mapOpGraph(std::shared_ptr< OpGraph > opgraph, int II, const MRRG &mrrg, std::unordered_map< std::string, std::string > fix_port) override
Definition: ILPMapper.cpp:120
ILPMapper
Definition: ILPMapper.h:28
ILPMapper::lazy_constraints
ConstraintGroupSet lazy_constraints
Definition: ILPMapper.h:39