@@ -20,27 +20,24 @@ constexpr uint8_t CACHE = 0x2;
20
20
constexpr uint8_t STATICALLY_COALESCE = 0x4 ;
21
21
constexpr uint8_t PREFETCH = 0x8 ;
22
22
23
- struct burst_coalesce_impl_id ;
24
- template <int32_t _N>
25
- struct burst_coalesce_impl : std::integral_constant<int32_t , _N> {
26
- using type_id = burst_coalesce_impl_id;
23
+ template <int32_t _N> struct burst_coalesce_impl {
24
+ static constexpr int32_t value = _N;
25
+ static constexpr int32_t default_value = 0 ;
27
26
};
28
27
29
- struct cache_id ;
30
- template < int32_t _N> struct cache : std::integral_constant< int32_t , _N> {
31
- using type_id = cache_id ;
28
+ template < int32_t _N> struct cache {
29
+ static constexpr int32_t value = _N;
30
+ static constexpr int32_t default_value = 0 ;
32
31
};
33
32
34
- struct prefetch_impl_id ;
35
- template <int32_t _N>
36
- struct prefetch_impl : std::integral_constant<int32_t , _N> {
37
- using type_id = prefetch_impl_id;
33
+ template <int32_t _N> struct prefetch_impl {
34
+ static constexpr int32_t value = _N;
35
+ static constexpr int32_t default_value = 0 ;
38
36
};
39
37
40
- struct statically_coalesce_impl_id ;
41
- template <int32_t _N>
42
- struct statically_coalesce_impl : std::integral_constant<int32_t , _N> {
43
- using type_id = statically_coalesce_impl_id;
38
+ template <int32_t _N> struct statically_coalesce_impl {
39
+ static constexpr int32_t value = _N;
40
+ static constexpr int32_t default_value = 1 ;
44
41
};
45
42
46
43
template <bool _B> using burst_coalesce = burst_coalesce_impl<_B>;
@@ -81,21 +78,21 @@ template <class... _mem_access_params> class lsu final {
81
78
82
79
private:
83
80
static constexpr int32_t _burst_coalesce_val =
84
- _GetValue<burst_coalesce_impl< 0 > , _mem_access_params...>::value;
81
+ _GetValue<burst_coalesce_impl, _mem_access_params...>::value;
85
82
static constexpr uint8_t _burst_coalesce =
86
83
_burst_coalesce_val == 1 ? BURST_COALESCE : 0 ;
87
84
88
85
static constexpr int32_t _cache_val =
89
- _GetValue<cache< 0 > , _mem_access_params...>::value;
86
+ _GetValue<cache, _mem_access_params...>::value;
90
87
static constexpr uint8_t _cache = (_cache_val > 0 ) ? CACHE : 0 ;
91
88
92
89
static constexpr int32_t _statically_coalesce_val =
93
- _GetValue<statically_coalesce_impl< 1 > , _mem_access_params...>::value;
90
+ _GetValue<statically_coalesce_impl, _mem_access_params...>::value;
94
91
static constexpr uint8_t _dont_statically_coalesce =
95
92
_statically_coalesce_val == 0 ? STATICALLY_COALESCE : 0 ;
96
93
97
94
static constexpr int32_t _prefetch_val =
98
- _GetValue<prefetch_impl< 0 > , _mem_access_params...>::value;
95
+ _GetValue<prefetch_impl, _mem_access_params...>::value;
99
96
static constexpr uint8_t _prefetch = _prefetch_val ? PREFETCH : 0 ;
100
97
101
98
static_assert (_cache_val >= 0 , " cache size parameter must be non-negative" );
0 commit comments