Compute Library
 22.08
ClKernelDescriptors.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 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 #ifdef ENABLE_EXPERIMENTAL_DYNAMIC_FUSION
25 #ifndef ARM_COMPUTE_EXPERIMENTAL_DYNAMICFUSION_CLKERNELDESCRIPTORS_H
26 #define ARM_COMPUTE_EXPERIMENTAL_DYNAMICFUSION_CLKERNELDESCRIPTORS_H
27 
29 
30 namespace arm_compute
31 {
32 namespace experimental
33 {
34 namespace dynamic_fusion
35 {
37 {
39  {
40  return desc0.conv2d == desc1.conv2d;
41  }
43 };
44 
46 {
48  {
49  return desc0.eltwise == desc1.eltwise;
50  }
52 };
53 
55 {
56  friend bool operator==(const ClFloorKernelDescriptor &desc0, const ClFloorKernelDescriptor &desc1)
57  {
58  return desc0.floor == desc1.floor;
59  }
60  FloorDescriptor floor{};
61 };
62 
64 {
66  {
67  return true;
68  }
69 };
70 
71 enum class ClippingStrategy
72 {
73  TOP_LEFT,
74  TOP_RIGHT,
77 };
78 /** Component: Store */
80 {
81  Size2D tile_dims{};
82  Size2D boundaries{};
84 
86  {
87  }
88 
89  TileDescriptor(Size2D dims, const Size2D &bound, const ClippingStrategy &clip)
90  : tile_dims(dims), boundaries(bound), clipping(clip)
91  {
92  }
93 
94  bool empty() const
95  {
96  return (tile_dims.area() == 0) || (boundaries.area() == 0);
97  }
98  friend bool operator==(const TileDescriptor &tile0, const TileDescriptor &tile1)
99  {
100  return tile0.tile_dims == tile1.tile_dims && tile0.boundaries == tile1.boundaries && tile0.clipping == tile1.clipping;
101  }
102 };
103 enum class StoreType
104 {
105  VStore,
107  StoreRow,
109  StoreBlock,
116 };
117 } // namespace dynamic_fusion
118 } // namespace experimental
119 } // namespace arm_compute
120 #endif //ARM_COMPUTE_EXPERIMENTAL_DYNAMICFUSION_CLKERNELDESCRIPTORS_H
121 #endif /* ENABLE_EXPERIMENTAL_DYNAMIC_FUSION */
TileDescriptor(Size2D dims, const Size2D &bound, const ClippingStrategy &clip)
friend bool operator==(const ClDirectConv2dKernelDescriptor &desc0, const ClDirectConv2dKernelDescriptor &desc1)
friend bool operator==(const TileDescriptor &tile0, const TileDescriptor &tile1)
Copyright (c) 2017-2022 Arm Limited.
friend bool operator==(const ClActivationKernelDescriptor &, const ClActivationKernelDescriptor &)
friend bool operator==(const ClElementwiseKernelDescriptor &desc0, const ClElementwiseKernelDescriptor &desc1)
friend bool operator==(const ClFloorKernelDescriptor &desc0, const ClFloorKernelDescriptor &desc1)
Descriptor for Elementwise binary operation.
Descriptor for Conv2dDescriptor operation.
Class for specifying the size of an image or rectangle.
Definition: Size2D.h:34