updated readme file due to moving CMake scripts to the root folder
[platform/upstream/dldt.git] / inference-engine / thirdparty / mkl-dnn / src / cpu / cpu_concat.cpp
1 /*******************************************************************************
2 * Copyright 2017-2018 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 <assert.h>
18
19 #include "cpu_engine.hpp"
20 #include "cpu_memory.hpp"
21 #include "type_helpers.hpp"
22
23 #include "cpu/cpu_concat.hpp"
24 #include "cpu/ref_concat.hpp"
25 #include "cpu/simple_concat.hpp"
26
27 namespace mkldnn {
28 namespace impl {
29 namespace cpu {
30
31 using cpd_create_f = mkldnn::impl::engine_t::concat_primitive_desc_create_f;
32
33 namespace {
34 #define INSTANCE(...) __VA_ARGS__::pd_t::create
35 static const cpd_create_f cpu_concat_impl_list[] = {
36     INSTANCE(simple_concat_t<data_type::f32>),
37     INSTANCE(simple_concat_t<data_type::u8>),
38 #ifdef ENABLE_UNUSED_PRIM
39     INSTANCE(simple_concat_t<data_type::s8>),
40 #endif
41     INSTANCE(simple_concat_t<data_type::s32>),
42 #ifdef ENABLE_UNUSED_PRIM
43     INSTANCE(simple_concat_t<data_type::bf16>),
44 #endif
45     INSTANCE(ref_concat_t),
46     nullptr,
47 };
48 #undef INSTANCE
49 }
50
51 const cpd_create_f *cpu_engine_t::get_concat_implementation_list() const {
52     return cpu_concat_impl_list;
53 }
54
55 }
56 }
57 }