LLVM OpenMP 22.0.0git
kmp_flag< FlagType > Class Template Reference

Base class for all flags. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/openmp/runtime/src/kmp_wait_release.h"

Inheritance diagram for kmp_flag< FlagType >:
[legend]

Public Types

typedef flag_traits< FlagType > traits_type

Public Member Functions

 kmp_flag ()
 kmp_flag (int nwaiters)
 kmp_flag (std::atomic< bool > *sloc)
flag_type get_type ()
kmp_info_tget_waiter (kmp_uint32 i)
 param i in index into waiting_threads
kmp_uint32 get_num_waiters ()
void set_waiter (kmp_info_t *thr)
enum barrier_type get_bt ()

Protected Attributes

flag_properties t
 "Type" of the flag in loc
kmp_info_twaiting_threads [1] = {nullptr}
kmp_uint32 num_waiting_threads
 Num threads sleeping on this thread.
std::atomic< bool > * sleepLoc

Detailed Description

template<flag_type FlagType>
class kmp_flag< FlagType >

Base class for all flags.

Definition at line 104 of file kmp_wait_release.h.

Member Typedef Documentation

◆ traits_type

template<flag_type FlagType>
typedef flag_traits<FlagType> kmp_flag< FlagType >::traits_type

Definition at line 113 of file kmp_wait_release.h.

Constructor & Destructor Documentation

◆ kmp_flag() [1/3]

◆ kmp_flag() [2/3]

template<flag_type FlagType>
kmp_flag< FlagType >::kmp_flag ( int nwaiters)
inline

Definition at line 115 of file kmp_wait_release.h.

References t.

◆ kmp_flag() [3/3]

template<flag_type FlagType>
kmp_flag< FlagType >::kmp_flag ( std::atomic< bool > * sloc)
inline

Definition at line 117 of file kmp_wait_release.h.

References t.

Member Function Documentation

◆ get_bt()

template<flag_type FlagType>
enum barrier_type kmp_flag< FlagType >::get_bt ( )
inline

Definition at line 136 of file kmp_wait_release.h.

References bs_last_barrier.

◆ get_num_waiters()

template<flag_type FlagType>
kmp_uint32 kmp_flag< FlagType >::get_num_waiters ( )
inline
Returns
num_waiting_threads

Definition at line 129 of file kmp_wait_release.h.

References kmp_uint32, and num_waiting_threads.

◆ get_type()

template<flag_type FlagType>
flag_type kmp_flag< FlagType >::get_type ( )
inline
Returns
the flag_type

Definition at line 120 of file kmp_wait_release.h.

References t.

◆ get_waiter()

template<flag_type FlagType>
kmp_info_t * kmp_flag< FlagType >::get_waiter ( kmp_uint32 i)
inline

param i in index into waiting_threads

Returns
the thread that is waiting at index i

Definition at line 124 of file kmp_wait_release.h.

References i, KMP_DEBUG_ASSERT, kmp_uint32, num_waiting_threads, and waiting_threads.

◆ set_waiter()

template<flag_type FlagType>
void kmp_flag< FlagType >::set_waiter ( kmp_info_t * thr)
inline
Parameters
thrin the thread which is now waiting Insert a waiting thread at index 0.

Definition at line 132 of file kmp_wait_release.h.

References num_waiting_threads, and waiting_threads.

Referenced by __kmp_hyper_barrier_gather().

Member Data Documentation

◆ num_waiting_threads

template<flag_type FlagType>
kmp_uint32 kmp_flag< FlagType >::num_waiting_threads
protected

Num threads sleeping on this thread.

Definition at line 109 of file kmp_wait_release.h.

Referenced by get_num_waiters(), get_waiter(), and set_waiter().

◆ sleepLoc

template<flag_type FlagType>
std::atomic<bool>* kmp_flag< FlagType >::sleepLoc
protected

Definition at line 110 of file kmp_wait_release.h.

◆ t

template<flag_type FlagType>
flag_properties kmp_flag< FlagType >::t
protected

"Type" of the flag in loc

Threads sleeping on this thread.

Definition at line 106 of file kmp_wait_release.h.

Referenced by get_type(), kmp_flag(), kmp_flag(), and kmp_flag().

◆ waiting_threads

template<flag_type FlagType>
kmp_info_t* kmp_flag< FlagType >::waiting_threads[1] = {nullptr}
protected

Definition at line 108 of file kmp_wait_release.h.

Referenced by get_waiter(), and set_waiter().


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