diff --git a/ports-of-call/array.hpp b/ports-of-call/array.hpp index 833f1a9b..67dbd0c1 100644 --- a/ports-of-call/array.hpp +++ b/ports-of-call/array.hpp @@ -2,6 +2,7 @@ #define _PORTS_OF_CALL_ARRAY_HPP_ #include "portability.hpp" +#include "portable_errors.hpp" #include #include diff --git a/test/test_array.hpp b/test/test_array.hpp index 39615547..4e84c118 100644 --- a/test/test_array.hpp +++ b/test/test_array.hpp @@ -11,7 +11,7 @@ TEST_CASE("array nominal element access (GPU)", "[array][GPU]") { array arr; int count = 0; - auto func = PORTABLE_LAMBDA(const int i, int & count) { + auto func = PORTABLE_LAMBDA(const int i, int & count) mutable { // Fill the array arr[i] = i + 1; // Can we read from it? @@ -19,7 +19,7 @@ TEST_CASE("array nominal element access (GPU)", "[array][GPU]") { ++count; } }; - PortsOfCall::parallelReduce("assign_and_check", 0, N, func, count); + portableReduce("assign_and_check", 0, N, func, count); CHECK(count == N); } @@ -198,7 +198,7 @@ TEST_CASE("array sizes", "[array]") { TEST_CASE("array fill (GPU)", "[array][GPU]") { constexpr std::size_t N = 42; std::size_t count = 0; - auto func = PORTABLE_LAMBDA(const int i, int & count) { + auto func = PORTABLE_LAMBDA(const int i, std::size_t & count) { constexpr double value = 3.14; array arr; arr.fill(value); @@ -207,7 +207,7 @@ TEST_CASE("array fill (GPU)", "[array][GPU]") { } }; constexpr std::size_t M = 5; - PortsOfCall::parallelReduce("check", 0, M, func, count); + portableReduce("check", 0, M, func, count); CHECK(count == N * M); }