Skip to content

Commit

Permalink
use && when getting the kernel name from params
Browse files Browse the repository at this point in the history
  • Loading branch information
artv3 committed Dec 27, 2024
1 parent 13e0dfe commit d10141a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/RAJA/pattern/forall.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ forall(ExecutionPolicy&& p, Res r, Container&& c, Params&&... params)

auto f_params = expt::make_forall_param_pack(std::forward<Params>(params)...);

auto kernel_name = expt::get_kernel_name(std::forward<Params>(params)...);
auto&& kernel_name = expt::get_kernel_name(std::forward<Params>(params)...);
auto&& loop_body = expt::get_lambda(std::forward<Params>(params)...);

expt::check_forall_optional_args(loop_body, f_params);
Expand Down
4 changes: 2 additions & 2 deletions include/RAJA/pattern/launch/launch_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ void launch(LaunchParams const &launch_params, ReduceParams&&... rest_of_launch_
auto reducers = expt::make_forall_param_pack(std::forward<ReduceParams>(rest_of_launch_args)...);

//get kernel name
auto kernel_name = expt::get_kernel_name(std::forward<ReduceParams>(rest_of_launch_args)...);
auto&& kernel_name = expt::get_kernel_name(std::forward<ReduceParams>(rest_of_launch_args)...);
std::string kname = get_kernel_name<decltype(kernel_name)>::get(kernel_name);

auto&& launch_body = expt::get_lambda(std::forward<ReduceParams>(rest_of_launch_args)...);
Expand Down Expand Up @@ -318,7 +318,7 @@ launch(RAJA::resources::Resource res, LaunchParams const &launch_params,
//Get reducers
auto reducers = expt::make_forall_param_pack(std::forward<ReduceParams>(rest_of_launch_args)...);

auto kernel_name = expt::get_kernel_name(std::forward<ReduceParams>(rest_of_launch_args)...);
auto&& kernel_name = expt::get_kernel_name(std::forward<ReduceParams>(rest_of_launch_args)...);
std::string kname = get_kernel_name<decltype(kernel_name)>::get(kernel_name);

auto&& launch_body = expt::get_lambda(std::forward<ReduceParams>(rest_of_launch_args)...);
Expand Down
2 changes: 1 addition & 1 deletion include/RAJA/util/PluginContext.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class KokkosPluginLoader;

struct PluginContext {
public:
PluginContext(const Platform p, const std::string *name) :
PluginContext(const Platform p, const std::string *name = nullptr) :
platform(p), kernel_name(name) {}

Platform platform;
Expand Down

0 comments on commit d10141a

Please sign in to comment.