current_iterator++;
}
- auto view =
- ScopedView<Sample>(&(*current_iterator),
- [current_being_filed = this->being_filled] {
- current_being_filed->markSampleFilled();
- },
- [this, current_being_filled = this->being_filled] {
- std::unique_lock lg(empty_mutex);
- this->markEmpty(current_being_filled);
- num_being_filled--;
- notify_emptied_cv.notify_all();
- });
+ auto view = ScopedView<Sample>(
+ &(*current_iterator),
+ [current_being_filed = this->being_filled] {
+ current_being_filed->markSampleFilled();
+ },
+ [this, current_being_filled = this->being_filled] {
+ std::unique_lock lg(empty_mutex);
+ this->markEmpty(current_being_filled);
+ num_being_filled--;
+ notify_emptied_cv.notify_all();
+ });
return view;
}
<< "the queue has either already stopped or running, but trying stopping "
"without requesting stop, queue size: "
<< iterations.size() << " num currently empty: " << empty_q.size()
- << " num being filled: " << num_being_filled
<< " filled_q.size(): " << filled_q.size();
return ScopedView<Iteration>(nullptr);
IterationQueue::MarkableIteration::MarkableIteration(
const std::vector<ml::train::TensorDim> &input_dims,
const std::vector<ml::train::TensorDim> &label_dims, IterationQueue *iq) :
- num_observed(0),
- iteration(input_dims, label_dims),
- iq(iq) {}
+ num_observed(0), iteration(input_dims, label_dims), iq(iq) {}
IterationQueue::MarkableIteration::MarkableIteration(MarkableIteration &&rhs) :
num_observed(rhs.num_observed),
iteration.setEndSample();
}
-IterationQueue::MarkableIteration &IterationQueue::MarkableIteration::
-operator=(MarkableIteration &&rhs) {
+IterationQueue::MarkableIteration &
+IterationQueue::MarkableIteration::operator=(MarkableIteration &&rhs) {
if (this == &rhs) {
return *this;
}