Skip to content

Commit

Permalink
replace AMREX_PARALLEL_FOR_3D -> amrex::ParallelFor (#1752)
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale authored Feb 13, 2025
1 parent f9d54de commit af2a944
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
6 changes: 4 additions & 2 deletions unit_test/test_aprox_rates/aprox_rates_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ void aprox_rates_test(const Box& bx,

const int ini56 = network_spec_index("nickel-56");

AMREX_PARALLEL_FOR_3D(bx, i, j, k,
amrex::ParallelFor(bx,
[=] AMREX_GPU_HOST_DEVICE (int i, int j, int k)
{

eos_extra_t eos_state;
Expand Down Expand Up @@ -444,7 +445,8 @@ void aprox_rates_extra_c12ag(const Box& bx,

const int ini56 = network_spec_index("nickel-56");

AMREX_PARALLEL_FOR_3D(bx, i, j, k,
amrex::ParallelFor(bx,
[=] AMREX_GPU_HOST_DEVICE (int i, int j, int k)
{

eos_extra_t eos_state;
Expand Down
3 changes: 2 additions & 1 deletion unit_test/test_conductivity/conductivity_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ void cond_test_C(const amrex::Box& bx,
const int ih1 = network_spec_index("hydrogen-1");
const int ihe4 = network_spec_index("helium-4");

AMREX_PARALLEL_FOR_3D(bx, i, j, k,
amrex::ParallelFor(bx,
[=] AMREX_GPU_HOST_DEVICE (int i, int j, int k)
{

// set the composition -- approximately solar
Expand Down
3 changes: 2 additions & 1 deletion unit_test/test_eos/eos_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ void eos_test_C(const Box& bx,
const int ihe4 = network_spec_index("helium-4");


AMREX_PARALLEL_FOR_3D(bx, i, j, k,
amrex::ParallelFor(bx,
[=] AMREX_GPU_HOST_DEVICE (int i, int j, int k)
{

// set the composition -- approximately solar
Expand Down
3 changes: 2 additions & 1 deletion unit_test/test_jac/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ void main_main ()

auto s = state.array(mfi);

AMREX_PARALLEL_FOR_3D(bx, i, j, k,
amrex::ParallelFor(bx,
[=] AMREX_GPU_HOST_DEVICE (int i, int j, int k)
{
do_jac(i, j, k, s, vars);
});
Expand Down
3 changes: 2 additions & 1 deletion unit_test/test_rhs/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ void main_main ()

auto s = state.array(mfi);

AMREX_PARALLEL_FOR_3D(bx, i, j, k,
amrex::ParallelFor(bx,
[=] AMREX_GPU_HOST_DEVICE (int i, int j, int k)
{
do_rhs(i, j, k, s, vars);
});
Expand Down
3 changes: 2 additions & 1 deletion unit_test/test_sdc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ void main_main ()
auto s = state.array(mfi);
auto n_rhs = integrator_n_rhs.array(mfi);

AMREX_PARALLEL_FOR_3D(bx, i, j, k,
amrex::ParallelFor(bx,
[=] AMREX_GPU_HOST_DEVICE (int i, int j, int k)
{
bool success = do_react(vars, i, j, k, s, n_rhs);

Expand Down

0 comments on commit af2a944

Please sign in to comment.