Compute Library
 21.02
NEAccumulate.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016-2020 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_NEACCUMULATE_H
25 #define ARM_COMPUTE_NEACCUMULATE_H
26 
28 
29 #include <cstdint>
30 
31 namespace arm_compute
32 {
33 class ITensor;
34 
35 /** Basic function to run @ref NEAccumulateKernel
36  *
37  * @deprecated This function is deprecated and is intended to be removed in 21.05 release
38  *
39 */
41 {
42 public:
43  /** Default constructor */
44  NEAccumulate() = default;
45  /** Prevent instances of this class from being copied (As this class contains pointers) */
46  NEAccumulate(const NEAccumulate &) = delete;
47  /** Prevent instances of this class from being copied (As this class contains pointers) */
48  NEAccumulate &operator=(const NEAccumulate &) = delete;
49  /** Prevent instances of this class from being moved (As this class contains non movable objects) */
50  NEAccumulate(NEAccumulate &&) = delete;
51  /** Prevent instances of this class from being moved (As this class contains non movable objects) */
52  NEAccumulate &operator=(NEAccumulate &&) = delete;
53  /** Default destructor */
54  ~NEAccumulate();
55  /** Set the input and accumulation tensors
56  *
57  * @param[in] input Source tensor. Data type supported: U8.
58  * @param[out] output Destination tensor. Data type supported: S16.
59  */
60  void configure(const ITensor *input, ITensor *output);
61 };
62 
63 /** Basic function to run @ref NEAccumulateWeightedKernel
64  *
65  * @deprecated This function is deprecated and is intended to be removed in 21.05 release
66  *
67 */
69 {
70 public:
71  /** Default constructor */
72  NEAccumulateWeighted() = default;
73  /** Prevent instances of this class from being copied (As this class contains pointers) */
75  /** Prevent instances of this class from being copied (As this class contains pointers) */
77  /** Prevent instances of this class from being moved (As this class contains non movable objects) */
79  /** Prevent instances of this class from being moved (As this class contains non movable objects) */
81  /** Default destructor */
83  /** Set the input and accumulation tensors, and the scale value
84  *
85  * @param[in] input Source tensor. Data type supported: U8.
86  * @param[in] alpha The input scalar value with a value input the range of [0, 1.0]
87  * @param[in,out] output Accumulated tensor. Data type supported: U8.
88  * @param[in] use_fp16 (Optional) If true the FP16 kernels will be used. If false F32 kernels are used.
89  */
90  void configure(const ITensor *input, float alpha, ITensor *output, bool use_fp16 = false);
91 };
92 
93 /** Basic function to run @ref NEAccumulateSquaredKernel
94  *
95  * @deprecated This function is deprecated and is intended to be removed in 21.05 release
96  *
97 */
99 {
100 public:
101  /** Default constructor */
102  NEAccumulateSquared() = default;
103  /** Prevent instances of this class from being copied (As this class contains pointers) */
104  NEAccumulateSquared(const NEAccumulateSquared &) = delete;
105  /** Prevent instances of this class from being copied (As this class contains pointers) */
107  /** Prevent instances of this class from being moved (As this class contains non movable objects) */
109  /** Prevent instances of this class from being moved (As this class contains non movable objects) */
111  /** Default destructor */
113  /** Set the input and accumulation tensors and the shift value.
114  *
115  * @param[in] input Source tensor. Data type supported: U8.
116  * @param[in] shift The input with a value input the range of [0, 15]
117  * @param[in,out] output Accumulated tensor. Data type supported: S16.
118  */
119  void configure(const ITensor *input, uint32_t shift, ITensor *output);
120 };
121 } // namespace arm_compute
122 #endif /*ARM_COMPUTE_NEACCUMULATE_H */
Basic function to run NEAccumulateKernel.
Definition: NEAccumulate.h:40
Interface for Neon tensor.
Definition: ITensor.h:36
Copyright (c) 2017-2021 Arm Limited.
NEAccumulate & operator=(const NEAccumulate &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
NEAccumulate()=default
Default constructor.
Basic interface for functions which have a single Neon kernel and no border.
Basic function to run NEAccumulateWeightedKernel.
Definition: NEAccumulate.h:68
Basic function to run NEAccumulateSquaredKernel.
Definition: NEAccumulate.h:98
void configure(const ITensor *input, ITensor *output)
Set the input and accumulation tensors.
~NEAccumulate()
Default destructor.