{
KMP_COUNT_BLOCK(OMP_BARRIER);
KMP_TIME_BLOCK(OMP_barrier);
- int explicit_barrier_flag;
KC_TRACE( 10, ("__kmpc_barrier: called T#%d\n", global_tid ) );
if (! TCR_4(__kmp_init_parallel))
#define MIN_STACK 100
-static char const * cons_text_fort[] = {
- "(none)",
- "PARALLEL",
- "work-sharing", /* this is not called DO because of lowering of SECTIONS and WORKSHARE directives */
- "ORDERED work-sharing", /* this is not called DO ORDERED because of lowering of SECTIONS directives */
- "SECTIONS",
- "work-sharing", /* this is not called SINGLE because of lowering of SECTIONS and WORKSHARE directives */
- "TASKQ",
- "TASKQ",
- "TASKQ ORDERED",
- "CRITICAL",
- "ORDERED", /* in PARALLEL */
- "ORDERED", /* in PDO */
- "ORDERED", /* in TASKQ */
- "MASTER",
- "REDUCE",
- "BARRIER"
-};
static char const * cons_text_c[] = {
"(none)",
cons_text_c[ (p)->stack_data[ tos ].type ], \
get_src( (p)->stack_data[ tos ].ident )
-static int const cons_text_fort_num = sizeof( cons_text_fort ) / sizeof( char const * );
static int const cons_text_c_num = sizeof( cons_text_c ) / sizeof( char const * );
/* ------------------------------------------------------------------------ */
xexpand(KMP_API_NAME_GOMP_SINGLE_COPY_END)(void *data)
{
int gtid = __kmp_get_gtid();
- MKLOC(loc, "GOMP_single_copy_end");
KA_TRACE(20, ("GOMP_single_copy_end: T#%d\n", gtid));
//
long lb, long ub, long str, long chunk_sz) \
{ \
int gtid = __kmp_entry_gtid(); \
- int last = FALSE; \
MKLOC(loc, #func); \
KA_TRACE(20, ( #func ": T#%d, lb 0x%lx, ub 0x%lx, str 0x%lx, chunk_sz 0x%lx\n", \
gtid, lb, ub, str, chunk_sz )); \
unsigned num_threads, unsigned count)
{
int gtid = __kmp_entry_gtid();
- int last = FALSE;
#if OMPT_SUPPORT
ompt_frame_t *parent_frame;
unsigned num_threads, unsigned count, unsigned flags)
{
int gtid = __kmp_entry_gtid();
- int last = FALSE;
MKLOC(loc, "GOMP_parallel_sections");
KA_TRACE(20, ("GOMP_parallel_sections: T#%d\n", gtid));
long lb, long ub, long str, long chunk_sz, unsigned flags) \
{ \
int gtid = __kmp_entry_gtid(); \
- int last = FALSE; \
MKLOC(loc, #func); \
KA_TRACE(20, ( #func ": T#%d, lb 0x%lx, ub 0x%lx, str 0x%lx, chunk_sz 0x%lx\n", \
gtid, lb, ub, str, chunk_sz )); \
if ( __kmp_user_lock_table.used >= __kmp_user_lock_table.allocated ) {
kmp_lock_index_t size;
kmp_user_lock_p *table;
- kmp_lock_index_t i;
// Reallocate lock table.
if ( __kmp_user_lock_table.allocated == 0 ) {
size = 1024;
void
__kmp_user_lock_free( void **user_lock, kmp_int32 gtid, kmp_user_lock_p lck )
{
- kmp_lock_pool_t * lock_pool;
-
KMP_DEBUG_ASSERT( user_lock != NULL );
KMP_DEBUG_ASSERT( lck != NULL );
}
#ifdef BUILD_PARALLEL_ORDERED
if( !team->t.t_serialized ) {
- kmp_uint32 spins;
-
KMP_MB();
KMP_WAIT_YIELD(&team->t.t_ordered.dt.t_value, __kmp_tid_from_gtid( gtid ), KMP_EQ, NULL);
KMP_MB();
/* this serial team was already used
* TODO increase performance by making this locks more specific */
kmp_team_t *new_team;
- int tid = this_thr->th.th_info.ds.ds_tid;
__kmp_acquire_bootstrap_lock( &__kmp_forkjoin_lock );
{
kmp_info_t *thread;
enum sched_type th_type;
- int i;
KF_TRACE( 10, ("__kmp_get_schedule: thread %d\n", gtid ));
KMP_DEBUG_ASSERT( __kmp_init_serial );
int f;
kmp_team_t *root_team;
kmp_team_t *hot_team;
- size_t disp_size, dispatch_size, bar_size;
int hot_team_max_nth;
kmp_r_sched_t r_sched = __kmp_get_schedule_global(); // get current state of scheduling globals
kmp_internal_control_t r_icvs = __kmp_get_global_icvs();
KMP_TIME_BLOCK(KMP_allocate_team);
int f;
kmp_team_t *team;
- char *ptr;
- size_t size;
int use_hot_team = ! root->r.r_active;
int level = 0;
void
__kmp_internal_end_library( int gtid_req )
{
- int i;
-
/* if we have already cleaned up, don't try again, it wouldn't be pretty */
/* this shouldn't be a race condition because __kmp_internal_end() is the
* only place to clear __kmp_serial_init */
__kmp_stg_print_force_reduction( kmp_str_buf_t * buffer, char const * name, void * data ) {
kmp_stg_fr_data_t * reduction = (kmp_stg_fr_data_t *) data;
- char const * value = NULL;
if ( reduction->force ) {
if( __kmp_force_reduction_method == critical_reduce_block) {
__kmp_stg_print_str( buffer, name, "critical");
int max_badness = 0;
const char *next = value;
- const char *scan = next;
int total = 0; // Count elements that were set. It'll be used as an array size
int prev_comma = FALSE; // For correct processing sequential commas
__kmp_env_print_2() {
kmp_env_blk_t block;
- int i;
kmp_str_buf_t buffer;
__kmp_env_format = 1;
char const * names[] = { "", "k", "M", "G", "T", "P", "E", "Z", "Y" };
int const units = sizeof( names ) / sizeof( char const * );
int u = 0;
- int rc;
if ( size > 0 ) {
while ( ( size % 1024 == 0 ) && ( u + 1 < units ) ) {
size = size / 1024;
size_t value = 0;
size_t factor = 0;
int overflow = 0;
- int bad_unit = 0;
int i = 0;
int digit;
kmp_task_t * task;
kmp_taskdata_t * taskdata;
kmp_thread_data_t *victim_td, *threads_data;
- kmp_int32 victim_tid, thread_tid;
+ kmp_int32 victim_tid;
KMP_DEBUG_ASSERT( __kmp_tasking_mode != tskm_immediate_exec );
USE_ITT_BUILD_ARG(void * itt_sync_obj), kmp_int32 is_constrained)
{
kmp_task_team_t * task_team;
- kmp_team_t * team;
kmp_thread_data_t * threads_data;
kmp_task_t * task;
kmp_taskdata_t * current_task = thread -> th.th_current_task;
{
int gtid = *gtid_ref;
int tid = __kmp_tid_from_gtid( gtid );
- kmp_uint32 spins;
kmp_uint32 my_token;
kmpc_task_queue_t *taskq;
kmp_taskq_t *tq = & __kmp_threads[gtid] -> th.th_team -> t.t_taskq;
static void
__kmp_taskq_check_ordered( kmp_int32 gtid, kmpc_thunk_t *thunk )
{
- kmp_uint32 spins;
kmp_uint32 my_token;
kmpc_task_queue_t *taskq;
queue->tq_next_child = NULL;
if (in_parallel) {
- kmp_uint32 spins;
-
KMP_DEBUG_REF_CTS(("line %d gtid %d: Q %p waiting for ref_count of %d to reach 1\n",
__LINE__, global_tid, queue, queue->tq_ref_count));
/* master thread only executes this code */
if( tq->tq_curr_thunk_capacity < nproc ) {
- int i;
-
if(tq->tq_curr_thunk)
__kmp_free(tq->tq_curr_thunk);
else {
{
unsigned current_bit;
int bits_seen;
- unsigned mask;
if (log_per_phy <= 1) return ( 0 );
void *padding = 0;
#endif
int gtid;
- int error;
gtid = ((kmp_info_t*)thr) -> th.th_info.ds.ds_gtid;
__kmp_gtid_set_specific( gtid );
struct timespec interval;
int yield_count;
int yield_cycles = 0;
- int error;
KMP_MB(); /* Flush all pending memory write invalidates. */
void
__kmp_reap_monitor( kmp_info_t *th )
{
- int status, i;
+ int status;
void *exit_val;
KA_TRACE( 10, ("__kmp_reap_monitor: try to reap monitor thread with handle %#.8lx\n",