__gnu_para...f_selector(3)

πŸ“¦ version 4.4.0, in nixpkgs unstable

🌸 NAME 🌸

So this whole page lives in the Library Functions Manual bestie, and it's all about __gnu_parallel::find_if_selector β€” a lil helper that tests a predicate on a single element, and it's the one doing the heavy lifting behind std::find() and std::find_if (). πŸ’…


✨ SYNOPSIS ✨

K so first thing: it Inherits __gnu_parallel::generic_find_selector. Family tree moment. 🫢

πŸ’– Public Member Functions πŸ’–

  • operator() β€” template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename Pred > bool operator() (RandomAccessIterator1 i1, RandomAccessIterator2 i2, Pred pred)
  • sequential_algorithm() β€” template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename Pred > std::pair< RandomAccessIterator1, RandomAccessIterator2 > sequential_algorithm (RandomAccessIterator1 begin1, RandomAccessIterator1 end1, RandomAccessIterator2 begin2, Pred pred)

πŸ¦‹ DESCRIPTION (the Detailed one) πŸ¦‹

Okay so literally what it says on the tin: it tests a predicate on a single element, and it's the selector used for std::find() and std::find_if (). That's the whole vibe. ✨

Fun little origination fact for you: it's Definition at line 50 of file find_selectors.h. Slay.


πŸŽ€ MEMBER FUNCTION DOCUMENTATION πŸŽ€

πŸ”₯ operator()

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename Pred >
bool __gnu_parallel::find_if_selector::operator() (RandomAccessIterator1 i1, RandomAccessIterator2 i2, Pred pred) [inline]

This one does the test on one position. One. Single. Position. Main character energy tbh.

Parameters: πŸ‘‡

  • i1 β€” iterator on first sequence.
  • i2 β€” iterator on second sequence (unused). yeah she's just there for the fit 😭
  • pred β€” the find predicate.

It's Definition at line 60 of file find_selectors.h. No cap. 🧚

🌈 sequential_algorithm()

template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename Pred >
std::pair<RandomAccessIterator1, RandomAccessIterator2> __gnu_parallel::find_if_selector::sequential_algorithm (RandomAccessIterator1 begin1, RandomAccessIterator1 end1, RandomAccessIterator2 begin2, Pred pred) [inline]

The corresponding sequential algorithm on a sequence β€” like, the non-parallel version of the same job. She's the calm one. πŸ“

Parameters: πŸ‘‡

  • begin1 β€” begin iterator of first sequence.
  • end1 β€” end iterator of first sequence.
  • begin2 β€” begin iterator of second sequence.
  • pred β€” the find predicate.

It's Definition at line 72 of file find_selectors.h. Iconic. πŸ‘‘


πŸ‘‘ AUTHOR πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. Not a human, just a robot doing its lil thing. πŸ€–πŸ’–


ok that's the whole page bestie, go forth and find_if responsibly πŸ¦‹

Sign-off time: this beauty came from libstdc++, dated 21 Apr 2009 β€” vintage, lowkey. Mwah. πŸ’œπŸŽ€

πŸ“¦ where this page comes from