24.08
|
Go to the documentation of this file.
14 auto& ranges = m_GuidToRangesMap[layer->
GetGuid()];
18 if (numOfOutputSlots == 0)
22 if (ranges.size() < numOfOutputSlots)
24 ranges.resize(numOfOutputSlots);
26 ranges[outputIdx] = std::make_pair(min, max);
31 auto search = m_GuidToRangesMap.find(guid);
32 if (search == m_GuidToRangesMap.end())
36 throw armnn::Exception(
"Have no entry for layer GUID [" + std::to_string(guid) +
"]");
40 return DefaultRange();
43 return search->second.at(idx);
48 auto& currentMin = m_GuidToRangesMap.find(guid)->second.at(idx).first;
49 if (newMin < currentMin)
57 auto& currentMax = m_GuidToRangesMap.find(guid)->second.at(idx).second;
58 if (newMax > currentMax)
66 auto minMaxPair = m_GuidToRangesMap.find(guid);
67 auto& currentMin = minMaxPair->second.at(idx).first;
68 auto& currentMax = minMaxPair->second.at(idx).second;
76 m_GuidToRangesMap.clear();
virtual LayerGuid GetGuid() const =0
Returns the unique id of the layer.
virtual unsigned int GetNumOutputSlots() const =0
Returns the number of connectable output slots.
std::pair< float, float > MinMaxRange
void RefineMax(LayerGuid guid, unsigned int slotIndex, float newMax)
Update max in RangeTracker with new_max if it is greater than current value.
void RefineMin(LayerGuid guid, unsigned int slotIndex, float newMin)
Update min in RangeTracker with new_min if it is lower than current value.
Base class for all ArmNN exceptions so that users can filter to just those.
MinMaxRange GetRange(LayerGuid guid, unsigned int idx) const
Retrieve the Range for a particular output slot on a particular layer.
arm::pipe::ProfilingGuid LayerGuid
Define LayerGuid type.
bool IsInDynamicMode() const
void SetRange(const IConnectableLayer *layer, unsigned int outputIdx, float min, float max)
Set the range for an output slot on a layer.
Copyright (c) 2021 ARM Limited and Contributors.
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
void ResetMinMax(LayerGuid guid, unsigned int idx, float newMin, float newMax)
Overwrite min and max in RangeTracker with newMin and newMax.