Skip to content

Commit

Permalink
Merge pull request #56 from lanl/jmm/fix-lambda
Browse files Browse the repository at this point in the history
Fix array test with kokkos backend
  • Loading branch information
Yurlungur authored Sep 13, 2024
2 parents debb60c + 901ef55 commit d8fafe3
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 d8fafe3

Please sign in to comment.