From 724eb79a2e53855422abf62d8cf8c4c53cacd18a Mon Sep 17 00:00:00 2001 From: Liwei Ji Date: Tue, 27 Aug 2024 08:31:36 -0400 Subject: [PATCH] Z4co: replace std::function with pointer to make rocm happy --- Z4co/src/initial2.cxx | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/Z4co/src/initial2.cxx b/Z4co/src/initial2.cxx index 464b11cb..098c1397 100644 --- a/Z4co/src/initial2.cxx +++ b/Z4co/src/initial2.cxx @@ -47,32 +47,19 @@ extern "C" void Z4co_Initial2(CCTK_ARGUMENTS) { CCTK_DELTA_SPACE(2), }; - function, dim>( + vec, dim> (*calc_deriv)( const GF3D2 &, const simdl &, - const vect &, const vect &)> - calc_deriv; + const vect &, const vect &); switch (deriv_order) { case 2: - calc_deriv = [](const GF3D2 &gf, - const simdl &mask, const vect &I, - const vect &dx) { - return Derivs::calc_deriv<2>(gf, mask, I, dx); - }; + calc_deriv = &Derivs::calc_deriv<2>; break; case 4: - calc_deriv = [](const GF3D2 &gf, - const simdl &mask, const vect &I, - const vect &dx) { - return Derivs::calc_deriv<4>(gf, mask, I, dx); - }; + calc_deriv = &Derivs::calc_deriv<4>; break; case 6: - calc_deriv = [](const GF3D2 &gf, - const simdl &mask, const vect &I, - const vect &dx) { - return Derivs::calc_deriv<6>(gf, mask, I, dx); - }; + calc_deriv = &Derivs::calc_deriv<6>; break; default: assert(0);