Stxxl  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Private Member Functions | Private Attributes
stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type > Class Template Reference

#include <losertree.h>

Inheritance diagram for stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >:
Inheritance graph
[legend]
Collaboration diagram for stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef
run_cursor_type::prefetcher_type 
prefetcher_type
typedef run_cursor_type::value_type value_type

Public Member Functions

 loser_tree (prefetcher_type *p, int_type nruns, run_cursor_cmp_type c)
 ~loser_tree ()
void swap (loser_tree &obj)
void multi_merge (value_type *out_first, value_type *out_last)

Private Member Functions

int_type init_winner (int_type root)
template<unsigned LogK>
void multi_merge_unrolled (value_type *out_first, value_type *out_last)
void multi_merge_unrolled_0 (value_type *out_first, value_type *out_last)
void multi_merge_k (value_type *out_first, value_type *out_last)

Private Attributes

int logK
int_type k
int_typeentry
run_cursor_type * current
run_cursor_cmp_type cmp

Detailed Description

template<typename run_cursor_type, typename run_cursor_cmp_type>
class stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >

Definition at line 28 of file losertree.h.


Member Typedef Documentation

template<typename run_cursor_type, typename run_cursor_cmp_type>
typedef run_cursor_type::prefetcher_type stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >::prefetcher_type

Definition at line 60 of file losertree.h.

template<typename run_cursor_type, typename run_cursor_cmp_type>
typedef run_cursor_type::value_type stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >::value_type

Definition at line 61 of file losertree.h.


Constructor & Destructor Documentation

template<typename run_cursor_type, typename run_cursor_cmp_type>
stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >::loser_tree ( prefetcher_type p,
int_type  nruns,
run_cursor_cmp_type  c 
) [inline]

Definition at line 63 of file losertree.h.

References stxxl::log2_ceil().

template<typename run_cursor_type, typename run_cursor_cmp_type>
stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >::~loser_tree ( ) [inline]

Definition at line 99 of file losertree.h.


Member Function Documentation

template<typename run_cursor_type, typename run_cursor_cmp_type>
int_type stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >::init_winner ( int_type  root) [inline, private]

Definition at line 36 of file losertree.h.

template<typename run_cursor_type, typename run_cursor_cmp_type>
void stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >::multi_merge ( value_type out_first,
value_type out_last 
) [inline]

Definition at line 201 of file losertree.h.

Referenced by stxxl::sort_local::merge_runs().

template<typename run_cursor_type, typename run_cursor_cmp_type>
void stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >::multi_merge_k ( value_type out_first,
value_type out_last 
) [inline, private]

Definition at line 171 of file losertree.h.

References LIKELY, and std::swap().

template<typename run_cursor_type, typename run_cursor_cmp_type>
template<unsigned LogK>
void stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >::multi_merge_unrolled ( value_type out_first,
value_type out_last 
) [inline, private]

Definition at line 116 of file losertree.h.

References LIKELY, and TreeStep.

template<typename run_cursor_type, typename run_cursor_cmp_type>
void stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >::multi_merge_unrolled_0 ( value_type out_first,
value_type out_last 
) [inline, private]

Definition at line 161 of file losertree.h.

References LIKELY.

template<typename run_cursor_type, typename run_cursor_cmp_type>
void stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >::swap ( loser_tree< run_cursor_type, run_cursor_cmp_type > &  obj) [inline]

Member Data Documentation

template<typename run_cursor_type, typename run_cursor_cmp_type>
run_cursor_cmp_type stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >::cmp [private]
template<typename run_cursor_type, typename run_cursor_cmp_type>
run_cursor_type* stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >::current [private]
template<typename run_cursor_type, typename run_cursor_cmp_type>
int_type* stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >::entry [private]
template<typename run_cursor_type, typename run_cursor_cmp_type>
int_type stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >::k [private]
template<typename run_cursor_type, typename run_cursor_cmp_type>
int stxxl::loser_tree< run_cursor_type, run_cursor_cmp_type >::logK [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines