blob: 60bbd5933c13dd5a96010b5645d1aeb2383f3007 [file] [log] [blame]
Giorgio Arena5ae8d802021-11-18 18:02:13 +00001/*
2 * Copyright (c) 2021-2022 Arm Limited.
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24#ifndef ARM_COMPUTE_CPU_KERNEL_SELECTION_TYPES_H
25#define ARM_COMPUTE_CPU_KERNEL_SELECTION_TYPES_H
26
27#include "arm_compute/core/Types.h"
28#include "src/common/cpuinfo/CpuIsaInfo.h"
29
30namespace arm_compute
31{
32namespace cpu
33{
34namespace kernels
35{
36// Selector data types
37struct DataTypeISASelectorData
38{
Giorgio Arenad56d94d2022-02-07 16:19:55 +000039 DataType dt;
40 cpuinfo::CpuIsaInfo isa;
Giorgio Arena5ae8d802021-11-18 18:02:13 +000041};
42
43struct PoolDataTypeISASelectorData
44{
Giorgio Arenad56d94d2022-02-07 16:19:55 +000045 DataType dt;
46 DataLayout dl;
47 int pool_stride_x;
48 Size2D pool_size;
49 cpuinfo::CpuIsaInfo isa;
Giorgio Arena5ae8d802021-11-18 18:02:13 +000050};
51
Dana Zlotnik6a2df882022-01-17 09:54:26 +020052struct ElementwiseDataTypeISASelectorData
53{
54 DataType dt;
55 cpuinfo::CpuIsaInfo isa;
56 int op;
57};
58
Giorgio Arena5ae8d802021-11-18 18:02:13 +000059// Selector pointer types
Dana Zlotnik6a2df882022-01-17 09:54:26 +020060using DataTypeISASelectorPtr = std::add_pointer<bool(const DataTypeISASelectorData &data)>::type;
61using PoolDataTypeISASelectorPtr = std::add_pointer<bool(const PoolDataTypeISASelectorData &data)>::type;
62using ElementwiseDataTypeISASelectorPtr = std::add_pointer<bool(const ElementwiseDataTypeISASelectorData &data)>::type;
Giorgio Arena5ae8d802021-11-18 18:02:13 +000063
64} // namespace kernels
65} // namespace cpu
66} // namespace arm_compute
67
68#endif // ARM_COMPUTE_CPU_KERNEL_SELECTION_TYPES_H