Stxxl
1.4.0
|
Efficient implementation that uses prefetching and overlapping using (shared) buffers pools. More...
#include <stack.h>
Public Types | |
enum | { blocks_per_page = cfg::blocks_per_page, block_size = cfg::block_size } |
typedef Config_ | cfg |
typedef cfg::value_type | value_type |
typedef cfg::alloc_strategy | alloc_strategy_type |
typedef cfg::size_type | size_type |
typedef typed_block < block_size, value_type > | block_type |
typedef BID< block_size > | bid_type |
Public Member Functions | |
grow_shrink_stack2 (pool_type &pool_, unsigned_type prefetch_aggressiveness=0) | |
Constructs stack. | |
_STXXL_DEPRECATED (grow_shrink_stack2(prefetch_pool< block_type > &p_pool_, write_pool< block_type > &w_pool_, unsigned_type prefetch_aggressiveness=0)) | |
Constructs stack. | |
void | swap (grow_shrink_stack2 &obj) |
virtual | ~grow_shrink_stack2 () |
size_type | size () const |
bool | empty () const |
void | push (const value_type &val) |
value_type & | top () |
const value_type & | top () const |
void | pop () |
void | set_prefetch_aggr (unsigned_type new_p) |
Sets level of prefetch aggressiveness (number of blocks from the prefetch pool used for prefetching) | |
unsigned_type | get_prefetch_aggr () const |
Returns number of blocks used for prefetching. | |
Private Types | |
typedef read_write_pool < block_type > | pool_type |
Private Member Functions | |
void | rehint () |
hint the last pref_aggr external blocks | |
Private Attributes | |
size_type | size_ |
unsigned_type | cache_offset |
block_type * | cache |
std::vector< bid_type > | bids |
alloc_strategy_type | alloc_strategy |
unsigned_type | pref_aggr |
pool_type * | owned_pool |
pool_type * | pool |
Efficient implementation that uses prefetching and overlapping using (shared) buffers pools.
typedef cfg::alloc_strategy stxxl::grow_shrink_stack2< Config_ >::alloc_strategy_type |
typedef BID<block_size> stxxl::grow_shrink_stack2< Config_ >::bid_type |
typedef typed_block<block_size, value_type> stxxl::grow_shrink_stack2< Config_ >::block_type |
typedef Config_ stxxl::grow_shrink_stack2< Config_ >::cfg |
typedef read_write_pool<block_type> stxxl::grow_shrink_stack2< Config_ >::pool_type [private] |
typedef cfg::size_type stxxl::grow_shrink_stack2< Config_ >::size_type |
typedef cfg::value_type stxxl::grow_shrink_stack2< Config_ >::value_type |
anonymous enum |
stxxl::grow_shrink_stack2< Config_ >::grow_shrink_stack2 | ( | pool_type & | pool_, |
unsigned_type | prefetch_aggressiveness = 0 |
||
) | [inline] |
virtual stxxl::grow_shrink_stack2< Config_ >::~grow_shrink_stack2 | ( | ) | [inline, virtual] |
Definition at line 529 of file stack.h.
References stxxl::STXXL_MAX().
stxxl::grow_shrink_stack2< Config_ >::_STXXL_DEPRECATED | ( | grow_shrink_stack2< Config_ >(prefetch_pool< block_type > &p_pool_,write_pool< block_type > &w_pool_,unsigned_type prefetch_aggressiveness=0) | ) | [inline] |
bool stxxl::grow_shrink_stack2< Config_ >::empty | ( | ) | const [inline] |
unsigned_type stxxl::grow_shrink_stack2< Config_ >::get_prefetch_aggr | ( | ) | const [inline] |
void stxxl::grow_shrink_stack2< Config_ >::pop | ( | ) | [inline] |
void stxxl::grow_shrink_stack2< Config_ >::push | ( | const value_type & | val | ) | [inline] |
Definition at line 572 of file stack.h.
References stxxl::STXXL_MAX(), and UNLIKELY.
void stxxl::grow_shrink_stack2< Config_ >::rehint | ( | ) | [inline, private] |
hint the last pref_aggr external blocks
Definition at line 668 of file stack.h.
References stxxl::STXXL_MAX().
void stxxl::grow_shrink_stack2< Config_ >::set_prefetch_aggr | ( | unsigned_type | new_p | ) | [inline] |
Sets level of prefetch aggressiveness (number of blocks from the prefetch pool used for prefetching)
new_p | new value for the prefetch aggressiveness |
Definition at line 644 of file stack.h.
References stxxl::STXXL_MAX().
size_type stxxl::grow_shrink_stack2< Config_ >::size | ( | ) | const [inline] |
void stxxl::grow_shrink_stack2< Config_ >::swap | ( | grow_shrink_stack2< Config_ > & | obj | ) | [inline] |
Definition at line 517 of file stack.h.
References stxxl::grow_shrink_stack2< Config_ >::alloc_strategy, stxxl::grow_shrink_stack2< Config_ >::bids, stxxl::grow_shrink_stack2< Config_ >::cache, stxxl::grow_shrink_stack2< Config_ >::cache_offset, stxxl::grow_shrink_stack2< Config_ >::owned_pool, stxxl::grow_shrink_stack2< Config_ >::pool, stxxl::grow_shrink_stack2< Config_ >::pref_aggr, stxxl::grow_shrink_stack2< Config_ >::size_, and std::swap().
Referenced by std::swap().
value_type& stxxl::grow_shrink_stack2< Config_ >::top | ( | ) | [inline] |
const value_type& stxxl::grow_shrink_stack2< Config_ >::top | ( | ) | const [inline] |
alloc_strategy_type stxxl::grow_shrink_stack2< Config_ >::alloc_strategy [private] |
Definition at line 477 of file stack.h.
Referenced by stxxl::grow_shrink_stack2< Config_ >::swap().
std::vector<bid_type> stxxl::grow_shrink_stack2< Config_ >::bids [private] |
Definition at line 476 of file stack.h.
Referenced by stxxl::grow_shrink_stack2< Config_ >::swap().
block_type* stxxl::grow_shrink_stack2< Config_ >::cache [private] |
Definition at line 475 of file stack.h.
Referenced by stxxl::grow_shrink_stack2< Config_ >::swap().
unsigned_type stxxl::grow_shrink_stack2< Config_ >::cache_offset [private] |
Definition at line 474 of file stack.h.
Referenced by stxxl::grow_shrink_stack2< Config_ >::swap().
pool_type* stxxl::grow_shrink_stack2< Config_ >::owned_pool [private] |
Definition at line 479 of file stack.h.
Referenced by stxxl::grow_shrink_stack2< Config_ >::swap().
pool_type* stxxl::grow_shrink_stack2< Config_ >::pool [private] |
Definition at line 480 of file stack.h.
Referenced by stxxl::grow_shrink_stack2< Config_ >::swap().
unsigned_type stxxl::grow_shrink_stack2< Config_ >::pref_aggr [private] |
Definition at line 478 of file stack.h.
Referenced by stxxl::grow_shrink_stack2< Config_ >::swap().
size_type stxxl::grow_shrink_stack2< Config_ >::size_ [private] |
Definition at line 473 of file stack.h.
Referenced by stxxl::grow_shrink_stack2< Config_ >::swap().