RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
traits.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 #ifdef __AVX2__
21 
22 #ifndef RAJA_policy_tensor_arch_avx2_traits_HPP
23 #define RAJA_policy_tensor_arch_avx2_traits_HPP
24 
25 namespace RAJA
26 {
27 namespace internal
28 {
29 namespace expt
30 {
31 
32 
33 template<>
34 struct RegisterTraits<RAJA::expt::avx2_register, int32_t>
35 {
36  using element_type = int32_t;
37  using register_policy = RAJA::expt::avx2_register;
38  static constexpr camp::idx_t s_num_bits = 256;
39  static constexpr camp::idx_t s_num_elem = 8;
40  using int_element_type = int32_t;
41 };
42 
43 template<>
44 struct RegisterTraits<RAJA::expt::avx2_register, int64_t>
45 {
46  using element_type = int64_t;
47  using register_policy = RAJA::expt::avx2_register;
48  static constexpr camp::idx_t s_num_bits = 256;
49  static constexpr camp::idx_t s_num_elem = 4;
50  using int_element_type = int64_t;
51 };
52 
53 template<>
54 struct RegisterTraits<RAJA::expt::avx2_register, float>
55 {
56  using element_type = float;
57  using register_policy = RAJA::expt::avx2_register;
58  static constexpr camp::idx_t s_num_bits = 256;
59  static constexpr camp::idx_t s_num_elem = 8;
60  using int_element_type = int32_t;
61 };
62 
63 template<>
64 struct RegisterTraits<RAJA::expt::avx2_register, double>
65 {
66  using element_type = double;
67  using register_policy = RAJA::expt::avx2_register;
68  static constexpr camp::idx_t s_num_bits = 256;
69  static constexpr camp::idx_t s_num_elem = 4;
70  using int_element_type = int64_t;
71 };
72 
73 } // namespace expt
74 } // namespace internal
75 } // namespace RAJA
76 
77 
78 #endif // guard
79 
80 
81 #endif // __AVX2__
Definition: AlignedRangeIndexSetBuilders.cpp:35