Skip to content

Commit

Permalink
Remove extra constructor templates in device ActionLauncher (celerita…
Browse files Browse the repository at this point in the history
  • Loading branch information
esseivaju committed Dec 12, 2023
1 parent 238b17c commit d47a259
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions src/celeritas/global/ActionLauncher.device.hh
Original file line number Diff line number Diff line change
Expand Up @@ -140,32 +140,8 @@ class ActionLauncher
KernelParamCalculator calc_launch_params_;

//// PRIVATE CONSTRUCTORS ////
// (Note: aliasing F is necessary for SFINAE to work)

//! Construct when no "Applier" member function is defined
template<class F_ = F, std::enable_if_t<!detail::has_applier_v<F_>, bool> = true>
explicit ActionLauncher(std::string_view name)
: calc_launch_params_{name, &detail::launch_action_impl<F_>}
{
}

//! Construct when an "Applier" member function doesn't define launch
//! bounds
template<class F_ = F,
std::enable_if_t<detail::kernel_no_bound<typename F_::Applier>, bool>
= true>
explicit ActionLauncher(std::string_view name)
: calc_launch_params_{name, &detail::launch_action_impl<F_>}
{
}

//! Construct when an "Applier" member function defines max block size
template<class F_ = F,
class A_ = typename F_::Applier,
std::enable_if_t<detail::has_max_block_size_v<A_>, bool> = true>
explicit ActionLauncher(std::string_view name)
: calc_launch_params_{
name, &detail::launch_action_impl<F_>}
: calc_launch_params_{name, &detail::launch_action_impl<F>}
{
}
};
Expand Down

0 comments on commit d47a259

Please sign in to comment.