From ad81d926a1492d3889cee8444bf97c4948a4672b Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 19 Mar 2024 20:03:25 -0400 Subject: [PATCH 1/3] remove mutable keyword on LoopOnCpu we capture by reference, so this doesn't seem required and updates to the AMReX interfaces mean it doesn't work anymore --- Source/reactions/Castro_react.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/reactions/Castro_react.cpp b/Source/reactions/Castro_react.cpp index 73c5a3c873..bc070c7359 100644 --- a/Source/reactions/Castro_react.cpp +++ b/Source/reactions/Castro_react.cpp @@ -213,7 +213,7 @@ Castro::react_state(MultiFab& s, MultiFab& r, Real time, Real dt, const int stra #if defined(AMREX_USE_GPU) ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) #else - LoopOnCpu(bx, [&] (int i, int j, int k) mutable + LoopOnCpu(bx, [&] (int i, int j, int k) #endif { @@ -558,7 +558,7 @@ Castro::react_state(Real time, Real dt) #if defined(AMREX_USE_GPU) ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) #else - LoopOnCpu(bx, [&] (int i, int j, int k) mutable + LoopOnCpu(bx, [&] (int i, int j, int k) #endif { burn_t burn_state; From bc483ba161cd0818b1fc424c4a3a744ce8f3c108 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 19 Mar 2024 20:05:24 -0400 Subject: [PATCH 2/3] Revert "remove mutable keyword on LoopOnCpu" This reverts commit ad81d926a1492d3889cee8444bf97c4948a4672b. --- Source/reactions/Castro_react.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/reactions/Castro_react.cpp b/Source/reactions/Castro_react.cpp index bc070c7359..73c5a3c873 100644 --- a/Source/reactions/Castro_react.cpp +++ b/Source/reactions/Castro_react.cpp @@ -213,7 +213,7 @@ Castro::react_state(MultiFab& s, MultiFab& r, Real time, Real dt, const int stra #if defined(AMREX_USE_GPU) ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) #else - LoopOnCpu(bx, [&] (int i, int j, int k) + LoopOnCpu(bx, [&] (int i, int j, int k) mutable #endif { @@ -558,7 +558,7 @@ Castro::react_state(Real time, Real dt) #if defined(AMREX_USE_GPU) ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) #else - LoopOnCpu(bx, [&] (int i, int j, int k) + LoopOnCpu(bx, [&] (int i, int j, int k) mutable #endif { burn_t burn_state; From 09bde5faec2966ac0e0c1a78f8bb5f30c3589f21 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Wed, 20 Mar 2024 13:09:56 -0400 Subject: [PATCH 3/3] remove mutable keyword on LoopOnCpu (#2794) we capture by reference, so this doesn't seem required and updates to the AMReX interfaces mean it doesn't work anymore --- Source/reactions/Castro_react.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/reactions/Castro_react.cpp b/Source/reactions/Castro_react.cpp index 73c5a3c873..bc070c7359 100644 --- a/Source/reactions/Castro_react.cpp +++ b/Source/reactions/Castro_react.cpp @@ -213,7 +213,7 @@ Castro::react_state(MultiFab& s, MultiFab& r, Real time, Real dt, const int stra #if defined(AMREX_USE_GPU) ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) #else - LoopOnCpu(bx, [&] (int i, int j, int k) mutable + LoopOnCpu(bx, [&] (int i, int j, int k) #endif { @@ -558,7 +558,7 @@ Castro::react_state(Real time, Real dt) #if defined(AMREX_USE_GPU) ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) #else - LoopOnCpu(bx, [&] (int i, int j, int k) mutable + LoopOnCpu(bx, [&] (int i, int j, int k) #endif { burn_t burn_state;