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