1 /* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 
7     http://www.apache.org/licenses/LICENSE-2.0
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ==============================================================================*/
15 
16 #ifndef OptimizedComputer_hpp
17 #define OptimizedComputer_hpp
18 
19 #include <cmath>
20 #include <vector>
21 #include "backend/cpu/CPUFixedPoint.hpp"
22 
23 namespace MNN {
24 namespace Optimized {
25 void AveragePool(const uint8_t* input_data, const std::vector<int>& input_dims, int stride_width, int stride_height,
26                  int pad_width, int pad_height, int filter_width, int filter_height, int mOutputActivationMin,
27                  int mOutputActivationMax, uint8_t* output_data, const std::vector<int>& output_dims);
28 
29 void Logistic(const uint8_t* input_data, const std::vector<int>& input_dims, int32_t inputZeroPoint,
30               int32_t input_range_radius, int32_t input_multiplier, int input_left_shift, uint8_t* output_data,
31               const std::vector<int>& output_dims);
32 } // namespace Optimized
33 } // namespace MNN
34 #endif /* OptimizedComputer_hpp */
35