Skip to content

Commit

Permalink
fix lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahm-LANL committed Sep 13, 2024
1 parent debb60c commit 901ef55
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/test_array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ TEST_CASE("array nominal element access (GPU)", "[array][GPU]") {

// Can we read from it on the GPU?
int count = 0;
auto func = PORTABLE_LAMBDA(const int i, int &count) mutable {
if (arr[i] == i + 1) {
++count;
}
};
portableReduce("assign_and_check", 0, N, func, count);
portableReduce(
"assign_and_check", 0, N,
PORTABLE_LAMBDA(const int i, int &count) {
if (arr[i] == (i + 1)) {
++count;
}
},
count);
CHECK(count == N);
}

Expand Down

0 comments on commit 901ef55

Please sign in to comment.