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