RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
normalizeOperand.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_tensor_ET_normalizeOperand_HPP
21 #define RAJA_pattern_tensor_ET_normalizeOperand_HPP
22 
23 #include "RAJA/config.hpp"
24 
25 #include "RAJA/util/macros.hpp"
26 
28 
29 namespace RAJA
30 {
31 namespace internal
32 {
33 namespace expt
34 {
35 
36 
37 class TensorRegisterConcreteBase;
38 
39 namespace ET
40 {
41 class TensorExpressionConcreteBase;
42 
43 template<typename RHS, typename enable = void>
45 
46 /*
47  * For TensorExpression nodes, we just return them as-is.
48  */
49 template<typename RHS>
51  RHS,
52  typename std::enable_if<
53  std::is_base_of<TensorExpressionConcreteBase, RHS>::value>::type>
54 {
55  using return_type = RHS;
56 
57  RAJA_INLINE
58 
60  static constexpr return_type normalize(RHS const& rhs) { return rhs; }
61 };
62 
72 template<typename RHS>
73 RAJA_INLINE RAJA_HOST_DEVICE auto normalizeOperand(RHS const& rhs) ->
75 {
77 }
78 
79 template<typename RHS>
81 
82 
83 } // namespace ET
84 
85 } // namespace expt
86 } // namespace internal
87 
88 } // namespace RAJA
89 
90 
91 #endif
RAJA header file defining SIMD/SIMT register operations.
Header file for common RAJA internal macro definitions.
#define RAJA_HOST_DEVICE
Definition: macros.hpp:65
RAJA_INLINE RAJA_HOST_DEVICE auto normalizeOperand(RHS const &rhs) -> typename NormalizeOperandHelper< RHS >::return_type
Definition: normalizeOperand.hpp:73
typename NormalizeOperandHelper< RHS >::return_type normalize_operand_t
Definition: normalizeOperand.hpp:80
Definition: AlignedRangeIndexSetBuilders.cpp:35
Definition: ListSegment.hpp:416
RAJA_INLINE static constexpr RAJA_HOST_DEVICE return_type normalize(RHS const &rhs)
Definition: normalizeOperand.hpp:60
Definition: normalizeOperand.hpp:44