20 #ifndef STXXL_ASYNC_SCHEDULE_HEADER
21 #define STXXL_ASYNC_SCHEDULE_HEADER
23 #include <stxxl/bits/common/types.h>
26 __STXXL_BEGIN_NAMESPACE
28 void compute_prefetch_schedule(
29 const int_type * first,
30 const int_type * last,
35 inline void compute_prefetch_schedule(
42 compute_prefetch_schedule(static_cast<const int_type *>(first), last, out_first, m, D);
45 template <
typename run_type>
46 void compute_prefetch_schedule(
47 const run_type & input,
52 const int_type L = input.size();
53 int_type * disks =
new int_type[L];
54 for (int_type i = 0; i < L; ++i)
55 disks[i] = input[i].bid.storage->get_physical_device_id();
56 compute_prefetch_schedule(disks, disks + L, out_first, m, D);
60 template <
typename b
id_iterator_type>
61 void compute_prefetch_schedule(
62 bid_iterator_type input_begin,
63 bid_iterator_type input_end,
68 const int_type L = input_end - input_begin;
69 int_type * disks =
new int_type[L];
71 for (bid_iterator_type it = input_begin; it != input_end; ++it, ++i)
72 disks[i] = it->storage->get_physical_device_id();
73 compute_prefetch_schedule(disks, disks + L, out_first, m, D);
79 #endif // !STXXL_ASYNC_SCHEDULE_HEADER