ONE - On-device Neural Engine
Loading...
Searching...
No Matches
PALSub.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Samsung Electronics Co., Ltd. All Rights Reserved
3 * Copyright 2019 The TensorFlow Authors. All Rights Reserved.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef ONERT_MICRO_EXECUTE_PAL_SUB_H
19#define ONERT_MICRO_EXECUTE_PAL_SUB_H
20
21#include "PALSubCommon.h"
22#include "PALUtils.h"
23
24namespace onert_micro
25{
26namespace execute
27{
28namespace pal
29{
30
31OMStatus Sub(const core::ArithmeticQuantParams &params, const uint32_t flat_size,
32 const int8_t *input1_data, const int8_t *input2_data, int8_t *output_data)
33{
34 ElementWise(flat_size, params, input1_data, input2_data, output_data, SubFunc);
35 return Ok;
36}
37
38} // namespace pal
39} // namespace execute
40} // namespace onert_micro
41
42#endif // ONERT_MICRO_EXECUTE_PAL_MUL_H
int8_t SubFunc(int8_t x, int8_t y, const core::ArithmeticQuantParams &params)
OMStatus Sub(const core::BinaryArithmeticBroadcastParams &params, const int flat_size, const T *input1_data, const T *input2_data, T *output_data)
void ElementWise(const uint32_t size, const core::ArithmeticQuantParams &params, const T *input1_data, const T *input2_data, T *output_data, T(*binary_func)(T, T, const core::ArithmeticQuantParams &))