Skip to content
Snippets Groups Projects
Commit 53a6f389 authored by Matteo Cicuttin's avatar Matteo Cicuttin
Browse files

CMake options to enable new optimizations.

parent d4556bc6
No related branches found
No related tags found
No related merge requests found
......@@ -260,6 +260,16 @@ if (TM_NEW_CURLS)
add_compile_definitions(TM_NEW_CURLS)
endif()
option(TM_ONESHOT_LIFTING "Use one-shot lifting" ON)
if (TM_ONESHOT_LIFTING)
add_compile_definitions(TM_ONESHOT_LIFTING)
endif()
option(TM_ONESHOT_JUMPS "Use one-shot jumps" ON)
if (TM_ONESHOT_JUMPS)
add_compile_definitions(TM_ONESHOT_JUMPS)
endif()
######################################################################
## Enable/disable solver modules
option(OPT_DEBUG_PRINT "Print debug information")
......
......@@ -363,7 +363,13 @@ compute_fluxes(solver_state_gpu& state, const field_gpu& in, field_gpu& out, boo
double *bc_coeffs = matparams_ptrs.bc_coeffs;
for (const auto& edg : state.edgs)
{
#ifdef TM_ONESHOT_JUMPS
maxwell::gpu_compute_jumps_oneshot(edg, in, state.jumps, bc_coeffs, state.compute_stream);
#else
maxwell::gpu_compute_jumps(edg, in, state.jumps, bc_coeffs, state.compute_stream);
#endif
}
for (const auto& edg : state.edgs)
maxwell::gpu_compute_fluxes(edg, state.jumps, state.fluxes, state.bndsrcs,
......@@ -374,15 +380,16 @@ compute_fluxes(solver_state_gpu& state, const field_gpu& in, field_gpu& out, boo
for (auto& edg : state.edgs)
{
//gpu_compute_flux_lifting(edg, fluxesp.Ex, outp.Ex, state.compute_stream);
//gpu_compute_flux_lifting(edg, fluxesp.Ey, outp.Ey, state.compute_stream);
//gpu_compute_flux_lifting(edg, fluxesp.Ez, outp.Ez, state.compute_stream);
//gpu_compute_flux_lifting(edg, fluxesp.Hx, outp.Hx, state.compute_stream);
//gpu_compute_flux_lifting(edg, fluxesp.Hy, outp.Hy, state.compute_stream);
//gpu_compute_flux_lifting(edg, fluxesp.Hz, outp.Hz, state.compute_stream);
#ifdef TM_ONESHOT_LIFTING
gpu_compute_flux_lifting_oneshot(edg, fluxesp, outp, state.compute_stream);
#else
gpu_compute_flux_lifting(edg, fluxesp.Ex, outp.Ex, state.compute_stream);
gpu_compute_flux_lifting(edg, fluxesp.Ey, outp.Ey, state.compute_stream);
gpu_compute_flux_lifting(edg, fluxesp.Ez, outp.Ez, state.compute_stream);
gpu_compute_flux_lifting(edg, fluxesp.Hx, outp.Hx, state.compute_stream);
gpu_compute_flux_lifting(edg, fluxesp.Hy, outp.Hy, state.compute_stream);
gpu_compute_flux_lifting(edg, fluxesp.Hz, outp.Hz, state.compute_stream);
#endif
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment