1/* 2 * Copyright (c) 2014 ETH Zurich. 3 * All rights reserved. 4 * 5 * This file is distributed under the terms in the attached LICENSE file. 6 * If you do not find this file, copies can be found by writing to: 7 * ETH Zurich D-INFK, Universitaetsstrasse 64, CH-8092 Zurich. Attn: Systems Group. 8 */ 9 10#ifndef __BOMP_TEAM_H 11#define __BOMP_TEAM_H 12 13/* 14 * A set of one or more threads participating in the execution of a parallel 15 * region. 16 * 17 * The thread that encounters a parallel construct, creates a team, generates a 18 * set of implicit tasks, then executes one of those tasks as thread number 0. 19 * 20 * For an active parallel region, the team comprises the master thread and at 21 * least one additional thread. 22 * 23 * For an inactive parallel region, the team comprises only the master thread. 24 */ 25 26struct bomp_team 27{ 28 void *barrier; 29}; 30 31struct bomp_team_state 32{ 33 34}; 35 36struct gomp_team_state 37{ 38 /* This is the team of which the thread is currently a member. */ 39 struct gomp_team *team; 40 41 /* This is the work share construct which this thread is currently 42 processing. Recall that with NOWAIT, not all threads may be 43 processing the same construct. */ 44 struct gomp_work_share *work_share; 45 46 /* This is the previous work share construct or NULL if there wasn't any. 47 When all threads are done with the current work sharing construct, 48 the previous one can be freed. The current one can't, as its 49 next_ws field is used. */ 50 struct gomp_work_share *last_work_share; 51 52 /* This is the ID of this thread within the team. This value is 53 guaranteed to be between 0 and N-1, where N is the number of 54 threads in the team. */ 55 unsigned team_id; 56 57 /* Nesting level. */ 58 unsigned level; 59 60 /* Active nesting level. Only active parallel regions are counted. */ 61 unsigned active_level; 62 63 /* Place-partition-var, offset and length into gomp_places_list array. */ 64 unsigned place_partition_off; 65 unsigned place_partition_len; 66 67#ifdef HAVE_SYNC_BUILTINS 68 /* Number of single stmts encountered. */ 69 unsigned long single_count; 70#endif 71 72 /* For GFS_RUNTIME loops that resolved to GFS_STATIC, this is the 73 trip number through the loop. So first time a particular loop 74 is encountered this number is 0, the second time through the loop 75 is 1, etc. This is unused when the compiler knows in advance that 76 the loop is statically scheduled. */ 77 unsigned long static_trip; 78}; 79 80#endif /* __BOMP_TEAM_H */ 81