STXXL  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pq_mergers.h File Reference

Go to the source code of this file.

Namespaces

 stxxl
 STXXL library namespace
 
 stxxl::priority_queue_local
 

Macros

#define Merge3Case(a, b, c)
 
#define Merge4Case(a, b, c, d)
 
#define StartMerge4(a, b, c, d)
 

Functions

template<class InputIterator , class OutputIterator , class CompareType >
void stxxl::priority_queue_local::merge3_iterator (InputIterator &source0, InputIterator &source1, InputIterator &source2, OutputIterator target, unsigned_type length, CompareType &cmp)
 
template<class InputIterator , class OutputIterator , class CompareType >
void stxxl::priority_queue_local::merge4_iterator (InputIterator &source0, InputIterator &source1, InputIterator &source2, InputIterator &source3, OutputIterator target, unsigned_type length, CompareType &cmp)
 
template<class InputIterator , class OutputIterator , class CompareType >
void stxxl::priority_queue_local::merge_iterator (InputIterator &source0, InputIterator &source1, OutputIterator target, unsigned_type length, CompareType &cmp)
 

Macro Definition Documentation

#define Merge3Case (   a,
  b,
 
)
Value:
s ## a ## b ## c : \
if (target == done) \
return; \
*target = *source ## a; \
++target; \
++source ## a; \
if (cmp(*source ## b, *source ## a)) \
goto s ## a ## b ## c; \
if (cmp(*source ## c, *source ## a)) \
goto s ## b ## a ## c; \
goto s ## b ## c ## a;

Referenced by stxxl::priority_queue_local::merge3_iterator().

#define Merge4Case (   a,
  b,
  c,
 
)
Value:
s ## a ## b ## c ## d : \
if (target == done) \
return; \
*target = *source ## a; \
++target; \
++source ## a; \
if (cmp(*source ## c, *source ## a)) \
{ \
if (cmp(*source ## b, *source ## a)) \
goto s ## a ## b ## c ## d; \
else \
goto s ## b ## a ## c ## d; \
} \
else \
{ \
if (cmp(*source ## d, *source ## a)) \
goto s ## b ## c ## a ## d; \
else \
goto s ## b ## c ## d ## a; \
}

Referenced by stxxl::priority_queue_local::merge4_iterator().

#define StartMerge4 (   a,
  b,
  c,
 
)
Value:
if ((!cmp(*source ## a, *source ## b)) && (!cmp(*source ## b, *source ## c)) && (!cmp(*source ## c, *source ## d))) \
goto s ## a ## b ## c ## d;

Referenced by stxxl::priority_queue_local::merge4_iterator().