|
Thrill
0.1
|
InputLineIterator gives you access to lines of a file.
Definition at line 296 of file read_lines.hpp.
Inheritance diagram for ReadLinesNode::InputLineIteratorCompressed:
Collaboration diagram for ReadLinesNode::InputLineIteratorCompressed:Public Member Functions | |
| InputLineIteratorCompressed (const vfs::FileList &files, ReadLinesNode &node, bool local_storage) | |
| Creates an instance of iterator that reads file line based. More... | |
| bool | HasNext () |
| returns true, if an element is available in local part More... | |
| const std::string & | Next () |
Public Member Functions inherited from ReadLinesNode::InputLineIterator | |
| InputLineIterator (const vfs::FileList &files, ReadLinesNode &node) | |
| InputLineIterator (const InputLineIterator &)=delete | |
| non-copyable: delete copy-constructor More... | |
| InputLineIterator (InputLineIterator &&)=default | |
| move-constructor: default More... | |
| InputLineIterator & | operator= (const InputLineIterator &)=delete |
| non-copyable: delete assignment operator More... | |
| InputLineIterator & | operator= (InputLineIterator &&)=default |
| move-assignment operator: default More... | |
Private Attributes | |
| vfs::ReadStreamPtr | stream_ |
| File handle to files_[file_nr_]. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ReadLinesNode::InputLineIterator | |
| ~InputLineIterator () | |
| bool | ReadBlock (vfs::ReadStreamPtr &file, net::BufferBuilder &buffer) |
Protected Attributes inherited from ReadLinesNode::InputLineIterator | |
| net::BufferBuilder | buffer_ |
| Byte buffer to create line std::string values. More... | |
| unsigned char * | current_ |
| Start of next element in current buffer. More... | |
| std::string | data_ |
| String, which Next() references to. More... | |
| size_t | file_nr_ |
| Index of current file in files_. More... | |
| const vfs::FileList & | files_ |
| Input files with size prefixsum. More... | |
| common::Range | my_range_ |
| (exclusive) [begin,end) of local block More... | |
| ReadLinesNode & | node_ |
| Reference to node. More... | |
| const size_t | read_size = data::default_block_size |
| Block read size. More... | |
| common::StatsTimerStopped | read_timer |
| size_t | total_bytes_ = 0 |
| size_t | total_elements_ = 0 |
| size_t | total_reads_ = 0 |
|
inline |
Creates an instance of iterator that reads file line based.
Definition at line 300 of file read_lines.hpp.
References Range::begin, BufferBuilder::begin(), ReadLinesNode::InputLineIterator::buffer_, Context::CalculateLocalRange(), Context::CalculateLocalRangeOnHost(), DIABase::context_, ReadLinesNode::InputLineIterator::current_, ReadLinesNode::InputLineIterator::data_, Range::end, ReadLinesNode::InputLineIterator::file_nr_, ReadLinesNode::InputLineIterator::files_, LOG, ReadLinesNode::InputLineIterator::my_range_, ReadLinesNode::InputLineIterator::node_, thrill::vfs::OpenReadStream(), ReadLinesNode::InputLineIterator::read_size, ReadLinesNode::InputLineIterator::ReadBlock(), BufferBuilder::Reserve(), BufferBuilder::set_size(), FileList::size_ex_psum(), FileList::size_inc_psum(), sLOG, and FileList::total_size.
|
inline |
returns true, if an element is available in local part
Definition at line 399 of file read_lines.hpp.
References ReadLinesNode::InputLineIterator::buffer_, ReadLinesNode::InputLineIterator::current_, Range::end, BufferBuilder::end(), ReadLinesNode::InputLineIterator::file_nr_, ReadLinesNode::InputLineIterator::files_, LOG, ReadLinesNode::InputLineIterator::my_range_, thrill::vfs::OpenReadStream(), ReadLinesNode::InputLineIterator::ReadBlock(), BufferBuilder::size(), FileList::size_ex_psum(), and FileList::size_inc_psum().
Referenced by ReadLinesNode::PushData().
|
inline |
returns the next element if one exists
does no checks whether a next element exists!
Definition at line 361 of file read_lines.hpp.
References BufferBuilder::begin(), ReadLinesNode::InputLineIterator::buffer_, ReadLinesNode::InputLineIterator::current_, ReadLinesNode::InputLineIterator::data_, BufferBuilder::end(), ReadLinesNode::InputLineIterator::file_nr_, ReadLinesNode::InputLineIterator::files_, LOG, thrill::vfs::OpenReadStream(), ReadLinesNode::InputLineIterator::ReadBlock(), TLX_UNLIKELY, and ReadLinesNode::InputLineIterator::total_elements_.
Referenced by ReadLinesNode::PushData().
|
private |
File handle to files_[file_nr_].
Definition at line 439 of file read_lines.hpp.