1 /*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 * All rights reserved.
4 *
5 * This source code is licensed under the BSD-style license found in the
6 * LICENSE file in the root directory of this source tree.
7 */
8
9 #include <executorch/kernels/portable/cpu/pattern/logical_op.h>
10 #include <executorch/runtime/kernel/kernel_includes.h>
11 #include <cmath>
12
13 namespace torch {
14 namespace executor {
15 namespace native {
16 namespace {
17
logical_or(bool a,bool b)18 bool logical_or(bool a, bool b) {
19 return a || b;
20 }
21
22 } // namespace
23
logical_or_out(KernelRuntimeContext & ctx,const Tensor & a,const Tensor & b,Tensor & out)24 Tensor& logical_or_out(
25 KernelRuntimeContext& ctx,
26 const Tensor& a,
27 const Tensor& b,
28 Tensor& out) {
29 // @lint-ignore CLANGTIDY facebook-hte-CArray
30 static constexpr const char op_name[] = "logical_or.out";
31 return internal::logical_tensor_out<op_name>(logical_or, ctx, a, b, out);
32 }
33
34 } // namespace native
35 } // namespace executor
36 } // namespace torch
37