Thrill
0.1
|
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 foxxll::element_block
, see related information there. The BID array of references is contained in the parent class foxxll::block_w_bids
, see related information there. The "per block information" is contained in the parent class foxxll::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 266 of file typed_block.hpp.
#include <typed_block.hpp>
Public Types | |
using | bid_type = BID< raw_size > |
using | const_iterator = const_pointer |
using | const_pointer = const value_type * |
using | const_reference = const value_type & |
using | iterator = pointer |
using | pointer = value_type * |
using | reference = value_type & |
using | value_type = Type |
Public Types inherited from block_w_info< Type, RawSize, NRef, MetaInfoType > | |
using | info_type = MetaInfoType |
Type of per block information element. More... | |
Public Types inherited from block_w_bids< Type,((RawSize - sizeof(BID< RawSize >) *NBids - sizeof(MetaInfoType))/sizeof(Type)), RawSize, NBids > | |
using | bid_type = BID< raw_size > |
Public Types inherited from element_block< Type, Size > | |
using | const_iterator = const type * |
using | const_reference = const Type & |
using | iterator = pointer |
using | pointer = type * |
using | reference = Type & |
using | type = Type |
using | value_type = Type |
Public Member Functions | |
typed_block () | |
~typed_block () | |
request_ptr | read (const bid_type &bid, completion_handler on_complete=completion_handler()) |
Reads block from the disk(s). More... | |
request_ptr | read (const BID< 0 > &bid, completion_handler on_complete=completion_handler()) |
Reads block from the disk(s). More... | |
request_ptr | write (const bid_type &bid, completion_handler on_complete=completion_handler()) |
Writes block to the disk(s). More... | |
request_ptr | write (const BID< 0 > &bid, completion_handler on_complete=completion_handler()) |
Writes block to the disk(s). More... | |
Public Member Functions inherited from 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 block_w_info< Type, RawSize, NRef, MetaInfoType > | |
block_w_info () | |
Public Member Functions inherited from 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 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) |
Static Public Attributes | |
static constexpr bool | has_only_data = (raw_size == (size * sizeof(value_type))) |
no meta info, bids or (non-empty) fillers included in the block, allows value_type array addressing across block boundaries More... | |
static constexpr size_t | raw_size = RawSize |
size of block in bytes More... | |
static constexpr size_t | size = Base::size |
number of elements in block More... | |
Static Public Attributes inherited from block_w_bids< Type,((RawSize - sizeof(BID< RawSize >) *NBids - sizeof(MetaInfoType))/sizeof(Type)), RawSize, NBids > | |
static constexpr size_t | kNBIDs |
static constexpr size_t | raw_size |
Static Public Attributes inherited from element_block< Type, Size > | |
static constexpr size_t | size |
number of elements in the block More... | |
Private Types | |
using | Base = mng_local::expand_struct< mng_local::block_w_info< Type, RawSize, NRef, MetaInfoType >, RawSize > |
Static Private Attributes | |
static constexpr bool | debug_block_life_cycle = false |
Additional Inherited Members | |
Public Attributes inherited from block_w_info< Type, RawSize, NRef, MetaInfoType > | |
info_type | info |
Per block information element. More... | |
Public Attributes inherited from block_w_bids< Type,((RawSize - sizeof(BID< RawSize >) *NBids - sizeof(MetaInfoType))/sizeof(Type)), RawSize, NBids > | |
bid_type | ref [kNBIDs] |
Array of BID references. More... | |
Public Attributes inherited from element_block< Type, Size > | |
value_type | elem [kSize] |
Array of elements of type Type. More... | |
|
private |
Definition at line 269 of file typed_block.hpp.
Definition at line 286 of file typed_block.hpp.
using const_iterator = const_pointer |
Definition at line 280 of file typed_block.hpp.
using const_pointer = const value_type * |
Definition at line 279 of file typed_block.hpp.
using const_reference = const value_type & |
Definition at line 276 of file typed_block.hpp.
Definition at line 278 of file typed_block.hpp.
using pointer = value_type * |
Definition at line 277 of file typed_block.hpp.
using reference = value_type & |
Definition at line 275 of file typed_block.hpp.
using value_type = Type |
Definition at line 274 of file typed_block.hpp.
|
inline |
Definition at line 288 of file typed_block.hpp.
References foxxll::BlockAlignment, and TLX_LOGC.
|
inline |
Definition at line 421 of file typed_block.hpp.
References TLX_LOGC.
|
inlinestatic |
Definition at line 398 of file typed_block.hpp.
|
inlinestatic |
Definition at line 408 of file typed_block.hpp.
|
inlinestatic |
Definition at line 403 of file typed_block.hpp.
|
inlinestatic |
Definition at line 359 of file typed_block.hpp.
|
inlinestatic |
Definition at line 393 of file typed_block.hpp.
|
inlinestatic |
Definition at line 376 of file typed_block.hpp.
|
inline |
Reads block from the disk(s).
bid | block identifier, points the file(disk) and position |
on_complete | completion handler |
pointer_ptr
object to track status I/O operation after the call Definition at line 321 of file typed_block.hpp.
References file::aread(), BID< Size >::offset, BID< Size >::storage, and TLX_LOGC.
Referenced by swappable_block< ValueType, BlockSize >::read_async().
|
inline |
Reads block from the disk(s).
bid | block identifier, points the file(disk) and position |
on_complete | completion handler |
pointer_ptr
object to track status I/O operation after the call Definition at line 350 of file typed_block.hpp.
References file::aread(), BID< 0 >::offset, BID< 0 >::size, BID< 0 >::storage, and TLX_LOGC.
|
inline |
Writes block to the disk(s).
bid | block identifier, points the file(disk) and position |
on_complete | completion handler |
pointer_ptr
object to track status I/O operation after the call Definition at line 307 of file typed_block.hpp.
References file::awrite(), BID< Size >::offset, BID< Size >::storage, and TLX_LOGC.
Referenced by swappable_block< ValueType, BlockSize >::clean_async().
|
inline |
Writes block to the disk(s).
bid | block identifier, points the file(disk) and position |
on_complete | completion handler |
pointer_ptr
object to track status I/O operation after the call Definition at line 335 of file typed_block.hpp.
References file::awrite(), BID< 0 >::offset, BID< 0 >::size, BID< 0 >::storage, and TLX_LOGC.
|
staticprivate |
Definition at line 271 of file typed_block.hpp.
|
static |
no meta info, bids or (non-empty) fillers included in the block, allows value_type array addressing across block boundaries
Definition at line 284 of file typed_block.hpp.
|
static |
size of block in bytes
Definition at line 282 of file typed_block.hpp.
|
static |
number of elements in block
Definition at line 283 of file typed_block.hpp.