@@ -28,10 +28,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
28
28
#ifndef LIBCAF_H
29
29
#define LIBCAF_H
30
30
31
- #include <stddef.h> /* For size_t. */
31
+ #include <stddef.h> /* For size_t. */
32
32
#include <stdbool.h>
33
33
34
- #include "libcaf-version-def.h"
34
+ #include "libcaf-version-def.h"
35
35
#include "libcaf-gfortran-descriptor.h"
36
36
37
37
#include <mpi.h>
@@ -56,11 +56,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
56
56
57
57
/* Definitions of the Fortran 2008 standard; need to kept in sync with
58
58
ISO_FORTRAN_ENV, cf. libgfortran.h. */
59
- #define STAT_UNLOCKED 0
60
- #define STAT_LOCKED 1
61
- #define STAT_LOCKED_OTHER_IMAGE 2
59
+ #define STAT_UNLOCKED 0
60
+ #define STAT_LOCKED 1
61
+ #define STAT_LOCKED_OTHER_IMAGE 2
62
62
#define STAT_DUP_SYNC_IMAGES 3
63
- #define STAT_STOPPED_IMAGE 6000
63
+ #define STAT_STOPPED_IMAGE 6000
64
64
#define STAT_FAILED_IMAGE 6001
65
65
66
66
/* Describes what type of array we are registerring. Keep in sync with
@@ -95,14 +95,12 @@ typedef struct caf_teams_list {
95
95
caf_team_t team ;
96
96
int team_id ;
97
97
struct caf_teams_list * prev ;
98
- }
99
- caf_teams_list ;
98
+ } caf_teams_list ;
100
99
101
100
typedef struct caf_used_teams_list {
102
101
struct caf_teams_list * team_list_elem ;
103
102
struct caf_used_teams_list * prev ;
104
- }
105
- caf_used_teams_list ;
103
+ } caf_used_teams_list ;
106
104
107
105
108
106
/* When there is a vector subscript in this dimension, nvec == 0, otherwise,
@@ -119,8 +117,7 @@ typedef struct caf_vector_t {
119
117
ptrdiff_t lower_bound , upper_bound , stride ;
120
118
} triplet ;
121
119
} u ;
122
- }
123
- caf_vector_t ;
120
+ } caf_vector_t ;
124
121
125
122
126
123
#ifdef GCC_GE_7
@@ -174,30 +171,30 @@ typedef struct caf_reference_t {
174
171
/* The offset (in bytes) of the component in the derived type. */
175
172
ptrdiff_t offset ;
176
173
/* The offset (in bytes) to the caf_token associated with this
177
- component. NULL, when not allocatable/pointer ref. */
174
+ component. NULL, when not allocatable/pointer ref. */
178
175
ptrdiff_t caf_token_offset ;
179
176
} c ;
180
177
struct {
181
178
/* The mode of the array ref. See CAF_ARR_REF_*. */
182
179
/* caf_array_ref_t, replaced by unsigend char to allow specification in
183
- fortran FE. */
180
+ fortran FE. */
184
181
unsigned char mode [GFC_MAX_DIMENSIONS ];
185
182
/* The type of a static array. Unset for array's with descriptors. */
186
183
int static_array_type ;
187
184
/* Subscript refs (s) or vector refs (v). */
188
185
union {
189
- struct {
190
- /* The start and end boundary of the ref and the stride. */
191
- ptrdiff_t start , end , stride ;
192
- } s ;
193
- struct {
194
- /* nvec entries of kind giving the elements to reference. */
195
- void * vector ;
196
- /* The number of entries in vector. */
197
- size_t nvec ;
198
- /* The integer kind used for the elements in vector. */
199
- int kind ;
200
- } v ;
186
+ struct {
187
+ /* The start and end boundary of the ref and the stride. */
188
+ ptrdiff_t start , end , stride ;
189
+ } s ;
190
+ struct {
191
+ /* nvec entries of kind giving the elements to reference. */
192
+ void * vector ;
193
+ /* The number of entries in vector. */
194
+ size_t nvec ;
195
+ /* The integer kind used for the elements in vector. */
196
+ int kind ;
197
+ } v ;
201
198
} dim [GFC_MAX_DIMENSIONS ];
202
199
} a ;
203
200
} u ;
@@ -235,7 +232,7 @@ int PREFIX (num_images) (int, int);
235
232
236
233
#ifdef GCC_GE_7
237
234
void PREFIX (register) (size_t , caf_register_t , caf_token_t * ,
238
- gfc_descriptor_t * , int * , char * , charlen_t );
235
+ gfc_descriptor_t * , int * , char * , charlen_t );
239
236
void PREFIX (deregister ) (caf_token_t * , int , int * , char * , charlen_t );
240
237
#else
241
238
void * PREFIX (register) (size_t , caf_register_t , caf_token_t * , int * , char * ,
@@ -293,17 +290,18 @@ void PREFIX (co_broadcast) (gfc_descriptor_t *, int, int *, char *, charlen_t);
293
290
void PREFIX (co_max ) (gfc_descriptor_t * , int , int * , char * , int , charlen_t );
294
291
void PREFIX (co_min ) (gfc_descriptor_t * , int , int * , char * , int , charlen_t );
295
292
void PREFIX (co_reduce ) (gfc_descriptor_t * , void * (* opr ) (void * , void * ),
296
- int , int , int * , char * , int , charlen_t );
293
+ int , int , int * , char * , int , charlen_t );
297
294
void PREFIX (co_sum ) (gfc_descriptor_t * , int , int * , char * , charlen_t );
298
295
299
296
void PREFIX (sync_all ) (int * , char * , charlen_t );
300
297
void PREFIX (sync_images ) (int , int [], int * , char * , charlen_t );
301
298
void PREFIX (sync_memory ) (int * , char * , charlen_t );
302
299
303
- void PREFIX (stop_str ) (const char * , charlen_t QUIETARG ) __attribute__ ((noreturn ));
300
+ void PREFIX (stop_str ) (const char * , charlen_t QUIETARG )
301
+ __attribute__ ((noreturn ));
304
302
void PREFIX (stop ) (int QUIETARG ) __attribute__ ((noreturn ));
305
303
void PREFIX (error_stop_str ) (const char * , charlen_t QUIETARG )
306
- __attribute__ ((noreturn ));
304
+ __attribute__ ((noreturn ));
307
305
void PREFIX (error_stop ) (int QUIETARG ) __attribute__ ((noreturn ));
308
306
309
307
void PREFIX (fail_image ) (void ) __attribute__ ((noreturn ));
@@ -321,9 +319,9 @@ void PREFIX (stopped_images) (gfc_descriptor_t *, int, int *);
321
319
void PREFIX (atomic_define ) (caf_token_t , size_t , int , void * , int * , int , int );
322
320
void PREFIX (atomic_ref ) (caf_token_t , size_t , int , void * , int * , int , int );
323
321
void PREFIX (atomic_cas ) (caf_token_t , size_t , int , void * , void * ,
324
- void * , int * , int , int );
322
+ void * , int * , int , int );
325
323
void PREFIX (atomic_op ) (int , caf_token_t , size_t , int , void * , void * ,
326
- int * , int , int );
324
+ int * , int , int );
327
325
328
326
void PREFIX (lock ) (caf_token_t , size_t , int , int * , int * , char * , charlen_t );
329
327
void PREFIX (unlock ) (caf_token_t , size_t , int , int * , char * , charlen_t );
0 commit comments