104
104
* Objects of this data structure are owned by the library and are treated as a
105
105
* black box by the compiler. In the coarray-program the tokens are opaque
106
106
* pointers, i.e. black boxes.
107
- *
107
+ *
108
108
* For each coarray (allocatable|save|pointer) (scalar|array|event|lock) a
109
109
* token needs to be present. */
110
110
typedef struct mpi_caf_token_t
@@ -129,21 +129,21 @@ typedef struct mpi_caf_token_t
129
129
* component has the allocatable or pointer attribute. The token is reduced in
130
130
* size, because the other data is already accessible and has been read from
131
131
* the remote to fullfill the request.
132
- *
132
+ *
133
133
* TYPE t
134
134
* +------------------+
135
135
* | comp * |
136
136
* | comp_token * |
137
137
* +------------------+
138
- *
138
+ *
139
139
* TYPE(t) : o struct T // the mpi_caf_token to t
140
140
* +----------------+
141
141
* | ... |
142
142
* +----------------+
143
- *
143
+ *
144
144
* 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
147
147
* | 0x4711 | comp * in global_dynamic_window
148
148
* | 0x2424 | comp_token * of type slave_token
149
149
* +-----------------+
@@ -1210,7 +1210,7 @@ PREFIX(register) (size_t size, caf_register_t type, caf_token_t *token,
1210
1210
mem = malloc (actual_size );
1211
1211
slave_token -> memptr = mem ;
1212
1212
ierr = MPI_Win_attach (global_dynamic_win , mem , actual_size );
1213
- chk_err (ierr );
1213
+ chk_err (ierr );
1214
1214
#ifdef EXTRA_DEBUG_OUTPUT
1215
1215
ierr = MPI_Get_address (mem , & mpi_address ); chk_err (ierr );
1216
1216
#endif
@@ -1941,7 +1941,7 @@ copy_char_to_self(void *src, int src_type, int src_size, int src_kind,
1941
1941
caf_runtime_error ("internal error: copy_char_to_self() "
1942
1942
"for non-char types called." );
1943
1943
#endif
1944
- const size_t
1944
+ const size_t
1945
1945
dst_len = dst_size / dst_kind ,
1946
1946
src_len = src_size / src_kind ;
1947
1947
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,
2022
2022
? GFC_DESCRIPTOR_SIZE (src ) : 0 , size , stat );
2023
2023
}
2024
2024
2025
- /* token: The token of the array to be written to.
2025
+ /* token: The token of the array to be written to.
2026
2026
* 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.
2028
2028
* 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.
2032
2032
* asynchronous: Return before the data transfer has been complete */
2033
2033
2034
2034
void selectType (int size , MPI_Datatype * dt )
@@ -4019,7 +4019,7 @@ do \
4019
4019
(sizeof(gfc_descriptor_t) + (rank) * sizeof(descriptor_dimension))
4020
4020
4021
4021
/* Define the descriptor of max rank.
4022
- *
4022
+ *
4023
4023
* This typedef is made to allow storing a copy of a remote descriptor on the
4024
4024
* stack without having to care about the rank. */
4025
4025
typedef struct gfc_max_dim_descriptor_t
@@ -4329,7 +4329,7 @@ case kind: \
4329
4329
ref -> u .a .dim [src_dim ].s .stride ,
4330
4330
ref -> u .a .dim [src_dim ].s .start ,
4331
4331
ref -> u .a .dim [src_dim ].s .end );
4332
- array_offset_src =
4332
+ array_offset_src =
4333
4333
(ref -> u .a .dim [src_dim ].s .start - src -> dim [src_dim ].lower_bound )
4334
4334
* src -> dim [src_dim ]._stride ;
4335
4335
stride_src =
@@ -4588,7 +4588,7 @@ PREFIX(get_by_ref) (caf_token_t token, int image_index,
4588
4588
bool realloc_required , extent_mismatch = false;
4589
4589
/* Set when the first non-scalar array reference is encountered. */
4590
4590
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
4592
4592
* global dynamic window. */
4593
4593
bool access_data_through_global_win = false;
4594
4594
/* Set when the remote descriptor is to accessed through the global window. */
@@ -4751,7 +4751,7 @@ case kind: \
4751
4751
riter -> u .a .dim [i ].s .stride ,
4752
4752
riter -> u .a .dim [i ].s .start ,
4753
4753
riter -> u .a .dim [i ].s .end );
4754
- remote_memptr +=
4754
+ remote_memptr +=
4755
4755
(riter -> u .a .dim [i ].s .start - src -> dim [i ].lower_bound )
4756
4756
* src -> dim [i ]._stride * riter -> item_size ;
4757
4757
break ;
@@ -5531,7 +5531,7 @@ case kind: \
5531
5531
send_for_ref (ref , i , src_index , mpi_token , dst , src , ds , sr ,
5532
5532
dst_byte_offset + array_offset_dst * ref -> item_size ,
5533
5533
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 ,
5535
5535
1 , stat , global_dynamic_win_rank , memptr_win_rank ,
5536
5536
ds_global , desc_global
5537
5537
#ifdef GCC_GE_8
@@ -5877,7 +5877,7 @@ PREFIX(send_by_ref) (caf_token_t token, int image_index,
5877
5877
* which is taken care of in the else part. */
5878
5878
if (access_data_through_global_win )
5879
5879
{
5880
- for (ref_rank = 0 ;
5880
+ for (ref_rank = 0 ;
5881
5881
riter -> u .a .mode [ref_rank ] != CAF_ARR_REF_NONE ; ++ ref_rank ) ;
5882
5882
/* Get the remote descriptor and use the stack to store it
5883
5883
* 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,
6270
6270
/* Set when the first non-scalar array reference is encountered. */
6271
6271
bool in_array_ref = false;
6272
6272
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
6274
6274
* global dynamic window. */
6275
6275
bool access_data_through_global_win = false;
6276
6276
/* Set when the remote descriptor is to accessed through the global window. */
@@ -6446,7 +6446,7 @@ case kind: \
6446
6446
riter -> u .a .dim [i ].s .stride ,
6447
6447
riter -> u .a .dim [i ].s .start ,
6448
6448
riter -> u .a .dim [i ].s .end );
6449
- remote_memptr +=
6449
+ remote_memptr +=
6450
6450
(riter -> u .a .dim [i ].s .start - src -> dim [i ].lower_bound )
6451
6451
* src -> dim [i ]._stride * riter -> item_size ;
6452
6452
break ;
@@ -6694,7 +6694,7 @@ PREFIX(is_present) (caf_token_t token, int image_index, caf_reference_t *refs)
6694
6694
break ;
6695
6695
case CAF_REF_ARRAY :
6696
6696
{
6697
- const gfc_descriptor_t * src =
6697
+ const gfc_descriptor_t * src =
6698
6698
(gfc_descriptor_t * )(mpi_token -> memptr + local_offset );
6699
6699
for (i = 0 ; riter -> u .a .mode [i ] != CAF_ARR_REF_NONE ; ++ i )
6700
6700
{
@@ -6854,7 +6854,7 @@ PREFIX(is_present) (caf_token_t token, int image_index, caf_reference_t *refs)
6854
6854
switch (array_ref )
6855
6855
{
6856
6856
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
6858
6858
* element in a dimension. */
6859
6859
break ;
6860
6860
case CAF_ARR_REF_SINGLE :
@@ -7173,11 +7173,11 @@ GEN_REDUCTION(do_max_int1, int8_t,
7173
7173
#endif
7174
7174
7175
7175
/*
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])
7178
7178
GEN_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,
7181
7181
inoutvec[i] = (invec[i] <= inoutvec[i] ? inoutvec[i] : invec[i]))
7182
7182
#endif
7183
7183
*/
@@ -7684,7 +7684,7 @@ PREFIX(atomic_ref) (caf_token_t token, size_t offset,
7684
7684
{
7685
7685
MPI_Win * p = TOKEN (token );
7686
7686
MPI_Datatype dt ;
7687
- int ierr = 0 ,
7687
+ int ierr = 0 ,
7688
7688
image = (image_index != 0 ) ? image_index - 1 : caf_this_image - 1 ;
7689
7689
7690
7690
selectType (kind , & dt );
@@ -7808,7 +7808,7 @@ PREFIX(event_post) (caf_token_t token, size_t index, int image_index,
7808
7808
7809
7809
#if MPI_VERSION >= 3
7810
7810
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 ,
7812
7812
MPI_INT , MPI_SUM , * p ); chk_err (ierr );
7813
7813
CAF_Win_unlock (image , * p );
7814
7814
#else // MPI_VERSION
@@ -8272,19 +8272,19 @@ void PREFIX(change_team) (caf_team_t *team,
8272
8272
tmp_used = (caf_used_teams_list * )calloc (1 ,sizeof (caf_used_teams_list ));
8273
8273
tmp_used -> prev = used_teams ;
8274
8274
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. */
8279
8279
8280
8280
/*
8281
- tmp_list = teams_list;
8281
+ tmp_list = teams_list;
8282
8282
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;
8288
8288
}
8289
8289
*/
8290
8290
0 commit comments