未验证 提交 8c70183b 编写于 作者: Y yuyang18

Polish function names

上级 b789a3a4
......@@ -53,8 +53,8 @@ class BufferedReader : public framework::DecoratedReader {
// The buffer for reading data.
// NOTE: the simplest way to implement buffered reader is do not use any
// buffer, just async read and create futures as buffer size. However, to
// malloc Tensor every time is extremely slow. Here we store all data in
// buffer, just read async and create futures as buffer size. However, to
// malloc tensors every time is extremely slow. Here we store all data in
// buffers and prevent alloc every time.
std::vector<TensorVec> cpu_buffer_;
std::vector<TensorVec> gpu_buffer_;
......
......@@ -134,7 +134,7 @@ class PreemptiveReaderContainer : public IReaderContainer {
} else {
*out = item.data_;
// continue read async
AsyncRead(item.reader_it_, &future_it);
ReadAsync(item.reader_it_, &future_it);
}
} else {
out->clear();
......@@ -151,10 +151,10 @@ class PreemptiveReaderContainer : public IReaderContainer {
auto future_it = futures_.end();
--future_it;
AsyncRead(reader_it, &future_it);
ReadAsync(reader_it, &future_it);
}
void AsyncRead(const ReaderList::iterator& reader_it,
void ReadAsync(const ReaderList::iterator& reader_it,
FutureList::iterator* future_it_ptr) {
auto& future_it = *future_it_ptr;
*future_it = pool_.enqueue([reader_it, future_it, this] {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册