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/test/FunctionHeaderWrapper.h> // Declares the operator 10 #include <executorch/kernels/test/TestUtil.h> 11 #include <executorch/runtime/core/exec_aten/exec_aten.h> 12 #include <executorch/runtime/core/exec_aten/testing_util/tensor_factory.h> 13 #include <executorch/runtime/core/exec_aten/testing_util/tensor_util.h> 14 15 #include <gtest/gtest.h> 16 17 using namespace ::testing; 18 using exec_aten::Scalar; 19 using exec_aten::ScalarType; 20 using exec_aten::Tensor; 21 using torch::executor::testing::TensorFactory; 22 23 class OpwiseBitwiseAndTest : public OperatorTest { 24 protected: op_bitwise_and_scalar_out(const Tensor & self,const Scalar & other,Tensor & out)25 Tensor& op_bitwise_and_scalar_out( 26 const Tensor& self, 27 const Scalar& other, 28 Tensor& out) { 29 return torch::executor::aten::bitwise_and_outf(context_, self, other, out); 30 } 31 op_bitwise_and_tensor_out(const Tensor & self,const Tensor & other,Tensor & out)32 Tensor& op_bitwise_and_tensor_out( 33 const Tensor& self, 34 const Tensor& other, 35 Tensor& out) { 36 return torch::executor::aten::bitwise_and_outf(context_, self, other, out); 37 } 38 }; 39