14 #ifndef STXXL_MNG_BLOCK_ALLOC_HEADER
15 #define STXXL_MNG_BLOCK_ALLOC_HEADER
35 int operator () (
int i)
const;
36 static const char * name();
51 diff = config::get_instance()->disks_number();
56 return begin + i % diff;
87 return "fully randomized striping";
119 return begin + (i + offset) % diff;
124 return "simple randomized striping";
133 std::vector<unsigned_type>
perm;
157 return begin + perm[i % diff];
162 return "randomized cycling striping";
171 RC_disk() :
RC(
config::get_instance()->regular_disk_range().first,
config::get_instance()->regular_disk_range().second)
176 return "Randomized cycling striping on regular disks";
190 return "Randomized cycling striping on flash devices";
212 return "single disk";
219 template <
class BaseAllocator>
243 return base(offset + i);
257 #ifndef STXXL_DEFAULT_ALLOC_STRATEGY
258 #define STXXL_DEFAULT_ALLOC_STRATEGY stxxl::RC
265 #endif // !STXXL_MNG_BLOCK_ALLOC_HEADER
striping(unsigned_type b, unsigned_type e)
random_number< random_uniform_fast > rnd_type
Fully randomized disk allocation scheme functor.
SR(unsigned_type b, unsigned_type e)
Allocator functor adaptor.
random_number< random_uniform_fast > rnd_type
int_type get_offset() const
Example disk allocation scheme functor.
'Single disk' disk allocation scheme functor.
static const char * name()
RC_flash(unsigned_type b, unsigned_type e)
offset_allocator()
Creates functor based on default BaseAllocator functor.
offset_allocator(int_type offset_, const BaseAllocator &base_)
Creates functor based on instance of BaseAllocator functor with offset offset_.
offset_allocator(const BaseAllocator &base_)
Creates functor based on instance of BaseAllocator functor.
static const char * name()
static const char * name()
Randomized cycling disk allocation scheme functor.
choose_int_types< my_pointer_size >::int_type int_type
void random_shuffle(ExtIterator first, ExtIterator last, RandomNumberGenerator &rand, unsigned_type M, AllocStrategy AS=STXXL_DEFAULT_ALLOC_STRATEGY())
External equivalent of std::random_shuffle.
static const char * name()
Striping disk allocation scheme functor.
std::vector< unsigned_type > perm
#define STXXL_BEGIN_NAMESPACE
Simple randomized disk allocation scheme functor.
static const char * name()
FR(unsigned_type b, unsigned_type e)
static const char * name()
choose_int_types< my_pointer_size >::unsigned_type unsigned_type
Access point to disks properties. Since 1.4.0: no config files are read automatically! ...
RC_disk(unsigned_type b, unsigned_type e)
RC(unsigned_type b, unsigned_type e)
#define _STXXL_FORCE_SEQUENTIAL
void set_offset(int_type i)
static const char * name()
#define STXXL_END_NAMESPACE
single_disk(unsigned_type d, unsigned_type=0)