1/*******************************************************************************
2* Copyright 2017-2022 Intel Corporation
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at
7*
8* http://www.apache.org/licenses/LICENSE-2.0
9*
10* Unless required by applicable law or agreed to in writing, software
11* distributed under the License is distributed on an "AS IS" BASIS,
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13* See the License for the specific language governing permissions and
14* limitations under the License.
15*******************************************************************************/
16
17#include "cpu/cpu_engine.hpp"
18
19#include "common/impl_list_item.hpp"
20#include "cpu/ref_concat.hpp"
21#include "cpu/simple_concat.hpp"
22
23namespace dnnl {
24namespace impl {
25namespace cpu {
26
27namespace {
28using namespace dnnl::impl::data_type;
29#define INSTANCE(...) \
30 impl_list_item_t(impl_list_item_t::concat_type_deduction_helper_t< \
31 __VA_ARGS__::pd_t>()),
32// clang-format off
33constexpr impl_list_item_t cpu_concat_impl_list[] = REG_CONCAT_P({
34 INSTANCE(simple_concat_t<f32>)
35 INSTANCE(simple_concat_t<u8>)
36 INSTANCE(simple_concat_t<s8>)
37 INSTANCE(simple_concat_t<s32>)
38 INSTANCE(simple_concat_t<bf16>)
39 INSTANCE(simple_concat_t<f16>)
40 INSTANCE(ref_concat_t)
41 nullptr,
42});
43// clang-format on
44#undef INSTANCE
45} // namespace
46
47const impl_list_item_t *
48cpu_engine_impl_list_t::get_concat_implementation_list() {
49 return cpu_concat_impl_list;
50}
51
52} // namespace cpu
53} // namespace impl
54} // namespace dnnl
55