aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils/Interpolate.cpp
diff options
context:
space:
mode:
authorGravatar Prabhat Kumar <89051199+prkkumar@users.noreply.github.com> 2023-05-05 15:48:05 -0700
committerGravatar GitHub <noreply@github.com> 2023-05-05 15:48:05 -0700
commitb1ad3c03ffce1dbfdfb38fd4709fb0f63bc9ec8b (patch)
tree800df07910fe4d4102ce4a4a215c66dc959347f8 /Source/Utils/Interpolate.cpp
parentb590b2051c17f34ec735c1e4b8df3cddd0936ae5 (diff)
downloadWarpX-b1ad3c03ffce1dbfdfb38fd4709fb0f63bc9ec8b.tar.gz
WarpX-b1ad3c03ffce1dbfdfb38fd4709fb0f63bc9ec8b.tar.zst
WarpX-b1ad3c03ffce1dbfdfb38fd4709fb0f63bc9ec8b.zip
More Managed Memory Fixes: Diagnostics (#3899)
* Interpolate on GPU * another fix in Diagnostics
Diffstat (limited to '')
-rw-r--r--Source/Utils/Interpolate.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Utils/Interpolate.cpp b/Source/Utils/Interpolate.cpp
index 3483284ec..9d20e7485 100644
--- a/Source/Utils/Interpolate.cpp
+++ b/Source/Utils/Interpolate.cpp
@@ -51,14 +51,15 @@ namespace Interpolate
if ( F_fp.is_nodal() ){
amrex::IntVect refinement_vector{AMREX_D_DECL(r_ratio[0], r_ratio[1], r_ratio[2])};
node_bilinear_interp.interp(cfab, 0, ffab, 0, 1,
- finebx, refinement_vector, {}, {}, {}, 0, 0, RunOn::Cpu);
+ finebx, refinement_vector, {}, {}, {}, 0, 0, RunOn::Device);
} else {
amrex::Abort("Unknown field staggering.");
}
// Add temporary array to the returned structure
const Box& bx = (*interpolated_F)[mfi].box();
- (*interpolated_F)[mfi].plus<RunOn::Host>(ffab, bx, bx, 0, 0, 1);
+ (*interpolated_F)[mfi].plus<RunOn::Device>(ffab, bx, bx, 0, 0, 1);
+ amrex::Gpu::streamSynchronize();
}
}
return interpolated_F;