File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
paddle/fluid/operators/reader Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,8 @@ class BufferedReader : public framework::DecoratedReader {
53
53
54
54
// The buffer for reading data.
55
55
// NOTE: the simplest way to implement buffered reader is do not use any
56
- // buffer, just async read and create futures as buffer size. However, to
57
- // malloc Tensor every time is extremely slow. Here we store all data in
56
+ // buffer, just read async and create futures as buffer size. However, to
57
+ // malloc tensors every time is extremely slow. Here we store all data in
58
58
// buffers and prevent alloc every time.
59
59
std::vector<TensorVec> cpu_buffer_;
60
60
std::vector<TensorVec> gpu_buffer_;
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ class PreemptiveReaderContainer : public IReaderContainer {
134
134
} else {
135
135
*out = item.data_ ;
136
136
// continue read async
137
- AsyncRead (item.reader_it_ , &future_it);
137
+ ReadAsync (item.reader_it_ , &future_it);
138
138
}
139
139
} else {
140
140
out->clear ();
@@ -151,10 +151,10 @@ class PreemptiveReaderContainer : public IReaderContainer {
151
151
auto future_it = futures_.end ();
152
152
--future_it;
153
153
154
- AsyncRead (reader_it, &future_it);
154
+ ReadAsync (reader_it, &future_it);
155
155
}
156
156
157
- void AsyncRead (const ReaderList::iterator& reader_it,
157
+ void ReadAsync (const ReaderList::iterator& reader_it,
158
158
FutureList::iterator* future_it_ptr) {
159
159
auto & future_it = *future_it_ptr;
160
160
*future_it = pool_.enqueue ([reader_it, future_it, this ] {
You can’t perform that action at this time.
0 commit comments