@@ -90,35 +90,24 @@ struct impl_list_item_t {
90
90
: public type_deduction_helper_t <pd_t > {};
91
91
92
92
template <typename pd_t >
93
- impl_list_item_t (type_deduction_helper_t <pd_t >) {
94
- using deduced_pd_t = typename type_deduction_helper_t <pd_t >::type;
95
- create_pd_func_ = &primitive_desc_t ::create<deduced_pd_t >;
96
- DNNL_PRIMITIVE_NAME_INIT (pd_t );
97
- }
93
+ constexpr impl_list_item_t (type_deduction_helper_t <pd_t >)
94
+ : create_pd_func_(&primitive_desc_t ::create<
95
+ typename type_deduction_helper_t <pd_t >::type>) {}
98
96
99
97
template <typename pd_t >
100
- impl_list_item_t (concat_type_deduction_helper_t <pd_t >) {
101
- using deduced_pd_t =
102
- typename concat_type_deduction_helper_t <pd_t >::type;
103
- create_concat_pd_func_ = deduced_pd_t ::create;
104
- DNNL_PRIMITIVE_NAME_INIT (pd_t );
105
- }
98
+ constexpr impl_list_item_t (concat_type_deduction_helper_t <pd_t >)
99
+ : create_concat_pd_func_(
100
+ concat_type_deduction_helper_t <pd_t >::type::create) {}
106
101
107
102
template <typename pd_t >
108
- impl_list_item_t (sum_type_deduction_helper_t <pd_t >) {
109
- using deduced_pd_t = typename sum_type_deduction_helper_t <pd_t >::type;
110
- create_sum_pd_func_ = deduced_pd_t ::create;
111
- DNNL_PRIMITIVE_NAME_INIT (pd_t );
103
+ constexpr impl_list_item_t (sum_type_deduction_helper_t <pd_t >)
104
+ : create_sum_pd_func_(sum_type_deduction_helper_t <pd_t >::type::create) {
112
105
}
113
106
114
107
template <typename pd_t >
115
- impl_list_item_t (reorder_type_deduction_helper_t <pd_t >) {
116
- using deduced_pd_t =
117
- typename reorder_type_deduction_helper_t <pd_t >::type;
118
- create_reorder_pd_func_ = deduced_pd_t ::create;
119
- DNNL_PRIMITIVE_NAME_INIT (pd_t );
120
- }
121
-
108
+ constexpr impl_list_item_t (reorder_type_deduction_helper_t <pd_t >)
109
+ : create_reorder_pd_func_(
110
+ reorder_type_deduction_helper_t <pd_t >::type::create) {}
122
111
123
112
explicit operator bool () const {
124
113
return !utils::everyone_is (nullptr , create_pd_func_,
0 commit comments