kmp_dispatch.cpp File Reference

#include "kmp.h"
#include "kmp_i18n.h"
#include "kmp_str.h"
#include "kmp_error.h"
#include "ompt-internal.h"

Go to the source code of this file.

Data Structures

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

Defines

#define GUIDED_ANALYTICAL_WORKAROUND   (x)
#define OMPT_LOOP_END

Functions

template<typename UT >
static void __kmp_dispatch_deo (int *gtid_ref, int *cid_ref, ident_t *loc_ref)
static void __kmp_dispatch_deo_error (int *gtid_ref, int *cid_ref, ident_t *loc_ref)
template<typename UT >
static void __kmp_dispatch_dxo (int *gtid_ref, int *cid_ref, ident_t *loc_ref)
static void __kmp_dispatch_dxo_error (int *gtid_ref, int *cid_ref, ident_t *loc_ref)
template<typename UT >
static void __kmp_dispatch_finish (int gtid, ident_t *loc)
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)
template<typename T >
static void __kmp_dispatch_init (ident_t *loc, int gtid, enum sched_type schedule, T lb, T ub, typename traits_t< T >::signed_t st, typename traits_t< T >::signed_t chunk, int push_ws)
template<typename T >
static int __kmp_dispatch_next (ident_t *loc, int gtid, kmp_int32 *p_last, T *p_lb, T *p_ub, typename traits_t< T >::signed_t *p_st)
template<typename UT >
static kmp_uint32 __kmp_eq (UT value, UT checker)
kmp_uint32 __kmp_eq_4 (kmp_uint32 value, kmp_uint32 checker)
kmp_uint32 __kmp_eq_8 (kmp_uint64 value, kmp_uint64 checker)
template<typename UT >
static kmp_uint32 __kmp_ge (UT value, UT checker)
kmp_uint32 __kmp_ge_4 (kmp_uint32 value, kmp_uint32 checker)
kmp_uint32 __kmp_ge_8 (kmp_uint64 value, kmp_uint64 checker)
template<typename UT >
static kmp_uint32 __kmp_le (UT value, UT checker)
kmp_uint32 __kmp_le_4 (kmp_uint32 value, kmp_uint32 checker)
kmp_uint32 __kmp_le_8 (kmp_uint64 value, kmp_uint64 checker)
template<typename UT >
static kmp_uint32 __kmp_lt (UT value, UT checker)
kmp_uint32 __kmp_lt_4 (kmp_uint32 value, kmp_uint32 checker)
kmp_uint32 __kmp_lt_8 (kmp_uint64 value, kmp_uint64 checker)
template<typename UT >
static kmp_uint32 __kmp_neq (UT value, UT checker)
kmp_uint32 __kmp_neq_4 (kmp_uint32 value, kmp_uint32 checker)
kmp_uint32 __kmp_neq_8 (kmp_uint64 value, kmp_uint64 checker)
template<typename UT >
static __forceinline long double __kmp_pow (long double x, UT y)
static void __kmp_static_delay (int arg)
static void __kmp_static_yield (int arg)
template<typename UT >
static UT __kmp_wait_yield (volatile UT *spinner, UT checker, kmp_uint32(*pred)(UT, UT))
kmp_uint32 __kmp_wait_yield_4 (volatile kmp_uint32 *spinner, kmp_uint32 checker, kmp_uint32(*pred)(kmp_uint32, kmp_uint32), void *obj)
kmp_uint64 __kmp_wait_yield_8 (volatile kmp_uint64 *spinner, kmp_uint64 checker, kmp_uint32(*pred)(kmp_uint64, kmp_uint64), void *obj)
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 >
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 (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 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)



void __kmpc_dispatch_fini_4 (ident_t *loc, kmp_int32 gtid)
void __kmpc_dispatch_fini_4u (ident_t *loc, kmp_int32 gtid)
void __kmpc_dispatch_fini_8 (ident_t *loc, kmp_int32 gtid)
void __kmpc_dispatch_fini_8u (ident_t *loc, kmp_int32 gtid)
void __kmpc_dispatch_init_4 (ident_t *loc, kmp_int32 gtid, enum sched_type schedule, kmp_int32 lb, kmp_int32 ub, kmp_int32 st, kmp_int32 chunk)
void __kmpc_dispatch_init_4u (ident_t *loc, kmp_int32 gtid, enum sched_type schedule, kmp_uint32 lb, kmp_uint32 ub, kmp_int32 st, kmp_int32 chunk)
void __kmpc_dispatch_init_8 (ident_t *loc, kmp_int32 gtid, enum sched_type schedule, kmp_int64 lb, kmp_int64 ub, kmp_int64 st, kmp_int64 chunk)
void __kmpc_dispatch_init_8u (ident_t *loc, kmp_int32 gtid, enum sched_type schedule, kmp_uint64 lb, kmp_uint64 ub, kmp_int64 st, kmp_int64 chunk)
int __kmpc_dispatch_next_4 (ident_t *loc, kmp_int32 gtid, kmp_int32 *p_last, kmp_int32 *p_lb, kmp_int32 *p_ub, kmp_int32 *p_st)
int __kmpc_dispatch_next_4u (ident_t *loc, kmp_int32 gtid, kmp_int32 *p_last, kmp_uint32 *p_lb, kmp_uint32 *p_ub, kmp_int32 *p_st)
int __kmpc_dispatch_next_8 (ident_t *loc, kmp_int32 gtid, kmp_int32 *p_last, kmp_int64 *p_lb, kmp_int64 *p_ub, kmp_int64 *p_st)
int __kmpc_dispatch_next_8u (ident_t *loc, kmp_int32 gtid, kmp_int32 *p_last, kmp_uint64 *p_lb, kmp_uint64 *p_ub, kmp_int64 *p_st)

Variables

static double guided_flt_param = 0.5
static int guided_int_param = 2

Define Documentation

#define GUIDED_ANALYTICAL_WORKAROUND   (x)

Referenced by __kmp_dispatch_init().

#define OMPT_LOOP_END
Value:
if (status == 0) { \
      kmp_info_t  *this_thr        = __kmp_threads[ gtid ]; \
      kmp_team_t  *team            = this_thr -> th.th_team; \
      int  tid = __kmp_tid_from_gtid( gtid ); \
      if ((ompt_status == ompt_status_track_callback)) { \
        if (ompt_callbacks.ompt_callback(ompt_event_loop_end)) { \
          ompt_callbacks.ompt_callback(ompt_event_loop_end) \
        (team->t.ompt_team_info.parallel_id,            \
         team->t.t_implicit_task_taskdata[tid].ompt_task_info.task_id); \
        } \
      }\

Definition at line 1323 of file kmp_dispatch.cpp.

Referenced by __kmp_dispatch_next().


Function Documentation

template<typename UT >
static void __kmp_dispatch_deo ( int *  gtid_ref,
int *  cid_ref,
ident_t loc_ref 
) [inline, static]
static void __kmp_dispatch_deo_error ( int *  gtid_ref,
int *  cid_ref,
ident_t loc_ref 
) [static]
template<typename UT >
static void __kmp_dispatch_dxo ( int *  gtid_ref,
int *  cid_ref,
ident_t loc_ref 
) [inline, static]
static void __kmp_dispatch_dxo_error ( int *  gtid_ref,
int *  cid_ref,
ident_t loc_ref 
) [static]
template<typename UT >
static void __kmp_dispatch_finish ( int  gtid,
ident_t loc 
) [inline, static]
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 
) [inline, static]

Definition at line 547 of file kmp_dispatch.cpp.

Referenced by __kmp_dispatch_init().

template<typename T >
static void __kmp_dispatch_init ( ident_t loc,
int  gtid,
enum sched_type  schedule,
lb,
ub,
typename traits_t< T >::signed_t  st,
typename traits_t< T >::signed_t  chunk,
int  push_ws 
) [inline, static]
template<typename T >
static int __kmp_dispatch_next ( ident_t loc,
int  gtid,
kmp_int32 *  p_last,
T *  p_lb,
T *  p_ub,
typename traits_t< T >::signed_t *  p_st 
) [inline, static]
template<typename UT >
static kmp_uint32 __kmp_eq ( UT  value,
UT  checker 
) [inline, static]

Definition at line 329 of file kmp_dispatch.cpp.

kmp_uint32 __kmp_eq_4 ( kmp_uint32  value,
kmp_uint32  checker 
)

Definition at line 2274 of file kmp_dispatch.cpp.

kmp_uint32 __kmp_eq_8 ( kmp_uint64  value,
kmp_uint64  checker 
)

Definition at line 2293 of file kmp_dispatch.cpp.

template<typename UT >
static kmp_uint32 __kmp_ge ( UT  value,
UT  checker 
) [inline, static]

Definition at line 344 of file kmp_dispatch.cpp.

kmp_uint32 __kmp_ge_4 ( kmp_uint32  value,
kmp_uint32  checker 
)

Definition at line 2286 of file kmp_dispatch.cpp.

kmp_uint32 __kmp_ge_8 ( kmp_uint64  value,
kmp_uint64  checker 
)

Definition at line 2305 of file kmp_dispatch.cpp.

template<typename UT >
static kmp_uint32 __kmp_le ( UT  value,
UT  checker 
) [inline, static]

Definition at line 349 of file kmp_dispatch.cpp.

kmp_uint32 __kmp_le_4 ( kmp_uint32  value,
kmp_uint32  checker 
)

Definition at line 2290 of file kmp_dispatch.cpp.

kmp_uint32 __kmp_le_8 ( kmp_uint64  value,
kmp_uint64  checker 
)

Definition at line 2309 of file kmp_dispatch.cpp.

template<typename UT >
static kmp_uint32 __kmp_lt ( UT  value,
UT  checker 
) [inline, static]

Definition at line 339 of file kmp_dispatch.cpp.

kmp_uint32 __kmp_lt_4 ( kmp_uint32  value,
kmp_uint32  checker 
)

Definition at line 2282 of file kmp_dispatch.cpp.

kmp_uint32 __kmp_lt_8 ( kmp_uint64  value,
kmp_uint64  checker 
)

Definition at line 2301 of file kmp_dispatch.cpp.

template<typename UT >
static kmp_uint32 __kmp_neq ( UT  value,
UT  checker 
) [inline, static]

Definition at line 334 of file kmp_dispatch.cpp.

kmp_uint32 __kmp_neq_4 ( kmp_uint32  value,
kmp_uint32  checker 
)

Definition at line 2278 of file kmp_dispatch.cpp.

Referenced by __kmp_create_monitor().

kmp_uint32 __kmp_neq_8 ( kmp_uint64  value,
kmp_uint64  checker 
)

Definition at line 2297 of file kmp_dispatch.cpp.

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

Definition at line 526 of file kmp_dispatch.cpp.

References KMP_DEBUG_ASSERT.

static void __kmp_static_delay ( int  arg  )  [static]

Definition at line 184 of file kmp_dispatch.cpp.

References KMP_ASSERT.

static void __kmp_static_yield ( int  arg  )  [static]

Definition at line 194 of file kmp_dispatch.cpp.

References __kmp_yield().

template<typename UT >
static UT __kmp_wait_yield ( volatile UT *  spinner,
UT  checker,
kmp_uint32(*)(UT, UT)  pred 
) [inline, static]
kmp_uint32 __kmp_wait_yield_4 ( volatile kmp_uint32 *  spinner,
kmp_uint32  checker,
kmp_uint32(*)(kmp_uint32, kmp_uint32)  pred,
void *  obj 
)
kmp_uint64 __kmp_wait_yield_8 ( volatile kmp_uint64 *  spinner,
kmp_uint64  checker,
kmp_uint32(*)(kmp_uint64, kmp_uint64)  pred,
void *  obj 
)
void __kmpc_dispatch_fini_4 ( ident_t loc,
kmp_int32  gtid 
)
Parameters:
loc Source code location
gtid Global thread id

Mark the end of a dynamic loop.

Definition at line 2238 of file kmp_dispatch.cpp.

void __kmpc_dispatch_fini_4u ( ident_t loc,
kmp_int32  gtid 
)

See __kmpc_dispatch_fini_4

Definition at line 2256 of file kmp_dispatch.cpp.

void __kmpc_dispatch_fini_8 ( ident_t loc,
kmp_int32  gtid 
)

See __kmpc_dispatch_fini_4

Definition at line 2247 of file kmp_dispatch.cpp.

void __kmpc_dispatch_fini_8u ( ident_t loc,
kmp_int32  gtid 
)

See __kmpc_dispatch_fini_4

Definition at line 2265 of file kmp_dispatch.cpp.

void __kmpc_dispatch_init_4u ( ident_t loc,
kmp_int32  gtid,
enum sched_type  schedule,
kmp_uint32  lb,
kmp_uint32  ub,
kmp_int32  st,
kmp_int32  chunk 
)

See __kmpc_dispatch_init_4

Definition at line 2151 of file kmp_dispatch.cpp.

References __kmp_init_serial, and KMP_DEBUG_ASSERT.

void __kmpc_dispatch_init_8 ( ident_t loc,
kmp_int32  gtid,
enum sched_type  schedule,
kmp_int64  lb,
kmp_int64  ub,
kmp_int64  st,
kmp_int64  chunk 
)

See __kmpc_dispatch_init_4

Definition at line 2162 of file kmp_dispatch.cpp.

References __kmp_init_serial, and KMP_DEBUG_ASSERT.

void __kmpc_dispatch_init_8u ( ident_t loc,
kmp_int32  gtid,
enum sched_type  schedule,
kmp_uint64  lb,
kmp_uint64  ub,
kmp_int64  st,
kmp_int64  chunk 
)

See __kmpc_dispatch_init_4

Definition at line 2174 of file kmp_dispatch.cpp.

References __kmp_init_serial, and KMP_DEBUG_ASSERT.

int __kmpc_dispatch_next_4 ( ident_t loc,
kmp_int32  gtid,
kmp_int32 *  p_last,
kmp_int32 *  p_lb,
kmp_int32 *  p_ub,
kmp_int32 *  p_st 
)
Parameters:
loc Source code location
gtid Global thread id
p_last Pointer to a flag set to one if this is the last chunk or zero otherwise
p_lb Pointer to the lower bound for the next chunk of work
p_ub Pointer to the upper bound for the next chunk of work
p_st Pointer to the stride for the next chunk of work
Returns:
one if there is work to be done, zero otherwise

Get the next dynamically allocated chunk of work for this thread. If there is no more work, then the lb,ub and stride need not be modified.

Definition at line 2195 of file kmp_dispatch.cpp.

int __kmpc_dispatch_next_4u ( ident_t loc,
kmp_int32  gtid,
kmp_int32 *  p_last,
kmp_uint32 *  p_lb,
kmp_uint32 *  p_ub,
kmp_int32 *  p_st 
)

See __kmpc_dispatch_next_4

Definition at line 2205 of file kmp_dispatch.cpp.

int __kmpc_dispatch_next_8 ( ident_t loc,
kmp_int32  gtid,
kmp_int32 *  p_last,
kmp_int64 *  p_lb,
kmp_int64 *  p_ub,
kmp_int64 *  p_st 
)

See __kmpc_dispatch_next_4

Definition at line 2215 of file kmp_dispatch.cpp.

int __kmpc_dispatch_next_8u ( ident_t loc,
kmp_int32  gtid,
kmp_int32 *  p_last,
kmp_uint64 *  p_lb,
kmp_uint64 *  p_ub,
kmp_int64 *  p_st 
)

See __kmpc_dispatch_next_4

Definition at line 2225 of file kmp_dispatch.cpp.

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

Definition at line 273 of file kmp_dispatch.cpp.

template<>
__forceinline kmp_int32 compare_and_swap< kmp_int32 > ( volatile kmp_int32 *  p,
kmp_int32  c,
kmp_int32  s 
) [inline]

Definition at line 273 of file kmp_dispatch.cpp.

References KMP_ASSERT.

template<>
__forceinline kmp_int32 compare_and_swap< kmp_int64 > ( volatile kmp_int64 *  p,
kmp_int64  c,
kmp_int64  s 
) [inline]
template<typename T >
static __forceinline T test_then_add ( volatile T *  p,
d 
) [inline, static]

Definition at line 204 of file kmp_dispatch.cpp.

template<>
__forceinline kmp_int32 test_then_add< kmp_int32 > ( volatile kmp_int32 *  p,
kmp_int32  d 
) [inline]

Definition at line 204 of file kmp_dispatch.cpp.

References KMP_ASSERT.

template<>
__forceinline kmp_int64 test_then_add< kmp_int64 > ( volatile kmp_int64 *  p,
kmp_int64  d 
) [inline]
template<typename T >
static __forceinline T test_then_inc ( volatile T *  p  )  [inline, static]

Definition at line 250 of file kmp_dispatch.cpp.

template<>
__forceinline kmp_int32 test_then_inc< kmp_int32 > ( volatile kmp_int32 *  p  )  [inline]

Definition at line 250 of file kmp_dispatch.cpp.

References KMP_ASSERT.

template<>
__forceinline kmp_int64 test_then_inc< kmp_int64 > ( volatile kmp_int64 *  p  )  [inline]
template<typename T >
static __forceinline T test_then_inc_acq ( volatile T *  p  )  [inline, static]

Definition at line 227 of file kmp_dispatch.cpp.

template<>
__forceinline kmp_int32 test_then_inc_acq< kmp_int32 > ( volatile kmp_int32 *  p  )  [inline]

Definition at line 227 of file kmp_dispatch.cpp.

References KMP_ASSERT.

template<>
__forceinline kmp_int64 test_then_inc_acq< kmp_int64 > ( volatile kmp_int64 *  p  )  [inline]

Variable Documentation

double guided_flt_param = 0.5 [static]

Definition at line 574 of file kmp_dispatch.cpp.

int guided_int_param = 2 [static]

Definition at line 573 of file kmp_dispatch.cpp.


Generated on 25 Aug 2013 for libomp_oss by  doxygen 1.6.1