Skip to content

Commit

Permalink
kernel name is expected to be the second to last
Browse files Browse the repository at this point in the history
  • Loading branch information
artv3 committed Dec 26, 2024
1 parent 2aaf40e commit 1ccd52f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/RAJA/pattern/params/forall.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,15 @@ namespace expt
//===========================================================================
//
//
// kernel_name should be the second to last argument in the param pack, just extract it...
// kernel_name is expected to be the second to last argument, just extract it
//
//TODO fix this up, should be able to walk through the parameter pack to find the KernelName
//If none is found we need to provide a substitute
//
template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, bool>::type = true>
constexpr auto&& get_kernel_name(Args&&... args){
return camp::get<sizeof...(Args)-2>( camp::forward_as_tuple(std::forward<Args>(args)...) );
}


template<typename... Args, typename std::enable_if<sizeof...(Args) < 2, bool>::type = true>
constexpr auto&& get_kernel_name(Args&&... args){
return camp::get<0>( camp::forward_as_tuple(std::forward<Args>(args)...) );
Expand Down

0 comments on commit 1ccd52f

Please sign in to comment.