@@ -20,27 +20,24 @@ constexpr uint8_t CACHE = 0x2;
2020constexpr uint8_t STATICALLY_COALESCE = 0x4 ;
2121constexpr uint8_t PREFETCH = 0x8 ;
2222
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 ;
2726};
2827
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 ;
3231};
3332
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 ;
3836};
3937
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 ;
4441};
4542
4643template <bool _B> using burst_coalesce = burst_coalesce_impl<_B>;
@@ -81,21 +78,21 @@ template <class... _mem_access_params> class lsu final {
8178
8279private:
8380 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;
8582 static constexpr uint8_t _burst_coalesce =
8683 _burst_coalesce_val == 1 ? BURST_COALESCE : 0 ;
8784
8885 static constexpr int32_t _cache_val =
89- _GetValue<cache< 0 > , _mem_access_params...>::value;
86+ _GetValue<cache, _mem_access_params...>::value;
9087 static constexpr uint8_t _cache = (_cache_val > 0 ) ? CACHE : 0 ;
9188
9289 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;
9491 static constexpr uint8_t _dont_statically_coalesce =
9592 _statically_coalesce_val == 0 ? STATICALLY_COALESCE : 0 ;
9693
9794 static constexpr int32_t _prefetch_val =
98- _GetValue<prefetch_impl< 0 > , _mem_access_params...>::value;
95+ _GetValue<prefetch_impl, _mem_access_params...>::value;
9996 static constexpr uint8_t _prefetch = _prefetch_val ? PREFETCH : 0 ;
10097
10198 static_assert (_cache_val >= 0 , " cache size parameter must be non-negative" );
0 commit comments