__GNU_PARALLEL::_LOSERTREEUNGUARDEDBASE(3cxx)

πŸ¦‹ __gnu_parallel::_LoserTreeUnguardedBase< _Tp, _Compare > β€” the man page, but make it make sense πŸ’…

okay bestie, so this is one of those 3cxx pages (that's the manual section, slay) and it's documenting __gnu_parallel::_LoserTreeUnguardedBase< _Tp, _Compare >, which is literally just the base class for the unguarded _LoserTree implementation. no cap. it's giving "foundation, not the whole house" energy πŸŽ€


🌸 NAME 🌸

__gnu_parallel::_LoserTreeUnguardedBase< _Tp, _Compare > β€” the base class for the unguarded _LoserTree implementation. that's the whole vibe. it's the parent, it's the blueprint, it's the main character's backstory ✨


✨ SYNOPSIS ✨

#include <losertree.h>

and also, the little nepo-babies that inherit from it 🫢:

  • __gnu_parallel::_LoserTreeUnguarded< __stable, _Tp, _Compare >
  • __gnu_parallel::_LoserTreeUnguarded< false, _Tp, _Compare >

πŸ’– PUBLIC MEMBER FUNCTIONS πŸ’–

here's the roster, the whole friend group:

  • _LoserTreeUnguardedBase (unsigned int __k, const _Tp &__sentinel, _Compare __comp=std::less< _Tp >()) β€” the constructor, the origin story. it takes __k, a __sentinel, and __comp which defaults to std::less< _Tp >(). iykyk.
  • int __get_min_source () β€” hands you back the source of the current minimum, as an int. iconic.
  • void __insert_start (const _Tp &__key, int __source, bool) β€” inserts a starting element into the tree, given __key, __source, and a bool. that third one's just vibes, no name, we respect the mysteriousness πŸ™ˆ

🧚 PROTECTED ATTRIBUTES 🧚

the internals, the behind-the-scenes, the group chat nobody else gets to see:

  • _Compare _M_comp β€” the comparator, stored. periodt.
  • unsigned int _M_ik β€” an unsigned int. keeping it lowkey.
  • unsigned int _M_k β€” another unsigned int, also living its best life.
  • _Loser * _M_losers β€” a pointer to _Loser. yes, a whole array of them, and yes, the name is a little mean but that's the data structure's problem not ours πŸ’€
  • unsigned int _M_offset β€” unsigned int, offset edition.

πŸ‘‘ DETAILED DESCRIPTION πŸ‘‘

template<typename _Tp, typename _Compare>
class __gnu_parallel::_LoserTreeUnguardedBase< _Tp, _Compare >"Base class for unguarded _LoserTree implementation.
(the original line really does have that quote mark jammed in there like that β€” we keep it exactly as-is, we do not fix, we do not judge 🫢)

so what's the tea? this is the base class for the unguarded _LoserTree implementation. here's the important stuff:

  • the whole element gets copied into the tree structure. not a pointer, not a reference, the whole thing. carry it with you πŸŽ€
  • no guarding is done β€” so not a single input sequence must run empty. like, at all. that's the rule, bestie, respect it 😭
  • unused __sequence heads are marked with a sentinel, and that sentinel is > all elements that are to be merged. it's the ultimate bigger fish 🌈
  • and, direct quote energy: this is a very fast variant πŸ”₯

⭐ AUTHOR ⭐

Generated automatically by Doxygen for libstdc++ from the source code. so nobody actually hand-wrote this, a robot did, and honestly? it ate πŸ’…


real talk: this whole thing is a template on < _Tp, _Compare >, so those two are placeholders and you fill in your own types. don't come for me, that's literally what template<typename _Tp, typename _Compare> means πŸ¦‹

and that's the page!! mwah πŸ’– written by a Doxygen bot on behalf of libstdc++ from the source code, footer and all, dated libst__gnu_parallel:..._Tp, _Compare >(3cxx) in that glorious 3cxx manual section. go merge some sequences, unguarded, sentinel and all. periodt πŸŽ€βœ¨