Skip to content

Commit ddaba6f

Browse files
committed
work around bug in nvc++
1 parent 56a7d73 commit ddaba6f

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

test/stdexec/algos/adaptors/test_bulk.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -200,44 +200,44 @@ namespace {
200200

201201
TEST_CASE("bulk can be used with a function", "[adaptors][bulk]") {
202202
constexpr int n = 9;
203-
static int counter[n]{};
204-
std::fill_n(counter, n, 0);
203+
static int counter1[n]{};
204+
std::fill_n(counter1, n, 0);
205205

206-
ex::sender auto snd = ex::just() | ex::bulk(ex::par, n, function<int, n, counter>);
206+
ex::sender auto snd = ex::just() | ex::bulk(ex::par, n, function<int, n, counter1>);
207207
auto op = ex::connect(std::move(snd), expect_void_receiver{});
208208
ex::start(op);
209209

210-
for (int i: counter) {
210+
for (int i: counter1) {
211211
CHECK(i == 1);
212212
}
213213
}
214214

215215
TEST_CASE("bulk_chunked can be used with a function", "[adaptors][bulk]") {
216216
constexpr int n = 9;
217-
static int counter[n]{};
218-
std::fill_n(counter, n, 0);
217+
static int counter2[n]{};
218+
std::fill_n(counter2, n, 0);
219219

220220
ex::sender auto snd = ex::just()
221-
| ex::bulk_chunked(ex::par, n, function_range<int, n, counter>);
221+
| ex::bulk_chunked(ex::par, n, function_range<int, n, counter2>);
222222
auto op = ex::connect(std::move(snd), expect_void_receiver{});
223223
ex::start(op);
224224

225225
for (int i = 0; i < n; i++) {
226-
CHECK(counter[i] == 1);
226+
CHECK(counter2[i] == 1);
227227
}
228228
}
229229

230230
TEST_CASE("bulk_unchunked can be used with a function", "[adaptors][bulk]") {
231231
constexpr int n = 9;
232-
static int counter[n]{};
233-
std::fill_n(counter, n, 0);
232+
static int counter3[n]{};
233+
std::fill_n(counter3, n, 0);
234234

235-
ex::sender auto snd = ex::just() | ex::bulk_unchunked(n, function<int, n, counter>);
235+
ex::sender auto snd = ex::just() | ex::bulk_unchunked(n, function<int, n, counter3>);
236236
auto op = ex::connect(std::move(snd), expect_void_receiver{});
237237
ex::start(op);
238238

239239
for (int i = 0; i < n; i++) {
240-
CHECK(counter[i] == 1);
240+
CHECK(counter3[i] == 1);
241241
}
242242
}
243243

0 commit comments

Comments
 (0)