Skip to content

Commit cf923bc

Browse files
author
David M. Ozog
committed
Whitespace/comparisons cleanup in p2p vector tests
Signed-off-by: David M. Ozog <[email protected]>
1 parent 56ec2de commit cf923bc

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

test/shmemx/c11_test_shmemx_test_vector.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
rc = EXIT_FAILURE; \
7272
} \
7373
\
74-
} while(0)
74+
} while(0)
7575

7676
#define TEST_SHMEM_TEST_SOME(TYPE) \
7777
do{ \
@@ -110,7 +110,7 @@
110110
rc = EXIT_FAILURE; \
111111
} \
112112
\
113-
} while(0)
113+
} while(0)
114114

115115

116116
#else
@@ -123,7 +123,7 @@
123123

124124
int main(void)
125125
{
126-
126+
127127
shmem_init();
128128

129129
int rc = EXIT_SUCCESS;
@@ -168,7 +168,6 @@ int main(void)
168168

169169

170170
shmem_finalize();
171-
return rc;
172-
171+
return rc;
173172

174173
}

test/shmemx/c11_test_shmemx_wait_until_vector.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
\
5757
int ncompleted = 0; \
5858
while(ncompleted < npes){ \
59-
int ndone = shmemx_wait_until_any_vector(ivars, npes, status, SHMEM_CMP_EQ, cmp_values); \
59+
size_t ndone = shmemx_wait_until_any_vector(ivars, npes, status, SHMEM_CMP_EQ, cmp_values); \
6060
status[ndone] = 1; \
6161
total_sum += ivars[ndone]; \
6262
ncompleted++; \
@@ -66,7 +66,7 @@
6666
rc = EXIT_FAILURE; \
6767
} \
6868
\
69-
} while(0)
69+
} while(0)
7070

7171
#define TEST_SHMEM_WAIT_UNTIL_SOME(TYPE) \
7272
do{ \
@@ -91,10 +91,10 @@
9191
\
9292
int ncompleted = 0; \
9393
while(ncompleted < npes){ \
94-
int ndone = shmemx_wait_until_some_vector(ivars, npes, indices, status, SHMEM_CMP_EQ, cmp_values); \
95-
for(i = 0; i < ndone; i++){ \
96-
total_sum += ivars[indices[i]]; \
97-
status[indices[i]] = 1; \
94+
size_t ndone = shmemx_wait_until_some_vector(ivars, npes, indices, status, SHMEM_CMP_EQ, cmp_values); \
95+
for(size_t j = 0; j < ndone; j++){ \
96+
total_sum += ivars[indices[j]]; \
97+
status[indices[j]] = 1; \
9898
} \
9999
ncompleted += ndone; \
100100
} \
@@ -103,7 +103,7 @@
103103
rc = EXIT_FAILURE; \
104104
} \
105105
\
106-
} while(0)
106+
} while(0)
107107

108108

109109
#else
@@ -116,7 +116,7 @@
116116

117117
int main(void)
118118
{
119-
119+
120120
shmem_init();
121121

122122
int rc = EXIT_SUCCESS;
@@ -161,7 +161,6 @@ int main(void)
161161

162162

163163
shmem_finalize();
164-
return rc;
165-
164+
return rc;
166165

167166
}

0 commit comments

Comments
 (0)