14 #ifndef STXXL_ALGO_RUN_CURSOR_HEADER
15 #define STXXL_ALGO_RUN_CURSOR_HEADER
23 template <
typename block_type>
31 inline typename block_type::const_reference
current()
const
33 return (*buffer)[pos];
41 #ifdef STXXL_SORT_SINGLE_PREFETCHER
43 template <
typename must_be_
void =
void>
44 struct have_prefetcher
46 static void* untyped_prefetcher;
51 template <
typename block_type,
52 typename prefetcher_type_>
54 #ifdef STXXL_SORT_SINGLE_PREFETCHER
55 ,
public have_prefetcher<>
65 #ifdef STXXL_SORT_SINGLE_PREFETCHER
70 static void set_prefetcher(prefetcher_type* pfptr)
72 untyped_prefetcher = pfptr;
87 return (pos >= block_type::size);
92 pos = block_type::size;
96 #ifdef STXXL_SORT_SINGLE_PREFETCHER
97 template <
typename must_be_
void>
98 void* have_prefetcher<must_be_void>::untyped_prefetcher = NULL;
101 template <
typename block_type,
102 typename prefetcher_type>
107 if (
UNLIKELY(pos >= block_type::size))
109 if (prefetcher()->block_consumed(buffer))
116 template <
typename block_type>
117 struct run_cursor_cmp
121 inline bool operator () (
const cursor_type& a,
const cursor_type& b)
123 return !((*a.buffer)[a.pos] < (*b.buffer)[b.pos]);
131 #endif // !STXXL_ALGO_RUN_CURSOR_HEADER
prefetcher_type_ prefetcher_type
block_type::const_reference current() const
uint_pair & operator++()
prefix increment operator (directly manipulates the integer parts)
prefetcher_type *& prefetcher()
run_cursor2(prefetcher_type *p=NULL)
run_cursor2< block_type, prefetcher_type > _Self
#define STXXL_BEGIN_NAMESPACE
prefetcher_type * prefetcher_
choose_int_types< my_pointer_size >::unsigned_type unsigned_type
block_type::value_type value_type
#define STXXL_END_NAMESPACE