MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / RemoveTask

Method RemoveTask

tensorflow/core/kernels/batching_util/batch_scheduler.h:206–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204
205template <typename TaskType>
206std::unique_ptr<TaskType> Batch<TaskType>::RemoveTask() {
207 {
208 mutex_lock l(mu_);
209 if (tasks_.empty()) {
210 return nullptr;
211 }
212 std::unique_ptr<TaskType> task = std::move(tasks_.back());
213 size_ -= task->size();
214 tasks_.pop_back();
215 return task;
216 }
217}
218
219template <typename TaskType>
220int Batch<TaskType>::num_tasks() const {

Callers 1

TESTFunction · 0.80

Calls 4

pop_backMethod · 0.80
emptyMethod · 0.45
backMethod · 0.45
sizeMethod · 0.45

Tested by 1

TESTFunction · 0.64