MCPcopy Create free account
hub / github.com/ARM-software/armnn / GetOpCode

Function GetOpCode

src/armnnTfLiteParser/TfLiteParser.cpp:283–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281
282
283tflite::BuiltinOperator GetOpCode(const TfLiteParserImpl::ModelPtr& model, size_t subgraphIndex, size_t operatorIndex)
284{
285 const auto& operatorPtr = model->subgraphs[subgraphIndex]->operators[operatorIndex];
286 auto opcodeIndex = operatorPtr->opcode_index;
287
288// work around the introduction of the deprecated_builtin_code introduced in 2.4 in a backwards compatible manner
289#if defined(ARMNN_POST_TFLITE_2_3)
290 auto opcode = std::max(model->operator_codes[opcodeIndex]->builtin_code,
291 static_cast<tflite::BuiltinOperator>(model->operator_codes[opcodeIndex]->deprecated_builtin_code));
292#else
293 auto opcode = model->operator_codes[opcodeIndex]->builtin_code;
294#endif
295 return opcode;
296}
297
298std::vector<unsigned int> GetUIntBuffer(armnn::TensorInfo info,
299 const TfLiteParserImpl::ModelPtr& model,

Callers 1

ParsePadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected