MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / Next

Method Next

paddle/fluid/framework/data_feed.cc:335–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333
334template <typename T>
335int PrivateQueueDataFeed<T>::Next() {
336#ifdef _LINUX
337 CheckStart();
338 int index = 0;
339 T ins_vec;
340 while (index < default_batch_size_) {
341 T instance;
342 if (!queue_->Get(instance)) {
343 break;
344 }
345 AddInstanceToInsVec(&ins_vec, instance, index++);
346 }
347 batch_size_ = index;
348 if (batch_size_ != 0) {
349 PutToFeedVec(ins_vec);
350 }
351 return batch_size_;
352#else
353 return 0;
354#endif
355}
356
357// explicit instantiation
358template class PrivateQueueDataFeed<std::vector<MultiSlotType>>;

Callers 9

TrainFilesMethod · 0.45
TrainFilesMethod · 0.45
TrainFilesMethod · 0.45
TrainFilesMethod · 0.45
TESTFunction · 0.45
GetElemSetFromReaderFunction · 0.45

Calls 11

CheckStartMethod · 0.80
GetBatchSizeMethod · 0.80
ins_numMethod · 0.80
GetMethod · 0.45
SizeMethod · 0.45
reserveMethod · 0.45
push_backMethod · 0.45
sizeMethod · 0.45
PushMethod · 0.45
PopMethod · 0.45
loadMethod · 0.45

Tested by 2

TESTFunction · 0.36
GetElemSetFromReaderFunction · 0.36