diff --git a/src/operations/sum.hpp b/src/operations/sum.hpp index 75346623..58db9f33 100644 --- a/src/operations/sum.hpp +++ b/src/operations/sum.hpp @@ -28,7 +28,7 @@ typename array_type::element sum(const array_type & phi){ CALI_CXX_MARK_SCOPE("sum(1arg)"); auto init = zero(); if(phi.size() == 0) return init; - return gpu::run(gpu::reduce(phi.size()), init, gpu::array_access{begin(phi)}); + return gpu::run(gpu::reduce(phi.size()), init, [ph = begin(phi)] GPU_LAMBDA (auto ii) { return ph[ii]; }); } template