GNU g++  v5.2.1
GNU Standard C++
__gnu_parallel::_LoserTreeTraits< _Tp > Struct Template Reference

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

#include <multiway_merge.h>

Collaboration diagram for __gnu_parallel::_LoserTreeTraits< _Tp >:

Static Public Attributes

static const bool _M_use_pointer = (sizeof(_Tp) > 4 * sizeof(_Tp*))
 True iff to use pointers instead of values in loser trees. More...
 

Detailed Description

template<typename _Tp>
struct __gnu_parallel::_LoserTreeTraits< _Tp >

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

The field "_M_use_pointer" is used to determine whether to use pointers in he 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 _LoserTreeTraits<int> { static const bool _M_use_pointer = false; };

template<> struct _LoserTreeTraits<heavyweight_type> { static const bool _M_use_pointer = true; };

Parameters
_Tptype to give the loser tree traits for.

Member Data Documentation

template<typename _Tp >
const bool __gnu_parallel::_LoserTreeTraits< _Tp >::_M_use_pointer = (sizeof(_Tp) > 4 * sizeof(_Tp*))
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.


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