#include "libgomp.h"
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for work.c:
Go to the source code of this file.
Defines | |
#define | INLINE_ORDERED_TEAM_IDS_CNT |
Functions | |
static struct gomp_work_share * | alloc_work_share (struct gomp_team *team) |
void | gomp_init_work_share (struct gomp_work_share *ws, bool ordered, unsigned nthreads) |
void | gomp_fini_work_share (struct gomp_work_share *ws) |
static void | free_work_share (struct gomp_team *team, struct gomp_work_share *ws) |
bool | gomp_work_share_start (bool ordered) |
void | gomp_work_share_end (void) |
void | gomp_work_share_end_nowait (void) |
#define INLINE_ORDERED_TEAM_IDS_CNT |
Value:
((sizeof (struct gomp_work_share) \ - offsetof (struct gomp_work_share, inline_ordered_team_ids)) \ / sizeof (((struct gomp_work_share *) 0)->inline_ordered_team_ids[0]))
Referenced by gomp_init_work_share().
static struct gomp_work_share* alloc_work_share | ( | struct gomp_team * | team | ) | [static] |
Definition at line 38 of file work.c.
References gomp_malloc(), gomp_mutex_lock(), gomp_mutex_unlock(), i, next, gomp_work_share::next_alloc, gomp_work_share::next_free, gomp_team::work_share_chunk, gomp_team::work_share_list_alloc, gomp_team::work_share_list_free, gomp_team::work_share_list_free_lock, and gomp_team::work_shares.
Referenced by gomp_work_share_start().
Here is the call graph for this function:
Here is the caller graph for this function:
static void free_work_share | ( | struct gomp_team * | team, | |
struct gomp_work_share * | ws | |||
) | [inline, static] |
Definition at line 136 of file work.c.
References gomp_fini_work_share(), gomp_mutex_lock(), gomp_mutex_unlock(), gomp_work_share::next_free, gomp_work_share::next_ws, gomp_team::work_share_list_free, and gomp_team::work_share_list_free_lock.
Referenced by gomp_work_share_end(), and gomp_work_share_end_nowait().
Here is the call graph for this function:
Here is the caller graph for this function:
void gomp_fini_work_share | ( | struct gomp_work_share * | ws | ) |
Definition at line 124 of file work.c.
References gomp_mutex_destroy(), gomp_ptrlock_destroy(), gomp_work_share::inline_ordered_team_ids, gomp_work_share::next_ws, and gomp_work_share::ordered_team_ids.
Referenced by free_work_share(), and gomp_team_end().
Here is the call graph for this function:
Here is the caller graph for this function:
void gomp_init_work_share | ( | struct gomp_work_share * | ws, | |
bool | ordered, | |||
unsigned | nthreads | |||
) |
Definition at line 92 of file work.c.
References gomp_malloc(), gomp_mutex_init(), gomp_ptrlock_init(), gomp_work_share::inline_ordered_team_ids, INLINE_ORDERED_TEAM_IDS_CNT, memset(), gomp_work_share::next_ws, gomp_work_share::ordered_cur, gomp_work_share::ordered_num_used, gomp_work_share::ordered_owner, gomp_work_share::ordered_team_ids, and gomp_work_share::threads_completed.
Referenced by gomp_new_team(), and gomp_work_share_start().
Here is the call graph for this function:
Here is the caller graph for this function:
void gomp_work_share_end | ( | void | ) |
Definition at line 205 of file work.c.
References gomp_team::barrier, free_work_share(), gomp_barrier_last_thread(), gomp_barrier_wait_start(), gomp_team_barrier_wait_end(), gomp_thread(), and thr.
Referenced by GOMP_loop_end(), and GOMP_sections_end().
Here is the call graph for this function:
Here is the caller graph for this function:
void gomp_work_share_end_nowait | ( | void | ) |
Definition at line 235 of file work.c.
References free_work_share(), gomp_mutex_lock(), gomp_mutex_unlock(), gomp_thread(), gomp_team::nthreads, thr, and gomp_work_share::threads_completed.
Referenced by GOMP_loop_end_nowait(), GOMP_sections_end_nowait(), GOMP_single_copy_end(), GOMP_single_copy_start(), and GOMP_single_start().
Here is the call graph for this function:
Here is the caller graph for this function:
bool gomp_work_share_start | ( | bool | ordered | ) |
Definition at line 168 of file work.c.
References alloc_work_share(), gomp_init_work_share(), gomp_malloc(), gomp_ptrlock_get(), gomp_thread(), gomp_work_share::next_ws, gomp_team::nthreads, and thr.
Referenced by gomp_loop_dynamic_start(), gomp_loop_guided_start(), gomp_loop_ordered_dynamic_start(), gomp_loop_ordered_guided_start(), gomp_loop_ordered_static_start(), gomp_loop_static_start(), gomp_loop_ull_dynamic_start(), gomp_loop_ull_guided_start(), gomp_loop_ull_ordered_dynamic_start(), gomp_loop_ull_ordered_guided_start(), gomp_loop_ull_ordered_static_start(), gomp_loop_ull_static_start(), GOMP_sections_start(), GOMP_single_copy_start(), and GOMP_single_start().
Here is the call graph for this function:
Here is the caller graph for this function: