Skip to content

Commit

Permalink
Improvement to test.
Browse files Browse the repository at this point in the history
  • Loading branch information
BrendanKKrueger committed Aug 29, 2024
1 parent f4ebbfb commit 8992b07
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/test_array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ TEST_CASE("array nominal element access (GPU)", "[array][GPU]") {
constexpr int N = 16;
array<double, N> arr;

// Fill the array
for (int i = 0; i < N; ++i) {
arr[i] = i + 1;
}

// Can we read from it on the GPU?
int count = 0;
auto func = PORTABLE_LAMBDA(const int i, int &count) mutable {
// Fill the array
arr[i] = i + 1;
// Can we read from it?
if (arr[i] = i + 1) {
++count;
}
Expand Down

0 comments on commit 8992b07

Please sign in to comment.