Skip to content

Commit 064bd3e

Browse files
committed
Fix
1 parent 660a69d commit 064bd3e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Src/Base/AMReX_GpuLaunchFunctsG.H

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ void launch (BoxND<dim> const& box, L const& f) noexcept
776776
const BoxIndexerND<dim> indexer(box);
777777
const auto type = box.ixType();
778778
for (auto const& ec : nec) {
779-
const T start_idx = T(ec.start_idx);
779+
const auto start_idx = std::uint64_t(ec.start_idx);
780780
AMREX_LAUNCH_KERNEL(MT, ec.nblocks, MT, 0, Gpu::gpuStream(),
781781
[=] AMREX_GPU_DEVICE () noexcept {
782782
auto icell = std::uint64_t(MT)*blockIdx.x+threadIdx.x + start_idx;
@@ -821,7 +821,7 @@ ParallelFor (Gpu::KernelInfo const&, BoxND<dim> const& box, L const& f) noexcept
821821
const BoxIndexerND<dim> indexer(box);
822822
const auto& nec = Gpu::makeNExecutionConfigs<MT>(box);
823823
for (auto const& ec : nec) {
824-
const T start_idx = T(ec.start_idx);
824+
const auto start_idx = std::uint64_t(ec.start_idx);
825825
AMREX_LAUNCH_KERNEL(MT, ec.nblocks, MT, 0, Gpu::gpuStream(),
826826
[=] AMREX_GPU_DEVICE () noexcept {
827827
auto icell = std::uint64_t(MT)*blockIdx.x+threadIdx.x + start_idx;
@@ -844,7 +844,7 @@ ParallelFor (Gpu::KernelInfo const&, BoxND<dim> const& box, T ncomp, L const& f)
844844
const BoxIndexerND<dim> indexer(box);
845845
const auto& nec = Gpu::makeNExecutionConfigs<MT>(box);
846846
for (auto const& ec : nec) {
847-
const T start_idx = T(ec.start_idx);
847+
const auto start_idx = std::uint64_t(ec.start_idx);
848848
AMREX_LAUNCH_KERNEL(MT, ec.nblocks, MT, 0, Gpu::gpuStream(),
849849
[=] AMREX_GPU_DEVICE () noexcept {
850850
auto icell = std::uint64_t(MT)*blockIdx.x+threadIdx.x + start_idx;

0 commit comments

Comments
 (0)