ONE - On-device Neural Engine
Loading...
Searching...
No Matches
LogicalAnd.cpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 Samsung Electronics Co., Ltd. All Rights Reserved
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
17#include "core/OMUtils.h"
18#include "execute/OMUtils.h"
19
20#include "PALLogicalCommon.h"
21
22using namespace onert_micro::core;
23
25{
26
28{
29 const circle::Tensor *input1;
30 const circle::Tensor *input2;
31 const circle::Tensor *output;
32
33 OMRuntimeKernel rt_kernel;
34
35 TISOHeader(execute_args, &input1, &input2, &output, &rt_kernel);
36
37 auto input1_data = utils::castInputData<bool>(rt_kernel.inputs_data[0]);
38 auto input2_data = utils::castInputData<bool>(rt_kernel.inputs_data[1]);
39 auto output_data = utils::castOutputData<bool>(rt_kernel.outputs_data[0]);
40
41 const int flat_size = OMRuntimeShape(input1).flatSize();
42
43 return pal::LogicalCommon<pal::LogicalAndFn>(flat_size, input1_data, input2_data, output_data);
44}
45
46} // namespace onert_micro::execute
uint8_t * outputs_data[maxOutputSize]
OMStatus execute_kernel_CircleLogicalAnd(const OMExecuteArgs &execute_args)
OMStatus TISOHeader(const OMExecuteArgs &execute_args, const circle::Tensor **input1, const circle::Tensor **input2, const circle::Tensor **output, OMRuntimeKernel *runtime_kernel)
Definition OMUtils.cpp:240