Lines Matching refs:_cq
154 CircularQueue* _cq;
160 : _cq(cq), _idx(idx), _round(round) {}
177 iterator() : _cq(nullptr), _idx(0), _round(0) { }
180 : _cq(it._cq), _idx(it._idx), _round(it._round) {}
185 _cq = it._cq;
191 ~iterator() { _cq = nullptr; _idx = 0; _round = 0; }
209 return _cq != nullptr && _cq->isValidIdx(_idx, _round);
222 return _cq == that._cq && _idx == that._idx &&
239 return (*_cq)[_idx];
245 return (*_cq)[_idx];
253 return &((*_cq)[_idx]);
258 return &((*_cq)[_idx]);
265 _cq->increase(_idx);
296 return _cq && !(_idx == _cq->head() &&
297 (_cq->empty() ||
298 (_idx == 0 && _round != _cq->_round + 1) ||
299 (_idx !=0 && _round != _cq->_round)));
310 _cq->decrease(_idx);
320 assert(_cq);
321 _round += (t + _idx) / _cq->capacity();
322 _idx = _cq->moduloAdd(_idx, t);
328 assert(_cq);
332 _round += (-t + _idx) / _cq->capacity();
333 _idx = _cq->moduloSub(_idx, t);
372 auto ret = _cq->sub(this->_idx, that._idx, _cq->capacity());
375 ret += ((this->_round - that._round) * _cq->capacity());
391 assert(_cq && that._cq == _cq);