@@ -65,6 +65,17 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
65
65
#define STAT_STOPPED_IMAGE 6000
66
66
#define STAT_FAILED_IMAGE 6001
67
67
68
+ #ifdef GCC_GE_15
69
+ /* Definitions of the Fortran 2018 standard; need to kept in sync with
70
+ ISO_FORTRAN_ENV, cf. gcc/fortran/libgfortran.h. */
71
+ typedef enum
72
+ {
73
+ CAF_INITIAL_TEAM = 0 ,
74
+ CAF_PARENT_TEAM ,
75
+ CAF_CURRENT_TEAM
76
+ } caf_team_level_t ;
77
+ #endif
78
+
68
79
/* Describes what type of array we are registerring. Keep in sync with
69
80
gcc/fortran/trans.h. */
70
81
typedef enum caf_register_t
@@ -88,24 +99,12 @@ typedef enum caf_deregister_t
88
99
CAF_DEREGTYPE_COARRAY_DEALLOCATE_ONLY
89
100
} caf_deregister_t ;
90
101
102
+ /** The opaque type to represent a coarray token. */
91
103
typedef void * caf_token_t ;
92
- /** Add a dummy type representing teams in coarrays. */
93
104
105
+ /** The opaque type for teams. */
94
106
typedef void * caf_team_t ;
95
107
96
- typedef struct caf_teams_list
97
- {
98
- caf_team_t team ;
99
- int team_id ;
100
- struct caf_teams_list * prev ;
101
- } caf_teams_list ;
102
-
103
- typedef struct caf_used_teams_list
104
- {
105
- struct caf_teams_list * team_list_elem ;
106
- struct caf_used_teams_list * prev ;
107
- } caf_used_teams_list ;
108
-
109
108
/* When there is a vector subscript in this dimension, nvec == 0, otherwise,
110
109
lower_bound, upper_bound, stride contains the bounds relative to the declared
111
110
bounds; kind denotes the integer kind of the elements of vector[]. */
@@ -238,8 +237,15 @@ bool PREFIX(is_contiguous)(gfc_descriptor_t *);
238
237
void PREFIX (init )(int * , char * * * );
239
238
void PREFIX (finalize )(void );
240
239
240
+ #ifdef GCC_GE_15
241
+ int PREFIX (this_image )(caf_team_t );
242
+
243
+ int PREFIX (num_images )(caf_team_t , int32_t * );
244
+ #else
241
245
int PREFIX (this_image )(int );
246
+
242
247
int PREFIX (num_images )(int , int );
248
+ #endif
243
249
244
250
#ifdef GCC_GE_7
245
251
void PREFIX (register)(size_t , caf_register_t , caf_token_t * , gfc_descriptor_t * ,
@@ -359,11 +365,20 @@ void PREFIX(error_stop)(int QUIETARG) __attribute__((noreturn));
359
365
360
366
void PREFIX (fail_image )(void ) __attribute__((noreturn ));
361
367
368
+ #ifdef GCC_GE_15
369
+ void PREFIX (form_team )(int , caf_team_t * , int * , int * , char * , charlen_t );
370
+ void PREFIX (change_team )(caf_team_t , int * , char * , charlen_t );
371
+ void PREFIX (end_team )(int * , char * , charlen_t );
372
+ void PREFIX (sync_team )(caf_team_t , int * , char * , charlen_t );
373
+ int PREFIX (team_number )(caf_team_t );
374
+ caf_team_t PREFIX (get_team )(int32_t * );
375
+ #else
362
376
void PREFIX (form_team )(int , caf_team_t * , int );
363
377
void PREFIX (change_team )(caf_team_t * , int );
364
378
void PREFIX (end_team )(caf_team_t * );
365
379
void PREFIX (sync_team )(caf_team_t * , int );
366
380
int PREFIX (team_number )(caf_team_t * );
381
+ #endif
367
382
368
383
int PREFIX (image_status )(int );
369
384
void PREFIX (failed_images )(gfc_descriptor_t * , int , int * );
0 commit comments