@@ -28,10 +28,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
2828#ifndef LIBCAF_H
2929#define LIBCAF_H
3030
31- #include <stddef.h> /* For size_t. */
31+ #include <stddef.h> /* For size_t. */
3232#include <stdbool.h>
3333
34- #include "libcaf-version-def.h"
34+ #include "libcaf-version-def.h"
3535#include "libcaf-gfortran-descriptor.h"
3636
3737#include <mpi.h>
@@ -56,11 +56,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
5656
5757/* Definitions of the Fortran 2008 standard; need to kept in sync with
5858 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
6262#define STAT_DUP_SYNC_IMAGES 3
63- #define STAT_STOPPED_IMAGE 6000
63+ #define STAT_STOPPED_IMAGE 6000
6464#define STAT_FAILED_IMAGE 6001
6565
6666/* Describes what type of array we are registerring. Keep in sync with
@@ -95,14 +95,12 @@ typedef struct caf_teams_list {
9595 caf_team_t team ;
9696 int team_id ;
9797 struct caf_teams_list * prev ;
98- }
99- caf_teams_list ;
98+ } caf_teams_list ;
10099
101100typedef struct caf_used_teams_list {
102101 struct caf_teams_list * team_list_elem ;
103102 struct caf_used_teams_list * prev ;
104- }
105- caf_used_teams_list ;
103+ } caf_used_teams_list ;
106104
107105
108106/* When there is a vector subscript in this dimension, nvec == 0, otherwise,
@@ -119,8 +117,7 @@ typedef struct caf_vector_t {
119117 ptrdiff_t lower_bound , upper_bound , stride ;
120118 } triplet ;
121119 } u ;
122- }
123- caf_vector_t ;
120+ } caf_vector_t ;
124121
125122
126123#ifdef GCC_GE_7
@@ -174,30 +171,30 @@ typedef struct caf_reference_t {
174171 /* The offset (in bytes) of the component in the derived type. */
175172 ptrdiff_t offset ;
176173 /* 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. */
178175 ptrdiff_t caf_token_offset ;
179176 } c ;
180177 struct {
181178 /* The mode of the array ref. See CAF_ARR_REF_*. */
182179 /* caf_array_ref_t, replaced by unsigend char to allow specification in
183- fortran FE. */
180+ fortran FE. */
184181 unsigned char mode [GFC_MAX_DIMENSIONS ];
185182 /* The type of a static array. Unset for array's with descriptors. */
186183 int static_array_type ;
187184 /* Subscript refs (s) or vector refs (v). */
188185 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 ;
201198 } dim [GFC_MAX_DIMENSIONS ];
202199 } a ;
203200 } u ;
@@ -235,7 +232,7 @@ int PREFIX (num_images) (int, int);
235232
236233#ifdef GCC_GE_7
237234void 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 );
239236void PREFIX (deregister ) (caf_token_t * , int , int * , char * , charlen_t );
240237#else
241238void * 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);
293290void PREFIX (co_max ) (gfc_descriptor_t * , int , int * , char * , int , charlen_t );
294291void PREFIX (co_min ) (gfc_descriptor_t * , int , int * , char * , int , charlen_t );
295292void 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 );
297294void PREFIX (co_sum ) (gfc_descriptor_t * , int , int * , char * , charlen_t );
298295
299296void PREFIX (sync_all ) (int * , char * , charlen_t );
300297void PREFIX (sync_images ) (int , int [], int * , char * , charlen_t );
301298void PREFIX (sync_memory ) (int * , char * , charlen_t );
302299
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 ));
304302void PREFIX (stop ) (int QUIETARG ) __attribute__ ((noreturn ));
305303void PREFIX (error_stop_str ) (const char * , charlen_t QUIETARG )
306- __attribute__ ((noreturn ));
304+ __attribute__ ((noreturn ));
307305void PREFIX (error_stop ) (int QUIETARG ) __attribute__ ((noreturn ));
308306
309307void PREFIX (fail_image ) (void ) __attribute__ ((noreturn ));
@@ -321,9 +319,9 @@ void PREFIX (stopped_images) (gfc_descriptor_t *, int, int *);
321319void PREFIX (atomic_define ) (caf_token_t , size_t , int , void * , int * , int , int );
322320void PREFIX (atomic_ref ) (caf_token_t , size_t , int , void * , int * , int , int );
323321void PREFIX (atomic_cas ) (caf_token_t , size_t , int , void * , void * ,
324- void * , int * , int , int );
322+ void * , int * , int , int );
325323void PREFIX (atomic_op ) (int , caf_token_t , size_t , int , void * , void * ,
326- int * , int , int );
324+ int * , int , int );
327325
328326void PREFIX (lock ) (caf_token_t , size_t , int , int * , int * , char * , charlen_t );
329327void PREFIX (unlock ) (caf_token_t , size_t , int , int * , char * , charlen_t );
0 commit comments