|
STXXL
1.4-dev
|
Block containing elements of fixed length.
| RawSize | size of block in bytes |
| Type | type of block's records |
| NRef | number of block references (BIDs) that can be stored in the block (default is 0) |
| MetaInfoType | type of per block information (default is no information - void) |
The data array of type Type is contained in the parent class stxxl::element_block, see related information there. The BID array of references is contained in the parent class stxxl::block_w_bids, see related information there. The "per block information" is contained in the parent class stxxl::block_w_info, see related information there.
RawSize > 2MB object(s) of this type can not be allocated on the stack (as a function variable for example), because Linux POSIX library limits the stack size for the main thread to (2MB - system page size) Definition at line 237 of file typed_block.h.
Inheritance diagram for stxxl::typed_block< RawSize, Type, NRef, MetaInfoType >:
Collaboration diagram for stxxl::typed_block< RawSize, Type, NRef, MetaInfoType >:Public Member Functions | |
| typed_block () | |
| ~typed_block () | |
| request_ptr | read (const bid_type &bid, completion_handler on_cmpl=completion_handler()) |
| Reads block from the disk(s). More... | |
| request_ptr | write (const bid_type &bid, completion_handler on_cmpl=completion_handler()) |
| Writes block to the disk(s). More... | |
Public Member Functions inherited from stxxl::mng_local::add_filler< mng_local::block_w_info< Type, RawSize, NRef, MetaInfoType >, RawSize-sizeof(mng_local::block_w_info< Type, RawSize, NRef, MetaInfoType >)> | |
| add_filler () | |
Public Member Functions inherited from stxxl::mng_local::block_w_info< Type, RawSize, NRef, MetaInfoType > | |
| block_w_info () | |
Public Member Functions inherited from stxxl::mng_local::block_w_bids< Type,((RawSize-sizeof(BID< RawSize >)*NBids-sizeof(MetaInfoType))/sizeof(Type)), RawSize, NBids > | |
| block_w_bids () | |
| bid_type & | operator() (size_t i) |
| An operator to access bid references. More... | |
Public Member Functions inherited from stxxl::mng_local::element_block< Type, Size > | |
| element_block () | |
| iterator | begin () |
Returns iterator pointing to the first element. More... | |
| const_iterator | begin () const |
Returns const_iterator pointing to the first element. More... | |
| const_iterator | cbegin () const |
Returns const_iterator pointing to the first element. More... | |
| const_iterator | cend () const |
Returns const_iterator pointing to the end element. More... | |
| iterator | end () |
Returns iterator pointing to the end element. More... | |
| const_iterator | end () const |
Returns const_iterator pointing to the end element. More... | |
| reference | operator[] (size_t i) |
| An operator to access elements in the block. More... | |
Static Public Member Functions | |
| static void | operator delete (void *ptr) |
| static void | operator delete (void *, void *) |
| static void | operator delete[] (void *ptr) |
| static void * | operator new (size_t bytes) |
| static void * | operator new (size_t, void *ptr) |
| static void * | operator new[] (size_t bytes) |
Private Types | |
| typedef mng_local::expand_struct < mng_local::block_w_info < Type, RawSize, NRef, MetaInfoType >, RawSize > | Base |
Additional Inherited Members | |
Public Attributes inherited from stxxl::mng_local::block_w_info< Type, RawSize, NRef, MetaInfoType > | |
| info_type | info |
| Per block information element. More... | |
Public Attributes inherited from stxxl::mng_local::block_w_bids< Type,((RawSize-sizeof(BID< RawSize >)*NBids-sizeof(MetaInfoType))/sizeof(Type)), RawSize, NBids > | |
| bid_type | ref [nbids] |
| Array of BID references. More... | |
Public Attributes inherited from stxxl::mng_local::element_block< Type, Size > | |
| value_type | elem [size] |
| Array of elements of type Type. More... | |
|
private |
Definition at line 240 of file typed_block.h.
| typedef BID<raw_size> stxxl::typed_block< RawSize, Type, NRef, MetaInfoType >::bid_type |
Definition at line 258 of file typed_block.h.
| typedef const_pointer stxxl::typed_block< RawSize, Type, NRef, MetaInfoType >::const_iterator |
Definition at line 249 of file typed_block.h.
| typedef const value_type* stxxl::typed_block< RawSize, Type, NRef, MetaInfoType >::const_pointer |
Definition at line 248 of file typed_block.h.
| typedef const value_type& stxxl::typed_block< RawSize, Type, NRef, MetaInfoType >::const_reference |
Definition at line 245 of file typed_block.h.
| typedef pointer stxxl::typed_block< RawSize, Type, NRef, MetaInfoType >::iterator |
Definition at line 247 of file typed_block.h.
| typedef value_type* stxxl::typed_block< RawSize, Type, NRef, MetaInfoType >::pointer |
Definition at line 246 of file typed_block.h.
| typedef value_type& stxxl::typed_block< RawSize, Type, NRef, MetaInfoType >::reference |
Definition at line 244 of file typed_block.h.
| typedef Type stxxl::typed_block< RawSize, Type, NRef, MetaInfoType >::value_type |
Definition at line 243 of file typed_block.h.
| enum stxxl::typed_block::constants |
Definition at line 251 of file typed_block.h.
|
inline |
Definition at line 260 of file typed_block.h.
References STXXL_BLOCK_ALIGN, STXXL_STATIC_ASSERT, and STXXL_VERBOSE_TYPED_BLOCK.
|
inline |
Definition at line 358 of file typed_block.h.
References STXXL_VERBOSE_TYPED_BLOCK.
|
inlinestatic |
Definition at line 335 of file typed_block.h.
|
inlinestatic |
Definition at line 345 of file typed_block.h.
|
inlinestatic |
Definition at line 340 of file typed_block.h.
|
inlinestatic |
Definition at line 302 of file typed_block.h.
References bytes, and STXXL_VERBOSE_TYPED_BLOCK.
|
inlinestatic |
Definition at line 330 of file typed_block.h.
|
inlinestatic |
Definition at line 316 of file typed_block.h.
References bytes, and STXXL_VERBOSE_TYPED_BLOCK.
|
inline |
Reads block from the disk(s).
!
| bid | block identifier, points the file(disk) and position ! |
| on_cmpl | completion handler ! |
pointer_ptr object to track status I/O operation after the call Definition at line 295 of file typed_block.h.
References stxxl::file::aread(), FMT_BID, stxxl::BID< Size >::offset, stxxl::BID< Size >::storage, and STXXL_VERBOSE_BLOCK_LIFE_CYCLE.
|
inline |
Writes block to the disk(s).
!
| bid | block identifier, points the file(disk) and position ! |
| on_cmpl | completion handler ! |
pointer_ptr object to track status I/O operation after the call Definition at line 283 of file typed_block.h.
References stxxl::file::awrite(), FMT_BID, stxxl::BID< Size >::offset, stxxl::BID< Size >::storage, and STXXL_VERBOSE_BLOCK_LIFE_CYCLE.
Referenced by stxxl::stream::basic_runs_creator< Input, CompareType, BlockSize, AllocStr >::compute_result().