LLVM OpenMP 19.0.0git
Classes | Functions | Variables
kmp_dispatch.h File Reference
#include "kmp.h"
#include "kmp_error.h"
#include "kmp_i18n.h"
#include "kmp_itt.h"
#include "kmp_stats.h"
#include "kmp_str.h"

Go to the source code of this file.

Classes

struct  dispatch_private_infoXX_template< T >
 
struct  dispatch_private_info_template< T >
 
union  dispatch_private_info_template< T >::private_info_tmpl
 
struct  dispatch_shared_infoXX_template< T >
 
struct  dispatch_shared_info_template< T >
 
union  dispatch_shared_info_template< T >::shared_info_tmpl
 

Functions

template<typename T >
void __kmp_dispatch_init_algorithm (ident_t *loc, int gtid, dispatch_private_info_template< T > *pr, enum sched_type schedule, T lb, T ub, typename traits_t< T >::signed_t st, typename traits_t< T >::signed_t chunk, T nproc, T unit_id)
 
template<typename T >
int __kmp_dispatch_next_algorithm (int gtid, dispatch_private_info_template< T > *pr, dispatch_shared_info_template< T > volatile *sh, kmp_int32 *p_last, T *p_lb, T *p_ub, typename traits_t< T >::signed_t *p_st, T nproc, T unit_id)
 
void __kmp_dispatch_dxo_error (int *gtid_ref, int *cid_ref, ident_t *loc_ref)
 
void __kmp_dispatch_deo_error (int *gtid_ref, int *cid_ref, ident_t *loc_ref)
 
template<typename T >
static __forceinline T test_then_add (volatile T *p, T d)
 
template<>
__forceinline kmp_int32 test_then_add< kmp_int32 > (volatile kmp_int32 *p, kmp_int32 d)
 
template<>
__forceinline kmp_int64 test_then_add< kmp_int64 > (volatile kmp_int64 *p, kmp_int64 d)
 
template<typename T >
static __forceinline T test_then_inc_acq (volatile T *p)
 
template<>
__forceinline kmp_int32 test_then_inc_acq< kmp_int32 > (volatile kmp_int32 *p)
 
template<>
__forceinline kmp_int64 test_then_inc_acq< kmp_int64 > (volatile kmp_int64 *p)
 
template<typename T >
static __forceinline T test_then_inc (volatile T *p)
 
template<>
__forceinline kmp_int32 test_then_inc< kmp_int32 > (volatile kmp_int32 *p)
 
template<>
__forceinline kmp_int64 test_then_inc< kmp_int64 > (volatile kmp_int64 *p)
 
template<typename T >
static __forceinline kmp_int32 compare_and_swap (volatile T *p, T c, T s)
 
template<>
__forceinline kmp_int32 compare_and_swap< kmp_int32 > (volatile kmp_int32 *p, kmp_int32 c, kmp_int32 s)
 
template<>
__forceinline kmp_int32 compare_and_swap< kmp_int64 > (volatile kmp_int64 *p, kmp_int64 c, kmp_int64 s)
 
template<typename T >
kmp_uint32 __kmp_ge (T value, T checker)
 
template<typename T >
kmp_uint32 __kmp_eq (T value, T checker)
 
template<typename UT >
static UT __kmp_wait (volatile UT *spinner, UT checker, kmp_uint32(*pred)(UT, UT) USE_ITT_BUILD_ARG(void *obj))
 
template<typename UT >
void __kmp_dispatch_deo (int *gtid_ref, int *cid_ref, ident_t *loc_ref)
 
template<typename UT >
void __kmp_dispatch_dxo (int *gtid_ref, int *cid_ref, ident_t *loc_ref)
 
template<typename UT >
static __forceinline long double __kmp_pow (long double x, UT y)
 
template<typename T >
static __inline traits_t< T >::unsigned_t __kmp_dispatch_guided_remaining (T tc, typename traits_t< T >::floating_t base, typename traits_t< T >::unsigned_t idx)
 

Variables

static const int guided_int_param = 2
 
static const double guided_flt_param = 0.5
 

Function Documentation

◆ __kmp_dispatch_deo()

template<typename UT >
void __kmp_dispatch_deo ( int gtid_ref,
int cid_ref,
ident_t loc_ref 
)

◆ __kmp_dispatch_deo_error()

void __kmp_dispatch_deo_error ( int gtid_ref,
int cid_ref,
ident_t loc_ref 
)

◆ __kmp_dispatch_dxo()

template<typename UT >
void __kmp_dispatch_dxo ( int gtid_ref,
int cid_ref,
ident_t loc_ref 
)

◆ __kmp_dispatch_dxo_error()

void __kmp_dispatch_dxo_error ( int gtid_ref,
int cid_ref,
ident_t loc_ref 
)

◆ __kmp_dispatch_guided_remaining()

template<typename T >
static __inline traits_t< T >::unsigned_t __kmp_dispatch_guided_remaining ( tc,
typename traits_t< T >::floating_t  base,
typename traits_t< T >::unsigned_t  idx 
)
static

Definition at line 487 of file kmp_dispatch.h.

References r.

Referenced by __kmp_dispatch_init_algorithm().

◆ __kmp_dispatch_init_algorithm()

template<typename T >
void __kmp_dispatch_init_algorithm ( ident_t loc,
int  gtid,
dispatch_private_info_template< T > *  pr,
enum sched_type  schedule,
lb,
ub,
typename traits_t< T >::signed_t  st,
typename traits_t< T >::signed_t  chunk,
nproc,
unit_id 
)

Definition at line 184 of file kmp_dispatch.cpp.

References __kmp_allocate, __kmp_auto, __kmp_dispatch_guided_remaining(), __kmp_env_consistency_check, __kmp_error_construct(), __kmp_fatal(), __kmp_get_monotonicity(), __kmp_guided, __kmp_init_lock(), __kmp_is_hybrid_cpu(), __kmp_msg_null, __kmp_static, __kmp_str_format(), __kmp_str_free(), __kmp_threads, a, b, ct_pdo, ct_pdo_ordered, d, double, FALSE, dispatch_private_info_template< T >::flags, GUIDED_ANALYTICAL_WORKAROUND, guided_flt_param, guided_int_param, i, if(), int, KD_TRACE, KMP_ASSERT, KMP_ASSERT2, KMP_ATOMIC_ST_REL, KMP_COUNT_BLOCK, KMP_COUNT_VALUE, KMP_DEBUG_ASSERT, KMP_DEFAULT_CHUNK, KMP_HNT, KMP_HW_CORE_TYPE_UNKNOWN, KMP_MASTER_GTID, KMP_MSG, kmp_nm_lower, kmp_nm_upper, kmp_ord_lower, kmp_sch_auto, kmp_sch_dynamic_chunked, kmp_sch_guided_analytical_chunked, kmp_sch_guided_chunked, kmp_sch_guided_iterative_chunked, kmp_sch_guided_simd, kmp_sch_lower, kmp_sch_runtime, kmp_sch_runtime_simd, kmp_sch_static, kmp_sch_static_balanced, kmp_sch_static_balanced_chunked, kmp_sch_static_chunked, kmp_sch_static_greedy, kmp_sch_static_steal, kmp_sch_trapezoidal, kmp_sch_upper, KMP_WARNING, loc, kmp_sched_flags::nomerge, kmp_sched_flags::ordered, dispatch_private_info_template< T >::ordered_bumped, dispatch_private_info_template< T >::private_info_tmpl::p, p, SCHEDULE_MONOTONIC, SCHEDULE_NONMONOTONIC, SCHEDULE_WITHOUT_MODIFIERS, ST, dispatch_private_info_template< T >::steal_flag, kmp_team::t, target(), TRUE, type, dispatch_private_info_template< T >::type_size, dispatch_private_info_template< T >::u, kmp_sched_flags::use_hier, and kmp_sched_flags::use_hybrid.

Referenced by __kmp_dispatch_init(), and kmp_hier_t< T >::next().

◆ __kmp_dispatch_next_algorithm()

template<typename T >
int __kmp_dispatch_next_algorithm ( int  gtid,
dispatch_private_info_template< T > *  pr,
dispatch_shared_info_template< T > volatile *  sh,
kmp_int32 p_last,
T *  p_lb,
T *  p_ub,
typename traits_t< T >::signed_t *  p_st,
nproc,
unit_id 
)

◆ __kmp_eq()

template<typename T >
kmp_uint32 __kmp_eq ( value,
checker 
)

Definition at line 270 of file kmp_dispatch.h.

References checker, and value.

◆ __kmp_ge()

template<typename T >
kmp_uint32 __kmp_ge ( value,
checker 
)

Definition at line 267 of file kmp_dispatch.h.

References checker, and value.

◆ __kmp_pow()

template<typename UT >
static __forceinline long double __kmp_pow ( long double  x,
UT  y 
)
static

Definition at line 463 of file kmp_dispatch.h.

References KMP_DEBUG_ASSERT, and s.

◆ __kmp_wait()

template<typename UT >
static UT __kmp_wait ( volatile UT *  spinner,
UT  checker,
kmp_uint32(*)(UT, UT) USE_ITT_BUILD_ARG pred(void *obj)   
)
static

◆ compare_and_swap()

template<typename T >
static __forceinline kmp_int32 compare_and_swap ( volatile T *  p,
c,
s 
)
static

◆ compare_and_swap< kmp_int32 >()

template<>
__forceinline kmp_int32 compare_and_swap< kmp_int32 > ( volatile kmp_int32 p,
kmp_int32  c,
kmp_int32  s 
)

Definition at line 256 of file kmp_dispatch.h.

References KMP_COMPARE_AND_STORE_REL32, p, and s.

◆ compare_and_swap< kmp_int64 >()

template<>
__forceinline kmp_int32 compare_and_swap< kmp_int64 > ( volatile kmp_int64 p,
kmp_int64  c,
kmp_int64  s 
)

Definition at line 262 of file kmp_dispatch.h.

References KMP_COMPARE_AND_STORE_REL64, p, and s.

◆ test_then_add()

template<typename T >
static __forceinline T test_then_add ( volatile T *  p,
d 
)
static

◆ test_then_add< kmp_int32 >()

template<>
__forceinline kmp_int32 test_then_add< kmp_int32 > ( volatile kmp_int32 p,
kmp_int32  d 
)

Definition at line 202 of file kmp_dispatch.h.

References d, KMP_TEST_THEN_ADD32, p, and r.

◆ test_then_add< kmp_int64 >()

template<>
__forceinline kmp_int64 test_then_add< kmp_int64 > ( volatile kmp_int64 p,
kmp_int64  d 
)

Definition at line 210 of file kmp_dispatch.h.

References d, KMP_TEST_THEN_ADD64, p, and r.

◆ test_then_inc()

template<typename T >
static __forceinline T test_then_inc ( volatile T *  p)
static

◆ test_then_inc< kmp_int32 >()

template<>
__forceinline kmp_int32 test_then_inc< kmp_int32 > ( volatile kmp_int32 p)

Definition at line 238 of file kmp_dispatch.h.

References KMP_TEST_THEN_INC32, p, and r.

Referenced by __kmpc_next_section().

◆ test_then_inc< kmp_int64 >()

template<>
__forceinline kmp_int64 test_then_inc< kmp_int64 > ( volatile kmp_int64 p)

Definition at line 245 of file kmp_dispatch.h.

References KMP_TEST_THEN_INC64, p, and r.

◆ test_then_inc_acq()

template<typename T >
static __forceinline T test_then_inc_acq ( volatile T *  p)
static

◆ test_then_inc_acq< kmp_int32 >()

template<>
__forceinline kmp_int32 test_then_inc_acq< kmp_int32 > ( volatile kmp_int32 p)

Definition at line 221 of file kmp_dispatch.h.

References KMP_TEST_THEN_INC_ACQ32, p, and r.

◆ test_then_inc_acq< kmp_int64 >()

template<>
__forceinline kmp_int64 test_then_inc_acq< kmp_int64 > ( volatile kmp_int64 p)

Definition at line 228 of file kmp_dispatch.h.

References KMP_TEST_THEN_INC_ACQ64, p, and r.

Variable Documentation

◆ guided_flt_param

const double guided_flt_param = 0.5
static

Definition at line 512 of file kmp_dispatch.h.

Referenced by __kmp_dispatch_init_algorithm().

◆ guided_int_param

const int guided_int_param = 2
static

Definition at line 511 of file kmp_dispatch.h.

Referenced by __kmp_dispatch_init_algorithm().