| // Generated from logical_or.mod.py |
| // DO NOT EDIT |
| // clang-format off |
| #include "TestGenerated.h" |
| |
| namespace generated_tests::logical_or { |
| |
| void CreateModel(Model *model) { |
| OperandType type0(Type::TENSOR_BOOL8, {1, 1, 1, 4}); |
| // Phase 1, operands |
| auto input0 = model->addOperand(&type0); |
| auto input1 = model->addOperand(&type0); |
| auto output0 = model->addOperand(&type0); |
| // Phase 2, operations |
| model->addOperation(ANEURALNETWORKS_LOGICAL_OR, {input0, input1}, {output0}); |
| // Phase 3, inputs and outputs |
| model->identifyInputsAndOutputs( |
| {input0, input1}, |
| {output0}); |
| assert(model->isValid()); |
| } |
| |
| bool is_ignored(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace generated_tests::logical_or |
| namespace generated_tests::logical_or { |
| |
| void CreateModel_dynamic_output_shape(Model *model) { |
| OperandType type0(Type::TENSOR_BOOL8, {1, 1, 1, 4}); |
| OperandType type2(Type::TENSOR_BOOL8, {0, 0, 0, 0}); |
| // Phase 1, operands |
| auto input0 = model->addOperand(&type0); |
| auto input1 = model->addOperand(&type0); |
| auto output0 = model->addOperand(&type2); |
| // Phase 2, operations |
| model->addOperation(ANEURALNETWORKS_LOGICAL_OR, {input0, input1}, {output0}); |
| // Phase 3, inputs and outputs |
| model->identifyInputsAndOutputs( |
| {input0, input1}, |
| {output0}); |
| assert(model->isValid()); |
| } |
| |
| bool is_ignored_dynamic_output_shape(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace generated_tests::logical_or |
| namespace generated_tests::logical_or { |
| |
| void CreateModel_2(Model *model) { |
| OperandType type0(Type::TENSOR_BOOL8, {1, 1, 1, 4}); |
| OperandType type1(Type::TENSOR_BOOL8, {1, 1}); |
| // Phase 1, operands |
| auto input01 = model->addOperand(&type0); |
| auto input11 = model->addOperand(&type1); |
| auto output01 = model->addOperand(&type0); |
| // Phase 2, operations |
| model->addOperation(ANEURALNETWORKS_LOGICAL_OR, {input01, input11}, {output01}); |
| // Phase 3, inputs and outputs |
| model->identifyInputsAndOutputs( |
| {input01, input11}, |
| {output01}); |
| assert(model->isValid()); |
| } |
| |
| bool is_ignored_2(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace generated_tests::logical_or |
| namespace generated_tests::logical_or { |
| |
| void CreateModel_dynamic_output_shape_2(Model *model) { |
| OperandType type0(Type::TENSOR_BOOL8, {1, 1, 1, 4}); |
| OperandType type1(Type::TENSOR_BOOL8, {1, 1}); |
| OperandType type2(Type::TENSOR_BOOL8, {0, 0, 0, 0}); |
| // Phase 1, operands |
| auto input01 = model->addOperand(&type0); |
| auto input11 = model->addOperand(&type1); |
| auto output01 = model->addOperand(&type2); |
| // Phase 2, operations |
| model->addOperation(ANEURALNETWORKS_LOGICAL_OR, {input01, input11}, {output01}); |
| // Phase 3, inputs and outputs |
| model->identifyInputsAndOutputs( |
| {input01, input11}, |
| {output01}); |
| assert(model->isValid()); |
| } |
| |
| bool is_ignored_dynamic_output_shape_2(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace generated_tests::logical_or |