* \brief Dimension combining coordinate and integer view size information */
| 91 | * \brief Dimension combining coordinate and integer view size information |
| 92 | */ |
| 93 | class FlexDim { |
| 94 | protected: |
| 95 | /// Start coordinate |
| 96 | IntView c0; |
| 97 | /// Size |
| 98 | IntView s; |
| 99 | /// End coordinate |
| 100 | IntView c1; |
| 101 | /// Modify smallest start coordinate |
| 102 | ExecStatus ssc(Space& home, int n); |
| 103 | /// Modify largest end coordinate |
| 104 | ExecStatus lec(Space& home, int n); |
| 105 | /// Dimension must not overlap with coordinates \a n to \a m |
| 106 | ExecStatus nooverlap(Space& home, int n, int m); |
| 107 | public: |
| 108 | /// Default constructor |
| 109 | FlexDim(void); |
| 110 | /// Constructor |
| 111 | FlexDim(IntView c0, IntView s, IntView c1); |
| 112 | |
| 113 | /// Return smallest start coordinate |
| 114 | int ssc(void) const; |
| 115 | /// Return largest start coordinate |
| 116 | int lsc(void) const; |
| 117 | /// Return smallest end coordinate |
| 118 | int sec(void) const; |
| 119 | /// Return largest end coordinate |
| 120 | int lec(void) const; |
| 121 | |
| 122 | /// Dimension must not overlap with \a d |
| 123 | ExecStatus nooverlap(Space& home, FlexDim& d); |
| 124 | |
| 125 | /// Update dimension during cloning |
| 126 | void update(Space& home, FlexDim& d); |
| 127 | |
| 128 | /// Subscribe propagator \a p to dimension |
| 129 | void subscribe(Space& home, Propagator& p); |
| 130 | /// Cancel propagator \a p from dimension |
| 131 | void cancel(Space& home, Propagator& p); |
| 132 | /// Schedule propagator \a p |
| 133 | void reschedule(Space& home, Propagator& p); |
| 134 | }; |
| 135 | |
| 136 | }}} |
| 137 |