14 #ifndef STXXL_MNG_BLOCK_ALLOC_INTERLEAVED_HEADER
15 #define STXXL_MNG_BLOCK_ALLOC_INTERLEAVED_HEADER
24 #define CHECK_RUN_BOUNDS(pos)
34 : nruns(nruns), begindisk(begindisk), diff(diff)
39 : nruns(_nruns), begindisk(strategy.begin), diff(strategy.diff)
44 return begindisk + (i / nruns) % diff;
78 return begindisk + (i / nruns + offsets[i % nruns]) % diff;
84 std::vector<std::vector<unsigned_type> >
perms;
102 return begindisk + perms[i % nruns][(i / nruns) % diff];
118 template <
typename scheme>
168 #endif // !STXXL_MNG_BLOCK_ALLOC_INTERLEAVED_HEADER
Fully randomized disk allocation scheme functor.
interleaved_SR(int_type _nruns, const SR &strategy)
random_number< random_uniform_fast > rnd_type
std::vector< std::vector< unsigned_type > > perms
'Single disk' disk allocation scheme functor.
External vector container. Introduction to vector container: see STXXL Vector tutorial. Design and Internals of vector container: see Vector.
interleaved_striping strategy
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.
first_disk_only(int_type _nruns, const single_disk &strategy)
Striping disk allocation scheme functor.
#define STXXL_BEGIN_NAMESPACE
std::vector< int > offsets
interleaved_RC(int_type _nruns, const RC &strategy)
Simple randomized disk allocation scheme functor.
random_number< random_uniform_fast > rnd_type
interleaved_FR(int_type _nruns, const FR &strategy)
choose_int_types< my_pointer_size >::unsigned_type unsigned_type
interleaved_striping(int_type nruns, unsigned_type begindisk, unsigned_type diff)
#define _STXXL_FORCE_SEQUENTIAL
interleaved_striping(int_type _nruns, const striping &strategy)
#define STXXL_END_NAMESPACE