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

Function ComputeWrappedIndex

src/armnnTfLiteParser/TfLiteParser.cpp:4606–4617  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4604}
4605
4606unsigned int ComputeWrappedIndex(int idx, unsigned int numDimsIn)
4607{
4608 int numDims = armnn::numeric_cast<int>(numDimsIn);
4609 int v = idx < 0 ? numDims + idx : idx;
4610
4611 if (v < 0 || v > numDims)
4612 {
4613 throw ParseException(fmt::format("Unable to compute index {}", CHECK_LOCATION().AsString()));
4614 }
4615
4616 return static_cast<unsigned int>(v);
4617}
4618
4619void TfLiteParserImpl::ParseSplitV(size_t subgraphIndex, size_t operatorIndex)
4620{

Callers 1

ParseSplitVMethod · 0.70

Calls 3

ParseExceptionClass · 0.85
formatEnum · 0.85
AsStringMethod · 0.45

Tested by

no test coverage detected