diff --git a/examples/viewcopy/viewcopy.cpp b/examples/viewcopy/viewcopy.cpp index 8a0f57b103..7574fd7e2f 100644 --- a/examples/viewcopy/viewcopy.cpp +++ b/examples/viewcopy/viewcopy.cpp @@ -78,8 +78,9 @@ void naive_copy( llamaex::parallelForEachADCoord( srcView.mapping.arrayDims(), numThreads, - [&](auto ad) { - llama::forEachLeaf([&](auto coord) + [&](auto ad) LLAMA_LAMBDA_INLINE + { + llama::forEachLeaf([&](auto coord) LLAMA_LAMBDA_INLINE { dstView(ad)(coord) = srcView(ad)(coord); }); }); } diff --git a/include/llama/Core.hpp b/include/llama/Core.hpp index 2e2e89ff26..b2696bbcf2 100644 --- a/include/llama/Core.hpp +++ b/include/llama/Core.hpp @@ -289,6 +289,17 @@ namespace llama template using LeafRecordCoords = typename internal::LeafRecordCoordsImpl>::type; + namespace internal + { + // adapted from boost::mp11, but with LLAMA_FN_HOST_ACC_INLINE + template