RAII range over consecutive data blocks of one DataPart in the current split. More...
#include <data_accessor.hpp>
Classes | |
| class | iterator |
| Forward iterator over Block_Range; drives the wrapped getFirstBlock()/getNextBlock() cursor at the range's owned loopdepth. More... | |
Public Member Functions | |
| Block_Range (Data_Accessor *da, const DataPart part) | |
Acquires a private loopdepth slot from da for the range's lifetime; part selects which DataPart the range iterates. | |
| iterator | begin () |
| an iterator positioned at the first block, or already at end() if there are none | |
| iterator | end () |
| the sentinel end iterator | |
| unsigned int | loopdepth () const |
| the owned slot (e.g. for getBlockIndex()) | |
| Block_Range (const Block_Range &)=delete | |
| Block_Range & | operator= (const Block_Range &)=delete |
Private Attributes | |
| Data_Accessor * | _da |
| the accessor iterated | |
| const DataPart | _part |
| the DataPart selected | |
| const unsigned int | _depth |
| this range's owned loopdepth slot | |
RAII range over consecutive data blocks of one DataPart in the current split.
Owns a private loopdepth slot acquired from the accessor for the range's lifetime, so overlapping block loops cannot collide the way manually chosen loopdepth constants can. Depths 0..3 stay reserved for the deprecated getFirstBlock()/getNextBlock() cursor API; acquired slots start above them. Usage: for(const auto &b : da->blocks(FST::TRAIN)) {... b.data, b.size ...}