1 | /******************************************************************************* |
2 | * Copyright 2019-2022 Intel Corporation |
3 | * Copyright 2022 Arm Ltd. and affiliates |
4 | * Copyright 2022 FUJITSU LIMITED |
5 | * |
6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
7 | * you may not use this file except in compliance with the License. |
8 | * You may obtain a copy of the License at |
9 | * |
10 | * http://www.apache.org/licenses/LICENSE-2.0 |
11 | * |
12 | * Unless required by applicable law or agreed to in writing, software |
13 | * distributed under the License is distributed on an "AS IS" BASIS, |
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
15 | * See the License for the specific language governing permissions and |
16 | * limitations under the License. |
17 | *******************************************************************************/ |
18 | |
19 | #include "cpu/cpu_engine.hpp" |
20 | |
21 | #include "cpu/ref_binary.hpp" |
22 | |
23 | #if DNNL_X64 |
24 | #include "cpu/x64/jit_uni_binary.hpp" |
25 | using namespace dnnl::impl::cpu::x64; |
26 | #elif DNNL_AARCH64 |
27 | #include "cpu/aarch64/jit_uni_binary.hpp" |
28 | #if DNNL_AARCH64_USE_ACL |
29 | #include "cpu/aarch64/acl_binary.hpp" |
30 | #endif |
31 | using namespace dnnl::impl::cpu::aarch64; |
32 | #endif |
33 | |
34 | namespace dnnl { |
35 | namespace impl { |
36 | namespace cpu { |
37 | |
38 | namespace { |
39 | using namespace dnnl::impl::data_type; |
40 | |
41 | // clang-format off |
42 | constexpr impl_list_item_t impl_list[] = REG_BINARY_P({ |
43 | CPU_INSTANCE_X64(jit_uni_binary_t) |
44 | CPU_INSTANCE_AARCH64(jit_uni_binary_t) |
45 | CPU_INSTANCE_AARCH64_ACL(acl_binary_t) |
46 | CPU_INSTANCE(ref_binary_t) |
47 | /* eol */ |
48 | nullptr, |
49 | }); |
50 | // clang-format on |
51 | } // namespace |
52 | |
53 | const impl_list_item_t *get_binary_impl_list(const binary_desc_t *desc) { |
54 | UNUSED(desc); |
55 | return impl_list; |
56 | } |
57 | |
58 | } // namespace cpu |
59 | } // namespace impl |
60 | } // namespace dnnl |
61 | |