RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
Param.hpp
Go to the documentation of this file.
1 
11 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
12 // Copyright (c) Lawrence Livermore National Security, LLC and other
13 // RAJA Project Developers. See top-level LICENSE and COPYRIGHT
14 // files for dates and other details. No copyright assignment is required
15 // to contribute to RAJA.
16 //
17 // SPDX-License-Identifier: (BSD-3-Clause)
18 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
19 
20 #ifndef RAJA_pattern_kernel_Param_HPP
21 #define RAJA_pattern_kernel_Param_HPP
22 
23 
24 #include "RAJA/config.hpp"
25 
28 
29 #include <iostream>
30 #include <type_traits>
31 
32 namespace RAJA
33 {
34 
35 namespace statement
36 {
37 
45 template<camp::idx_t ParamId>
47 {
48 
49  constexpr static camp::idx_t param_idx = ParamId;
50 
51  template<typename Data>
52  RAJA_HOST_DEVICE RAJA_INLINE static auto eval(Data const& data)
53  -> decltype(camp::get<ParamId>(data.param_tuple))
54  {
55  return camp::get<ParamId>(data.param_tuple);
56  }
57 };
58 
59 } // end namespace statement
60 } // end namespace RAJA
61 
62 
63 #endif /* RAJA_pattern_kernel_HPP */
#define RAJA_HOST_DEVICE
Definition: macros.hpp:65
Definition: AlignedRangeIndexSetBuilders.cpp:35
Header file for loop kernel internals.
Definition: params_base.hpp:266
Definition: Param.hpp:47
RAJA_HOST_DEVICE static RAJA_INLINE auto eval(Data const &data) -> decltype(camp::get< ParamId >(data.param_tuple))
Definition: Param.hpp:52
constexpr static camp::idx_t param_idx
Definition: Param.hpp:49