Skip to content

Commit 6961af5

Browse files
committed
[FORK][FIX] Fixed build to work for GPU plugin
1 parent b2cdc2c commit 6961af5

File tree

1 file changed

+11
-22
lines changed

1 file changed

+11
-22
lines changed

src/common/impl_list_item.hpp

+11-22
Original file line numberDiff line numberDiff line change
@@ -90,35 +90,24 @@ struct impl_list_item_t {
9090
: public type_deduction_helper_t<pd_t> {};
9191

9292
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>) {}
9896

9997
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) {}
106101

107102
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) {
112105
}
113106

114107
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) {}
122111

123112
explicit operator bool() const {
124113
return !utils::everyone_is(nullptr, create_pd_func_,

0 commit comments

Comments
 (0)