104104 * Objects of this data structure are owned by the library and are treated as a
105105 * black box by the compiler. In the coarray-program the tokens are opaque
106106 * pointers, i.e. black boxes.
107- *
107+ *
108108 * For each coarray (allocatable|save|pointer) (scalar|array|event|lock) a
109109 * token needs to be present. */
110110typedef struct mpi_caf_token_t
@@ -129,21 +129,21 @@ typedef struct mpi_caf_token_t
129129 * component has the allocatable or pointer attribute. The token is reduced in
130130 * size, because the other data is already accessible and has been read from
131131 * the remote to fullfill the request.
132- *
132+ *
133133 * TYPE t
134134 * +------------------+
135135 * | comp * |
136136 * | comp_token * |
137137 * +------------------+
138- *
138+ *
139139 * TYPE(t) : o struct T // the mpi_caf_token to t
140140 * +----------------+
141141 * | ... |
142142 * +----------------+
143- *
143+ *
144144 * o[2]%.comp // using T to get o of [2]
145- *
146- * +-o-on-image-2----+ "copy" of the requierd parts of o[2] on current image
145+ *
146+ * +-o-on-image-2----+ "copy" of the required parts of o[2] on current image
147147 * | 0x4711 | comp * in global_dynamic_window
148148 * | 0x2424 | comp_token * of type slave_token
149149 * +-----------------+
@@ -1210,7 +1210,7 @@ PREFIX(register) (size_t size, caf_register_t type, caf_token_t *token,
12101210 mem = malloc (actual_size );
12111211 slave_token -> memptr = mem ;
12121212 ierr = MPI_Win_attach (global_dynamic_win , mem , actual_size );
1213- chk_err (ierr );
1213+ chk_err (ierr );
12141214#ifdef EXTRA_DEBUG_OUTPUT
12151215 ierr = MPI_Get_address (mem , & mpi_address ); chk_err (ierr );
12161216#endif
@@ -1941,7 +1941,7 @@ copy_char_to_self(void *src, int src_type, int src_size, int src_kind,
19411941 caf_runtime_error ("internal error: copy_char_to_self() "
19421942 "for non-char types called." );
19431943#endif
1944- const size_t
1944+ const size_t
19451945 dst_len = dst_size / dst_kind ,
19461946 src_len = src_size / src_kind ;
19471947 const size_t min_len = (src_len < dst_len ) ? src_len : dst_len ;
@@ -2022,13 +2022,13 @@ copy_to_self(gfc_descriptor_t *src, int src_kind,
20222022 ? GFC_DESCRIPTOR_SIZE (src ) : 0 , size , stat );
20232023}
20242024
2025- /* token: The token of the array to be written to.
2025+ /* token: The token of the array to be written to.
20262026 * offset: Difference between the coarray base address and the actual data,
2027- * used for caf(3)[2] = 8 or caf[4]%a(4)%b = 7.
2027+ * used for caf(3)[2] = 8 or caf[4]%a(4)%b = 7.
20282028 * image_index: Index of the coarray (typically remote,
2029- * though it can also be on this_image).
2030- * data: Pointer to the to-be-transferred data.
2031- * size: The number of bytes to be transferred.
2029+ * though it can also be on this_image).
2030+ * data: Pointer to the to-be-transferred data.
2031+ * size: The number of bytes to be transferred.
20322032 * asynchronous: Return before the data transfer has been complete */
20332033
20342034void selectType (int size , MPI_Datatype * dt )
@@ -4019,7 +4019,7 @@ do \
40194019(sizeof(gfc_descriptor_t) + (rank) * sizeof(descriptor_dimension))
40204020
40214021/* Define the descriptor of max rank.
4022- *
4022+ *
40234023 * This typedef is made to allow storing a copy of a remote descriptor on the
40244024 * stack without having to care about the rank. */
40254025typedef struct gfc_max_dim_descriptor_t
@@ -4329,7 +4329,7 @@ case kind: \
43294329 ref -> u .a .dim [src_dim ].s .stride ,
43304330 ref -> u .a .dim [src_dim ].s .start ,
43314331 ref -> u .a .dim [src_dim ].s .end );
4332- array_offset_src =
4332+ array_offset_src =
43334333 (ref -> u .a .dim [src_dim ].s .start - src -> dim [src_dim ].lower_bound )
43344334 * src -> dim [src_dim ]._stride ;
43354335 stride_src =
@@ -4588,7 +4588,7 @@ PREFIX(get_by_ref) (caf_token_t token, int image_index,
45884588 bool realloc_required , extent_mismatch = false;
45894589 /* Set when the first non-scalar array reference is encountered. */
45904590 bool in_array_ref = false, array_extent_fixed = false;
4591- /* Set when remote data is to be accessed through the
4591+ /* Set when remote data is to be accessed through the
45924592 * global dynamic window. */
45934593 bool access_data_through_global_win = false;
45944594 /* Set when the remote descriptor is to accessed through the global window. */
@@ -4751,7 +4751,7 @@ case kind: \
47514751 riter -> u .a .dim [i ].s .stride ,
47524752 riter -> u .a .dim [i ].s .start ,
47534753 riter -> u .a .dim [i ].s .end );
4754- remote_memptr +=
4754+ remote_memptr +=
47554755 (riter -> u .a .dim [i ].s .start - src -> dim [i ].lower_bound )
47564756 * src -> dim [i ]._stride * riter -> item_size ;
47574757 break ;
@@ -5531,7 +5531,7 @@ case kind: \
55315531 send_for_ref (ref , i , src_index , mpi_token , dst , src , ds , sr ,
55325532 dst_byte_offset + array_offset_dst * ref -> item_size ,
55335533 desc_byte_offset + array_offset_dst * ref -> item_size ,
5534- dst_kind , src_kind , next_dst_dim , src_dim + 1 ,
5534+ dst_kind , src_kind , next_dst_dim , src_dim + 1 ,
55355535 1 , stat , global_dynamic_win_rank , memptr_win_rank ,
55365536 ds_global , desc_global
55375537#ifdef GCC_GE_8
@@ -5877,7 +5877,7 @@ PREFIX(send_by_ref) (caf_token_t token, int image_index,
58775877 * which is taken care of in the else part. */
58785878 if (access_data_through_global_win )
58795879 {
5880- for (ref_rank = 0 ;
5880+ for (ref_rank = 0 ;
58815881 riter -> u .a .mode [ref_rank ] != CAF_ARR_REF_NONE ; ++ ref_rank ) ;
58825882 /* Get the remote descriptor and use the stack to store it
58835883 * Note, dst may be pointing to mpi_token->desc therefore it
@@ -6270,7 +6270,7 @@ PREFIX(sendget_by_ref) (caf_token_t dst_token, int dst_image_index,
62706270 /* Set when the first non-scalar array reference is encountered. */
62716271 bool in_array_ref = false;
62726272 bool array_extent_fixed = false;
6273- /* Set when remote data is to be accessed through the
6273+ /* Set when remote data is to be accessed through the
62746274 * global dynamic window. */
62756275 bool access_data_through_global_win = false;
62766276 /* Set when the remote descriptor is to accessed through the global window. */
@@ -6446,7 +6446,7 @@ case kind: \
64466446 riter -> u .a .dim [i ].s .stride ,
64476447 riter -> u .a .dim [i ].s .start ,
64486448 riter -> u .a .dim [i ].s .end );
6449- remote_memptr +=
6449+ remote_memptr +=
64506450 (riter -> u .a .dim [i ].s .start - src -> dim [i ].lower_bound )
64516451 * src -> dim [i ]._stride * riter -> item_size ;
64526452 break ;
@@ -6694,7 +6694,7 @@ PREFIX(is_present) (caf_token_t token, int image_index, caf_reference_t *refs)
66946694 break ;
66956695 case CAF_REF_ARRAY :
66966696 {
6697- const gfc_descriptor_t * src =
6697+ const gfc_descriptor_t * src =
66986698 (gfc_descriptor_t * )(mpi_token -> memptr + local_offset );
66996699 for (i = 0 ; riter -> u .a .mode [i ] != CAF_ARR_REF_NONE ; ++ i )
67006700 {
@@ -6854,7 +6854,7 @@ PREFIX(is_present) (caf_token_t token, int image_index, caf_reference_t *refs)
68546854 switch (array_ref )
68556855 {
68566856 case CAF_ARR_REF_FULL :
6857- /* The local_offset stays unchanged when ref'ing the first
6857+ /* The local_offset stays unchanged when ref'ing the first
68586858 * element in a dimension. */
68596859 break ;
68606860 case CAF_ARR_REF_SINGLE :
@@ -7173,11 +7173,11 @@ GEN_REDUCTION(do_max_int1, int8_t,
71737173#endif
71747174
71757175/*
7176- #ifndef MPI_INTEGER2
7177- GEN_REDUCTION(do_sum_int1, int16_t, inoutvec[i] += invec[i])
7176+ #ifndef MPI_INTEGER2
7177+ GEN_REDUCTION(do_sum_int1, int16_t, inoutvec[i] += invec[i])
71787178GEN_REDUCTION(do_min_int1, int16_t,
7179- inoutvec[i] = (invec[i] >= inoutvec[i] ? inoutvec[i] : invec[i]))
7180- GEN_REDUCTION(do_max_int1, int16_t,
7179+ inoutvec[i] = (invec[i] >= inoutvec[i] ? inoutvec[i] : invec[i]))
7180+ GEN_REDUCTION(do_max_int1, int16_t,
71817181 inoutvec[i] = (invec[i] <= inoutvec[i] ? inoutvec[i] : invec[i]))
71827182#endif
71837183*/
@@ -7684,7 +7684,7 @@ PREFIX(atomic_ref) (caf_token_t token, size_t offset,
76847684{
76857685 MPI_Win * p = TOKEN (token );
76867686 MPI_Datatype dt ;
7687- int ierr = 0 ,
7687+ int ierr = 0 ,
76887688 image = (image_index != 0 ) ? image_index - 1 : caf_this_image - 1 ;
76897689
76907690 selectType (kind , & dt );
@@ -7808,7 +7808,7 @@ PREFIX(event_post) (caf_token_t token, size_t index, int image_index,
78087808
78097809#if MPI_VERSION >= 3
78107810 CAF_Win_lock (MPI_LOCK_EXCLUSIVE , image , * p );
7811- ierr = MPI_Accumulate (& value , 1 , MPI_INT , image , index * sizeof (int ), 1 ,
7811+ ierr = MPI_Accumulate (& value , 1 , MPI_INT , image , index * sizeof (int ), 1 ,
78127812 MPI_INT , MPI_SUM , * p ); chk_err (ierr );
78137813 CAF_Win_unlock (image , * p );
78147814#else // MPI_VERSION
@@ -8272,19 +8272,19 @@ void PREFIX(change_team) (caf_team_t *team,
82728272 tmp_used = (caf_used_teams_list * )calloc (1 ,sizeof (caf_used_teams_list ));
82738273 tmp_used -> prev = used_teams ;
82748274
8275- /* We need to look in the teams_list and find the appropriate element.
8276- * This is not efficient but can be easily fixed in the future.
8277- * Instead of keeping track of the communicator in the compiler
8278- * we should keep track of the caf_teams_list element associated with it. */
8275+ /* We need to look in the teams_list and find the appropriate element.
8276+ * This is not efficient but can be easily fixed in the future.
8277+ * Instead of keeping track of the communicator in the compiler
8278+ * we should keep track of the caf_teams_list element associated with it. */
82798279
82808280 /*
8281- tmp_list = teams_list;
8281+ tmp_list = teams_list;
82828282
8283- while (tmp_list)
8284- {
8285- if (tmp_list->team == tmp_team)
8286- break;
8287- tmp_list = tmp_list->prev;
8283+ while (tmp_list)
8284+ {
8285+ if (tmp_list->team == tmp_team)
8286+ break;
8287+ tmp_list = tmp_list->prev;
82888288 }
82898289 */
82908290
0 commit comments