Home | History | Annotate | Download | only in models
      1 // clang-format off
      2 // Generated file (from: logical_and.mod.py). Do not edit
      3 void CreateModel(Model *model) {
      4   OperandType type0(Type::TENSOR_BOOL8, {1, 1, 1, 4});
      5   // Phase 1, operands
      6   auto input0 = model->addOperand(&type0);
      7   auto input1 = model->addOperand(&type0);
      8   auto output0 = model->addOperand(&type0);
      9   // Phase 2, operations
     10   model->addOperation(ANEURALNETWORKS_LOGICAL_AND, {input0, input1}, {output0});
     11   // Phase 3, inputs and outputs
     12   model->identifyInputsAndOutputs(
     13     {input0, input1},
     14     {output0});
     15   assert(model->isValid());
     16 }
     17 
     18 inline bool is_ignored(int i) {
     19   static std::set<int> ignore = {};
     20   return ignore.find(i) != ignore.end();
     21 }
     22 
     23 void CreateModel_dynamic_output_shape(Model *model) {
     24   OperandType type0(Type::TENSOR_BOOL8, {1, 1, 1, 4});
     25   OperandType type2(Type::TENSOR_BOOL8, {0, 0, 0, 0});
     26   // Phase 1, operands
     27   auto input0 = model->addOperand(&type0);
     28   auto input1 = model->addOperand(&type0);
     29   auto output0 = model->addOperand(&type2);
     30   // Phase 2, operations
     31   model->addOperation(ANEURALNETWORKS_LOGICAL_AND, {input0, input1}, {output0});
     32   // Phase 3, inputs and outputs
     33   model->identifyInputsAndOutputs(
     34     {input0, input1},
     35     {output0});
     36   assert(model->isValid());
     37 }
     38 
     39 inline bool is_ignored_dynamic_output_shape(int i) {
     40   static std::set<int> ignore = {};
     41   return ignore.find(i) != ignore.end();
     42 }
     43 
     44 void CreateModel_2(Model *model) {
     45   OperandType type0(Type::TENSOR_BOOL8, {1, 1, 1, 4});
     46   OperandType type1(Type::TENSOR_BOOL8, {1, 1});
     47   // Phase 1, operands
     48   auto input01 = model->addOperand(&type0);
     49   auto input11 = model->addOperand(&type1);
     50   auto output01 = model->addOperand(&type0);
     51   // Phase 2, operations
     52   model->addOperation(ANEURALNETWORKS_LOGICAL_AND, {input01, input11}, {output01});
     53   // Phase 3, inputs and outputs
     54   model->identifyInputsAndOutputs(
     55     {input01, input11},
     56     {output01});
     57   assert(model->isValid());
     58 }
     59 
     60 inline bool is_ignored_2(int i) {
     61   static std::set<int> ignore = {};
     62   return ignore.find(i) != ignore.end();
     63 }
     64 
     65 void CreateModel_dynamic_output_shape_2(Model *model) {
     66   OperandType type0(Type::TENSOR_BOOL8, {1, 1, 1, 4});
     67   OperandType type1(Type::TENSOR_BOOL8, {1, 1});
     68   OperandType type2(Type::TENSOR_BOOL8, {0, 0, 0, 0});
     69   // Phase 1, operands
     70   auto input01 = model->addOperand(&type0);
     71   auto input11 = model->addOperand(&type1);
     72   auto output01 = model->addOperand(&type2);
     73   // Phase 2, operations
     74   model->addOperation(ANEURALNETWORKS_LOGICAL_AND, {input01, input11}, {output01});
     75   // Phase 3, inputs and outputs
     76   model->identifyInputsAndOutputs(
     77     {input01, input11},
     78     {output01});
     79   assert(model->isValid());
     80 }
     81 
     82 inline bool is_ignored_dynamic_output_shape_2(int i) {
     83   static std::set<int> ignore = {};
     84   return ignore.find(i) != ignore.end();
     85 }
     86 
     87