• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright 2020 Huawei Technologies Co., Ltd
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #ifndef MINDSPORE_NNACL_INT8_RELU_INT8_H_
17 #define MINDSPORE_NNACL_INT8_RELU_INT8_H_
18 
19 #include <math.h>
20 #include "nnacl/op_base.h"
21 #include "nnacl/errorcode.h"
22 #include "nnacl/int8/fixed_point.h"
23 #include "nnacl/int8/quantize.h"
24 
25 typedef struct ReluXQuantArg {
26   QuantArg input_arg;
27   QuantArg output_arg;
28   int input_multiplier_;
29   int left_shift_;
30   int right_shift_;
31   int quantized_output_min;
32   int quantized_output_max;
33 } ReluXQuantArg;
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 void ReluXInt8(const int8_t *src, int length, int8_t *dst, const ReluXQuantArg *arg);
39 #ifdef __cplusplus
40 }
41 #endif
42 
43 #endif  // MINDSPORE_NNACL_INT8_RELU_INT8_H_
44