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

Function CheckShape

src/armnnTfLiteParser/TfLiteParser.cpp:679–697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

677}
678
679bool CheckShape(const armnn::TensorShape& actual, const std::vector<int32_t>& expected)
680{
681 const unsigned int actualSize = actual.GetNumDimensions();
682 if (actualSize != expected.size())
683 {
684 return false;
685 }
686
687 for (unsigned int i = 0u; i < actualSize; i++)
688 {
689 if (expected[i] < 0 ||
690 actual[i] != static_cast<unsigned int>(expected[i]))
691 {
692 return false;
693 }
694 }
695
696 return true;
697}
698
699bool CheckShape(const armnn::TensorShape& actual, const armnn::TensorShape& expected)
700{

Callers 1

ParseReshapeMethod · 0.70

Calls 3

push_backMethod · 0.80
GetNumDimensionsMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected