1ec8e1c71d11f7b5abe306e0c9c6af7da755bd46bI-Jui (Ray) Sung// Generated file (from: hashtable_lookup_quant8.mod.py). Do not edit
2608124c8a4bc3a5385694d74f0b2f2a6ce5d6292I-Jui (Ray) Sungvoid CreateModel(Model *model) {
37da2c9a54b25fd15546d6f99eba06dff1ac9a862Yang Ni  OperandType type1(Type::TENSOR_INT32, {3});
47da2c9a54b25fd15546d6f99eba06dff1ac9a862Yang Ni  OperandType type0(Type::TENSOR_INT32, {4});
545bf79e5b9fee354fde7c1f64417d9ca4a1da7daMiao Wang  OperandType type2(Type::TENSOR_QUANT8_ASYMM, {3, 2}, 0.5f, 0);
645bf79e5b9fee354fde7c1f64417d9ca4a1da7daMiao Wang  OperandType type3(Type::TENSOR_QUANT8_ASYMM, {4, 2}, 0.5f, 0);
77da2c9a54b25fd15546d6f99eba06dff1ac9a862Yang Ni  OperandType type4(Type::TENSOR_QUANT8_ASYMM, {4}, 1.f, 0);
8608124c8a4bc3a5385694d74f0b2f2a6ce5d6292I-Jui (Ray) Sung  // Phase 1, operands
9608124c8a4bc3a5385694d74f0b2f2a6ce5d6292I-Jui (Ray) Sung  auto lookup = model->addOperand(&type0);
10608124c8a4bc3a5385694d74f0b2f2a6ce5d6292I-Jui (Ray) Sung  auto key = model->addOperand(&type1);
11608124c8a4bc3a5385694d74f0b2f2a6ce5d6292I-Jui (Ray) Sung  auto value = model->addOperand(&type2);
12608124c8a4bc3a5385694d74f0b2f2a6ce5d6292I-Jui (Ray) Sung  auto output = model->addOperand(&type3);
137da2c9a54b25fd15546d6f99eba06dff1ac9a862Yang Ni  auto hits = model->addOperand(&type4);
14608124c8a4bc3a5385694d74f0b2f2a6ce5d6292I-Jui (Ray) Sung  // Phase 2, operations
157da2c9a54b25fd15546d6f99eba06dff1ac9a862Yang Ni  model->addOperation(ANEURALNETWORKS_HASHTABLE_LOOKUP, {lookup, key, value}, {output, hits});
16608124c8a4bc3a5385694d74f0b2f2a6ce5d6292I-Jui (Ray) Sung  // Phase 3, inputs and outputs
1766d5cb6e3a90aefc8d545f6369080ab88de9d667Jean-Luc Brouillet  model->identifyInputsAndOutputs(
18608124c8a4bc3a5385694d74f0b2f2a6ce5d6292I-Jui (Ray) Sung    {lookup, key, value},
19608124c8a4bc3a5385694d74f0b2f2a6ce5d6292I-Jui (Ray) Sung    {output, hits});
20608124c8a4bc3a5385694d74f0b2f2a6ce5d6292I-Jui (Ray) Sung  assert(model->isValid());
21608124c8a4bc3a5385694d74f0b2f2a6ce5d6292I-Jui (Ray) Sung}
22ec8e1c71d11f7b5abe306e0c9c6af7da755bd46bI-Jui (Ray) Sung
23ec8e1c71d11f7b5abe306e0c9c6af7da755bd46bI-Jui (Ray) Sungbool is_ignored(int i) {
24ec8e1c71d11f7b5abe306e0c9c6af7da755bd46bI-Jui (Ray) Sung  static std::set<int> ignore = {};
25ec8e1c71d11f7b5abe306e0c9c6af7da755bd46bI-Jui (Ray) Sung  return ignore.find(i) != ignore.end();
26ec8e1c71d11f7b5abe306e0c9c6af7da755bd46bI-Jui (Ray) Sung}
27