Giorgio Arena | 232c452 | 2022-03-03 10:09:01 +0000 | [diff] [blame] | 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 | #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 | |
| 31 | namespace arm_compute |
| 32 | { |
| 33 | namespace experimental |
| 34 | { |
| 35 | namespace dynamic_fusion |
| 36 | { |
| 37 | class ClStoreBlockBoundaryAwareKernelComponent : public IClKernelComponent |
| 38 | { |
| 39 | public: |
Gunes Bayir | 8a87983 | 2022-03-10 21:21:01 +0000 | [diff] [blame] | 40 | ClStoreBlockBoundaryAwareKernelComponent(const ClKernelBlueprint *blueprint, const Link &src, const Link &dst) |
| 41 | : IClKernelComponent(blueprint), _src{ src }, _dst{ dst } |
Giorgio Arena | 232c452 | 2022-03-03 10:09:01 +0000 | [diff] [blame] | 42 | { |
| 43 | } |
Giorgio Arena | bd44caa | 2022-03-15 13:45:15 +0000 | [diff] [blame] | 44 | ComponentType get_component_type() const override; |
| 45 | std::string get_component_code() const override; |
| 46 | CLBuildOptions generate_build_options() const override; |
Giorgio Arena | 232c452 | 2022-03-03 10:09:01 +0000 | [diff] [blame] | 47 | |
| 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 | |
| 60 | private: |
| 61 | Link _src{}; |
| 62 | Link _dst{}; |
| 63 | }; |
| 64 | |
Gunes Bayir | 16c5697 | 2022-03-28 21:32:33 +0100 | [diff] [blame^] | 65 | class ClStoreIndirectWidthSelectKernelComponent : public IClKernelComponent |
| 66 | { |
| 67 | public: |
| 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 | |
| 88 | private: |
| 89 | Link _src{}; |
| 90 | Link _dst{}; |
| 91 | }; |
| 92 | |
Giorgio Arena | 232c452 | 2022-03-03 10:09:01 +0000 | [diff] [blame] | 93 | } // 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) |