blob: c7da8bd3e86e509628bc9cdd084e9219c64e3f39 [file] [log] [blame]
Giorgio Arena232c4522022-03-03 10:09:01 +00001/*
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#if defined(ENABLE_EXPERIMENTAL_DYNAMIC_FUSION)
25
26#ifndef ARM_COMPUTE_EXPERIMENTAL_DYNAMICFUSION_IMPL_COMPONENTS_CLSTOREKERNELCOMPONENTS_H
27#define ARM_COMPUTE_EXPERIMENTAL_DYNAMICFUSION_IMPL_COMPONENTS_CLSTOREKERNELCOMPONENTS_H
28
29#include "src/core/experimental/dynamic_fusion/ClKernelBuildingImpl/Common.h"
30
31namespace arm_compute
32{
33namespace experimental
34{
35namespace dynamic_fusion
36{
37class ClStoreBlockBoundaryAwareKernelComponent : public IClKernelComponent
38{
39public:
Gunes Bayir8a879832022-03-10 21:21:01 +000040 ClStoreBlockBoundaryAwareKernelComponent(const ClKernelBlueprint *blueprint, const Link &src, const Link &dst)
41 : IClKernelComponent(blueprint), _src{ src }, _dst{ dst }
Giorgio Arena232c4522022-03-03 10:09:01 +000042 {
43 }
Giorgio Arenabd44caa2022-03-15 13:45:15 +000044 ComponentType get_component_type() const override;
45 std::string get_component_code() const override;
46 CLBuildOptions generate_build_options() const override;
Giorgio Arena232c4522022-03-03 10:09:01 +000047
48 virtual std::vector<Link> get_links() const override
49 {
50 return { _src, _dst };
51 }
52
53 virtual TagLUT allocate_vars(SharedVarTable &vtable) const override;
54
55 virtual std::string name() const override
56 {
57 return "";
58 }
59
60private:
61 Link _src{};
62 Link _dst{};
63};
64
Gunes Bayir16c56972022-03-28 21:32:33 +010065class ClStoreIndirectWidthSelectKernelComponent : public IClKernelComponent
66{
67public:
68 ClStoreIndirectWidthSelectKernelComponent(const ClKernelBlueprint *blueprint, const Link &src, const Link &dst)
69 : IClKernelComponent(blueprint), _src{ src }, _dst{ dst }
70 {
71 }
72 ComponentType get_component_type() const override;
73 std::string get_component_code() const override;
74 CLBuildOptions generate_build_options() const override;
75
76 virtual std::vector<Link> get_links() const override
77 {
78 return { _src, _dst };
79 }
80
81 virtual TagLUT allocate_vars(SharedVarTable &vtable) const override;
82
83 virtual std::string name() const override
84 {
85 return "";
86 }
87
88private:
89 Link _src{};
90 Link _dst{};
91};
92
Giorgio Arena232c4522022-03-03 10:09:01 +000093} // namespace dynamic_fusion
94} // namespace experimental
95} // namespace arm_compute
96#endif // ARM_COMPUTE_EXPERIMENTAL_DYNAMICFUSION_IMPL_COMPONENTS_CLSTOREKERNELCOMPONENTS_H
97
98#endif // defined(ENABLE_EXPERIMENTAL_DYNAMIC_FUSION)