diff options
author | surmeh01 <surabhi.mehta@arm.com> | 2018-03-29 16:29:27 +0100 |
---|---|---|
committer | surmeh01 <surabhi.mehta@arm.com> | 2018-03-29 16:29:27 +0100 |
commit | bceff2fb3fc68bb0aa88b886900c34b77340c826 (patch) | |
tree | d867d3e090d58d3012dfbbac456e9ea8c7f789bc /src/armnn/Layer.cpp | |
parent | 4fcda0101ec3d110c1d6d7bee5c83416b645528a (diff) | |
download | armnn-bceff2fb3fc68bb0aa88b886900c34b77340c826.tar.gz |
Release 18.03
Diffstat (limited to 'src/armnn/Layer.cpp')
-rw-r--r-- | src/armnn/Layer.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/armnn/Layer.cpp b/src/armnn/Layer.cpp index 20a8ba4926..fcf0656aeb 100644 --- a/src/armnn/Layer.cpp +++ b/src/armnn/Layer.cpp @@ -18,7 +18,6 @@ namespace armnn void InputSlot::Insert(Layer& layer) { - BOOST_ASSERT(layer.GetNumInputSlots() <= 1); BOOST_ASSERT(layer.GetNumOutputSlots() == 1); OutputSlot* const prevSlot = GetConnectedOutputSlot(); @@ -115,11 +114,21 @@ void OutputSlot::ValidateConnectionIndex(unsigned int index) const } } +namespace { +LayerGuid GenerateLayerGuid() +{ + //Note: Not thread safe. + static LayerGuid newGuid=0; + return newGuid++; +} +} //namespace + Layer::Layer(unsigned int numInputSlots, unsigned int numOutputSlots, LayerType type, const char* name) : m_OutputHandlers(numOutputSlots) , m_LayerName(name ? name : "") , m_Type(type) , m_ComputeDevice(Compute::Undefined) +, m_Guid(GenerateLayerGuid()) { m_InputSlots.reserve(numInputSlots); for (unsigned int i = 0; i < numInputSlots; ++i) |