Go to the source code of this file.
|
template<typename CollectionType > |
bool | AreEqual (const CollectionType &lhs, const CollectionType &rhs) |
|
template<typename CollectionType > |
bool | Contains (const CollectionType &collection, const typename CollectionType::value_type &item) |
|
template<typename MapType > |
bool | Contains (const MapType &map, const typename MapType::key_type &key) |
|
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> |
bool | Compare (T a, T b, float tolerance=0.000001f) |
|
armnn::SubgraphView::InputSlots | CreateInputsFrom (armnn::Layer *layer, std::vector< unsigned int > ignoreSlots={}) |
|
armnn::SubgraphView::InputSlots | CreateInputsFrom (const std::vector< armnn::Layer * > &layers, std::vector< unsigned int > ignoreSlots={}) |
|
armnn::SubgraphView::OutputSlots | CreateOutputsFrom (const std::vector< armnn::Layer * > &layers) |
|
armnn::SubgraphView::SubgraphViewPtr | CreateSubgraphViewFrom (armnn::SubgraphView::InputSlots &&inputs, armnn::SubgraphView::OutputSlots &&outputs, armnn::SubgraphView::Layers &&layers) |
|
armnn::IBackendInternalUniquePtr | CreateBackendObject (const armnn::BackendId &backendId) |
|
armnn::TensorShape | MakeTensorShape (unsigned int batches, unsigned int channels, unsigned int height, unsigned int width, armnn::DataLayout layout) |
|
◆ AreEqual()
bool AreEqual |
( |
const CollectionType & |
lhs, |
|
|
const CollectionType & |
rhs |
|
) |
| |
Definition at line 27 of file CommonTestUtils.hpp.
29 if (lhs.size() != rhs.size())
34 auto lhs_it = std::find_if(lhs.begin(), lhs.end(), [&rhs](
auto& item)
36 return std::find(rhs.begin(), rhs.end(), item) == rhs.end();
39 return lhs_it == lhs.end();
◆ Compare()
bool Compare |
( |
T |
a, |
|
|
T |
b, |
|
|
float |
tolerance = 0.000001f |
|
) |
| |
|
inline |
Definition at line 58 of file CommonTestUtils.hpp.
65 return static_cast<bool>(a) ==
static_cast<bool>(b);
70 return std::fabs(
static_cast<float>(a) -
static_cast<float>(b)) <= tolerance;
References armnn::Boolean.
◆ Contains() [1/2]
bool Contains |
( |
const CollectionType & |
collection, |
|
|
const typename CollectionType::value_type & |
item |
|
) |
| |
Definition at line 44 of file CommonTestUtils.hpp.
46 return std::find(collection.begin(), collection.end(), item) != collection.end();
◆ Contains() [2/2]
bool Contains |
( |
const MapType & |
map, |
|
|
const typename MapType::key_type & |
key |
|
) |
| |
◆ CreateBackendObject()
◆ CreateInputsFrom() [1/2]
◆ CreateInputsFrom() [2/2]
Definition at line 31 of file CommonTestUtils.cpp.
35 for (
auto&& layer: layers)
37 for (
auto&& it = layer->BeginInputSlots(); it != layer->EndInputSlots(); ++it)
39 if (std::find(ignoreSlots.begin(), ignoreSlots.end(), it->GetSlotIndex()) != ignoreSlots.end())
45 result.push_back(&(*it));
◆ CreateOutputsFrom()
Definition at line 52 of file CommonTestUtils.cpp.
55 for (
auto && layer : layers)
57 for (
auto&& it = layer->BeginOutputSlots(); it != layer->EndOutputSlots(); ++it)
59 result.push_back(&(*it));
◆ CreateSubgraphViewFrom()
◆ MakeTensorShape()