__gnu_parallel::omp_loop_tag(3cxx)

πŸ’… NAME πŸ’…

__gnu_parallel::omp_loop_tag β€” bestie, this tag is literally telling the compiler "hey, run this in parallel with OpenMP dynamic load-balancing, k?" at compile time. No cap. 🫢

(also, hi, this is a page from the libstdc++ manual, section 3cxx β€” more on that at the very bottom πŸ’–)


✨ SYNOPSIS ✨

#include <tags.h>

Inherits __gnu_parallel::parallel_tag β€” so it's giving "I'm a parallel tag, but make it OpenMP" πŸ‘‘

πŸŽ€ Public Member Functions πŸŽ€

  • _ThreadIndex __get_num_threads() β€” figure out how many threads we actually want, iykyk
  • void set_num_threads(_ThreadIndex __num_threads) β€” set the desired number of threads, periodt

🌸 Detailed Description 🌸

__gnu_parallel::omp_loop_tag recommends parallel execution using OpenMP dynamic load-balancing at compile time. That's the whole vibe. It's a little tag struct whose entire main character energy is "please parallelize me, and do the load balancing dynamically with OpenMP" ✨πŸ”₯


πŸ’œ Member Function Documentation πŸ’œ

🌈 _ThreadIndex __gnu_parallel::parallel_tag::__get_num_threads () [inline], [inherited] 🌈

Find out the desired number of threads. Literally its only job, and it ate. πŸ’…

Returns

Desired number of threads. ⭐

Referenced by β€” okay so this is a lot of references, but here's the full list, no skipping, fr fr:

  • __gnu_parallel::__parallel_sort()
  • __gnu_parallel::__parallel_sort()
  • __gnu_parallel::__parallel_sort()
  • __gnu_parallel::__parallel_sort()
  • __gnu_parallel::__parallel_sort()
  • __gnu_parallel::__parallel_sort()
  • __gnu_parallel::__parallel_sort()

(yes, that's the same function seven times β€” that's exactly how the original lists it, and we do not merge them around here 😭)

πŸ¦‹ void __gnu_parallel::parallel_tag::set_num_threads (_ThreadIndex __num_threads) [inline], [inherited] πŸ¦‹

Set the desired number of threads. Iconic behaviour, honestly.

Parameters

  • __num_threads β€” the desired number of threads πŸŽ€

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. So nobody hand-wrote this one, it's giving ✨auto-generated realness✨ πŸ™ˆ


πŸ’€ real talk, bestie: __get_num_threads() and set_num_threads() are inherited from __gnu_parallel::parallel_tag, so they live over there β€” this page just shows them so you're not lost. 🫢

and that's the whole page, bestie β€” stay hydrated, read your tags, and remember: compile-time vibes only πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«ΆπŸ˜­πŸ”₯πŸ‘‘πŸŒˆβ­πŸ’€πŸ™ˆπŸ“πŸ§šπŸ’œ

this has been libstdc++, page __gnu_parallel::omp_loop_tag(3cxx) β€” slay, bye! πŸ’