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

Function CompareVector

src/backends/reference/test/RefPerAxisIteratorTests.cpp:17–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15
16template<typename T>
17void CompareVector(std::vector<T> vec1, std::vector<T> vec2)
18{
19 CHECK(vec1.size() == vec2.size());
20
21 bool mismatch = false;
22 for (uint32_t i = 0; i < vec1.size(); ++i)
23 {
24 if (vec1[i] != vec2[i])
25 {
26 MESSAGE(fmt::format("Vector value mismatch: index={} {} != {}",
27 i,
28 vec1[i],
29 vec2[i]));
30
31 mismatch = true;
32 }
33 }
34
35 if (mismatch)
36 {
37 FAIL("Error in CompareVector. Vectors don't match.");
38 }
39}
40
41using namespace armnn;
42

Callers 1

Calls 2

formatEnum · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected