__gnu_parallel::loser_tree_traits< T > Struct Template Reference

Traits for determining whether the loser tree should use pointers or copies. More...

List of all members.

Static Public Attributes


Detailed Description

template<typename T>
struct __gnu_parallel::loser_tree_traits< T >

Traits for determining whether the loser tree should use pointers or copies.

The field "use_pointer" is used to determine whether to use pointers in the loser trees or whether to copy the values into the loser tree.

The default behavior is to use pointers if the data type is 4 times as big as the pointer to it.

Specialize for your data type to customize the behavior.

Example:

template<> struct loser_tree_traits<int> { static const bool use_pointer = false; };

template<> struct loser_tree_traits<heavyweight_type> { static const bool use_pointer = true; };

Parameters:
T type to give the loser tree traits for.

Definition at line 776 of file multiway_merge.h.


Member Data Documentation

template<typename T >
const bool __gnu_parallel::loser_tree_traits< T >::use_pointer [static]

True iff to use pointers instead of values in loser trees.

The default behavior is to use pointers if the data type is four times as big as the pointer to it.

Definition at line 784 of file multiway_merge.h.


The documentation for this struct was generated from the following file:

Generated on Tue Apr 21 13:14:06 2009 for libstdc++ by  doxygen 1.5.8