TVM  0.9.4
PriorityLevel.h
Go to the documentation of this file.
1 
3 #pragma once
4 
6 
7 namespace tvm
8 {
9 
10 namespace requirements
11 {
12 
16 template<bool Lightweight = true>
17 class PriorityLevelBase : public abstract::SingleSolvingRequirement<int, Lightweight>
18 {
19 public:
21  PriorityLevelBase() : abstract::SingleSolvingRequirement<int, Lightweight>(0, true) {}
22 
24  PriorityLevelBase(int p) : abstract::SingleSolvingRequirement<int, Lightweight>(p, false)
25  {
26  if(p < 0)
27  throw std::runtime_error("Priority level must be non-negative.");
28  }
29 
31 };
32 
34 
35 } // namespace requirements
36 
37 } // namespace tvm
#define TVM_DEFINE_LW_NON_LW_CONVERSION_OPERATORS(className, T, L)
Definition: SingleSolvingRequirement.h:79
Definition: PriorityLevel.h:18
PriorityLevelBase(int p)
Definition: PriorityLevel.h:24
PriorityLevelBase()
Definition: PriorityLevel.h:21
Definition: SingleSolvingRequirement.h:26
SingleSolvingRequirement(const int &val, bool isDefault)
Definition: SingleSolvingRequirement.h:48
Definition: Clock.h:12