blob: e791b36382a718ef7e7d3d865c682dd527c67e48 [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 */
SiCong Li4e9f5682022-05-10 10:15:59 +010024#ifdef ENABLE_EXPERIMENTAL_DYNAMIC_FUSION
Giorgio Arena232c4522022-03-03 10:09:01 +000025
Michalis Spyroub1fcefd2022-06-15 19:02:28 +010026#ifndef ARM_COMPUTE_EXPERIMENTAL_DYNAMICFUSION_IMPL_COMPONENTS_CLFLOORKERNELCOMPONENT_H
27#define ARM_COMPUTE_EXPERIMENTAL_DYNAMICFUSION_IMPL_COMPONENTS_CLFLOORKERNELCOMPONENT_H
Giorgio Arena232c4522022-03-03 10:09:01 +000028
29#include "src/core/experimental/dynamic_fusion/ClKernelBuildingImpl/Common.h"
30
31namespace arm_compute
32{
33namespace experimental
34{
35namespace dynamic_fusion
36{
Michalis Spyroub1fcefd2022-06-15 19:02:28 +010037class ClFloorKernelComponent : public IClKernelComponent
Giorgio Arena232c4522022-03-03 10:09:01 +000038{
39public:
Mohammed Suhail Munshif67903b2022-07-04 13:36:14 +010040 /** Construct a new Cl Floor Kernel Component object
41 *
42 * @param blueprint Blueprint to which this component is added
43 * @param src Link to SRC tensor
44 * @param dst Link to DST tensor
45 *
46 * Support Level
47 * Data Type: F16, F32
48 * Tensor Shape: Any shape of arbitrary dimension >= 1 and <= 4
49 * Value Range: All
50 */
Michalis Spyroub1fcefd2022-06-15 19:02:28 +010051 ClFloorKernelComponent(ClKernelBlueprint *blueprint, const Link &src, const Link &dst)
52 : IClKernelComponent(blueprint), _src{ src }, _dst{ dst }
Giorgio Arena232c4522022-03-03 10:09:01 +000053 {
54 }
Gunes Bayir8a879832022-03-10 21:21:01 +000055
Giorgio Arena232c4522022-03-03 10:09:01 +000056 ComponentType get_component_type() const override;
57 std::set<std::string> get_headers_list() const override;
58 std::string get_component_code() const override;
Gunes Bayir8a879832022-03-10 21:21:01 +000059 Window get_window() const override;
Giorgio Arenabd44caa2022-03-15 13:45:15 +000060 CLBuildOptions generate_build_options() const override;
SiCong Li0a486cf2022-04-07 17:41:51 +010061 std::string generate_config_id() const override;
Giorgio Arena232c4522022-03-03 10:09:01 +000062
63 virtual std::vector<Link> get_links() const override
64 {
Michalis Spyroub1fcefd2022-06-15 19:02:28 +010065 return { _src, _dst };
Giorgio Arena232c4522022-03-03 10:09:01 +000066 }
67
SiCong Lib63b1192022-01-28 18:24:39 +000068 virtual TagLUT get_tag_lut(const SharedVarTable &vtable) const override;
69 virtual void allocate_shared_vars(SharedVarTable &vtable) const override;
Giorgio Arena232c4522022-03-03 10:09:01 +000070
71 virtual std::string name() const override
72 {
Michalis Spyroub1fcefd2022-06-15 19:02:28 +010073 return "floor_" + std::to_string(id());
Giorgio Arena232c4522022-03-03 10:09:01 +000074 }
75
76private:
Michalis Spyroub1fcefd2022-06-15 19:02:28 +010077 Link _src{};
Giorgio Arena232c4522022-03-03 10:09:01 +000078 Link _dst{};
79};
80
81} // namespace dynamic_fusion
82} // namespace experimental
83} // namespace arm_compute
Michalis Spyroub1fcefd2022-06-15 19:02:28 +010084#endif // ARM_COMPUTE_EXPERIMENTAL_DYNAMICFUSION_IMPL_COMPONENTS_CLFLOORKERNELCOMPONENT_H
Mohammed Suhail Munshif67903b2022-07-04 13:36:14 +010085#endif /* ENABLE_EXPERIMENTAL_DYNAMIC_FUSION */