TVM  0.9.4
AssignmentTarget.h
Go to the documentation of this file.
1 
3 #pragma once
4 
5 #include <tvm/api.h>
6 #include <tvm/defs.h>
7 
8 #include <tvm/constraint/enums.h>
9 
10 #include <Eigen/Core>
11 
12 #include <memory>
13 
14 namespace tvm
15 {
16 
17 namespace scheme
18 {
19 
20 namespace internal
21 {
22 
23 enum class TargetType
24 {
25  Linear,
26  Quadratic
27 };
28 
37 {
38 public:
43 
46 
49 
52 
55 
60  int size() const;
61  Range & range();
62  const Range & range() const;
63 
66  MatrixRef A(int colStart, int colDim) const;
68  MatrixRef Q() const;
70  VectorRef l() const;
72  VectorRef u() const;
74  VectorRef b() const;
76  VectorRef q() const;
77 
83  MatrixRef AFirstHalf(int colStart, int colDim) const;
84  MatrixRef ASecondHalf(int colStart, int colDim) const;
95 
98 
101 
104 
105 private:
107  TargetType targetType_;
109  constraint::Type cstrType_;
111  constraint::RHS constraintRhs_;
113  RangePtr range_;
115  MatrixRef A_ = Eigen::Map<Eigen::MatrixXd>(nullptr, 0, 0);
116  MatrixRef Q_ = Eigen::Map<Eigen::MatrixXd>(nullptr, 0, 0);
117  VectorRef l_ = Eigen::Map<Eigen::VectorXd>(nullptr, 0);
118  VectorRef u_ = Eigen::Map<Eigen::VectorXd>(nullptr, 0);
119  VectorRef b_ = Eigen::Map<Eigen::VectorXd>(nullptr, 0);
120  VectorRef q_ = Eigen::Map<Eigen::VectorXd>(nullptr, 0);
121 };
122 
123 } // namespace internal
124 
125 } // namespace scheme
126 
127 } // namespace tvm
#define TVM_DLLAPI
Definition: api.h:35
Definition: Range.h:19
Definition: AssignmentTarget.h:37
AssignmentTarget(MatrixRef Q, VectorRef q, constraint::RHS cr)
AssignmentTarget & setQ(MatrixRef Q)
AssignmentTarget(RangePtr range, VectorRef l, VectorRef u)
void changeData(MatrixRef A, VectorRef l, VectorRef u)
AssignmentTarget & setb(VectorRef b)
void changeData(MatrixRef AQ, VectorRef bq)
AssignmentTarget & setl(VectorRef l)
void changeData(VectorRef l, VectorRef u)
AssignmentTarget & setq(VectorRef q)
AssignmentTarget & setu(VectorRef u)
AssignmentTarget(RangePtr range, MatrixRef A, constraint::Type ct)
MatrixRef ASecondHalf(int colStart, int colDim) const
AssignmentTarget(RangePtr range, VectorRef lu, constraint::Type ct)
constraint::RHS constraintRhs() const
constraint::Type constraintType() const
MatrixRef A(int colStart, int colDim) const
AssignmentTarget & setA(MatrixRef A)
AssignmentTarget(RangePtr range, MatrixRef A, VectorRef b, constraint::Type ct, constraint::RHS cr)
AssignmentTarget(RangePtr range, MatrixRef A, VectorRef l, VectorRef u, constraint::RHS cr)
MatrixRef AFirstHalf(int colStart, int colDim) const
Type
Definition: enums.h:15
RHS
Definition: enums.h:30
TargetType
Definition: AssignmentTarget.h:24
Definition: Clock.h:12
Eigen::Ref< Eigen::VectorXd > VectorRef
Definition: defs.h:51
std::shared_ptr< Range > RangePtr
Definition: defs.h:61
Eigen::Ref< Eigen::MatrixXd > MatrixRef
Definition: defs.h:49