__GNU_PARALLEL::_LOSERTREETRAITS(3cxx)

🌸 NAME 🌸

__gnu_parallel::_LoserTreeTraits< _Tp > β€” literally the traits that decide whether your loser tree should be out here using pointers or just copying values. That's the whole vibe. πŸ’…

(also hiii bestie, this is the page from the (3cxx) manual, welcome to the group chat 🫢)

✨ SYNOPSIS ✨

okay so first thing, you gotta pull it in:

#include <multiway_merge.h>

🌈 Static Public Attributes 🌈

  • static const bool _M_use_pointer β€” true iff to use pointers instead of values in loser trees. (iff = if and only if, she's precise like that πŸ’β€β™€οΈ)

πŸ’… Detailed Description πŸ’…

the whole struct, laid out for you:

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

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

The field '_M_use_pointer' is what decides whether to use pointers in the loser trees, or whether to copy the values into the loser tree. no cap.

The default behavior? Use pointers if the data type is 4 times as big as the pointer to it. that's the rule, bestie, don't come for me.

Specialize for your data type to customize the behavior. yes, you can make it your own, main character energy.

Example, and I'm keeping this exactly:

template<> struct _LoserTreeTraits<int> { static const bool _M_use_pointer = false; };

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

Parameters

  • _Tp β€” type to give the loser tree traits for. give her a type and she'll give you traits. πŸŽ€

πŸŽ€ Member Data Documentation πŸŽ€

⭐ _M_use_pointer ⭐

template<typename _Tp > const bool __gnu_parallel::_LoserTreeTraits< _Tp >::_M_use_pointer [static]

True iff to use pointers instead of values in loser trees. And the default behavior is to use pointers if the data type is four times as big as the pointer to it. same rule, four times, periodt. πŸ’œ

πŸ¦‹ Author πŸ¦‹

Generated automatically by Doxygen for libstdc++ from the source code. so don't @ me, @ Doxygen. 😭


and that's the tea β˜• β€” this page is from libstdc++ (section 3cxx bestie), with the date stamped down in the footer where the original footer line lived, all auto-generated by Doxygen. mwah πŸ’‹πŸ’–