diff options
Diffstat (limited to 'src/armnn/layers')
-rw-r--r-- | src/armnn/layers/ConcatLayer.cpp | 3 | ||||
-rw-r--r-- | src/armnn/layers/PermuteLayer.hpp | 6 | ||||
-rw-r--r-- | src/armnn/layers/ReshapeLayer.hpp | 4 | ||||
-rw-r--r-- | src/armnn/layers/TransposeLayer.hpp | 6 |
4 files changed, 13 insertions, 6 deletions
diff --git a/src/armnn/layers/ConcatLayer.cpp b/src/armnn/layers/ConcatLayer.cpp index 5df5ec8de5..b51303b7ee 100644 --- a/src/armnn/layers/ConcatLayer.cpp +++ b/src/armnn/layers/ConcatLayer.cpp @@ -6,6 +6,7 @@ #include "LayerCloneBase.hpp" #include <armnn/TypesUtils.hpp> +#include <armnn/utility/PolymorphicDowncast.hpp> #include <backendsCommon/WorkloadData.hpp> #include <backendsCommon/WorkloadFactory.hpp> @@ -118,7 +119,7 @@ void ConcatLayer::CreateTensors(const FactoryType& factory) if (inputLayer.GetType() == LayerType::Concat) { // Continue with the substitution if the connected inputs are also concat layers - m_ConcatLayers.push(boost::polymorphic_downcast<ConcatLayer*>(&inputLayer)); + m_ConcatLayers.push(PolymorphicDowncast<ConcatLayer*>(&inputLayer)); } ++i; } diff --git a/src/armnn/layers/PermuteLayer.hpp b/src/armnn/layers/PermuteLayer.hpp index 4984cf26ee..f2057d48e9 100644 --- a/src/armnn/layers/PermuteLayer.hpp +++ b/src/armnn/layers/PermuteLayer.hpp @@ -6,6 +6,8 @@ #include "LayerWithParameters.hpp" +#include <armnn/utility/PolymorphicDowncast.hpp> + namespace armnn { @@ -45,7 +47,7 @@ public: bool IsInverse(const Layer& other) const { return (other.GetType() == LayerType::Permute) && - GetPermutation().IsInverse(boost::polymorphic_downcast<const PermuteLayer*>(&other)->GetPermutation()); + GetPermutation().IsInverse(PolymorphicDowncast<const PermuteLayer*>(&other)->GetPermutation()); } /// Indicates if the other layer received is equal to this one. @@ -54,7 +56,7 @@ public: bool IsEqual(const Layer& other) const { return (other.GetType() == LayerType::Permute) && - GetPermutation().IsEqual(boost::polymorphic_downcast<const PermuteLayer*>(&other)->GetPermutation()); + GetPermutation().IsEqual(PolymorphicDowncast<const PermuteLayer*>(&other)->GetPermutation()); } void Accept(ILayerVisitor& visitor) const override; diff --git a/src/armnn/layers/ReshapeLayer.hpp b/src/armnn/layers/ReshapeLayer.hpp index 4fd5c3e11d..5e0e883822 100644 --- a/src/armnn/layers/ReshapeLayer.hpp +++ b/src/armnn/layers/ReshapeLayer.hpp @@ -6,6 +6,8 @@ #include "LayerWithParameters.hpp" +#include <armnn/utility/PolymorphicDowncast.hpp> + namespace armnn { @@ -39,7 +41,7 @@ public: bool IsEqual(const Layer& other) const { return (other.GetType() == LayerType::Reshape) && - m_Param.m_TargetShape == boost::polymorphic_downcast<const ReshapeLayer*>(&other)->m_Param.m_TargetShape; + m_Param.m_TargetShape == PolymorphicDowncast<const ReshapeLayer*>(&other)->m_Param.m_TargetShape; } void Accept(ILayerVisitor& visitor) const override; diff --git a/src/armnn/layers/TransposeLayer.hpp b/src/armnn/layers/TransposeLayer.hpp index 4906bc9412..a668ce835e 100644 --- a/src/armnn/layers/TransposeLayer.hpp +++ b/src/armnn/layers/TransposeLayer.hpp @@ -6,6 +6,8 @@ #include "LayerWithParameters.hpp" +#include <armnn/utility/PolymorphicDowncast.hpp> + namespace armnn { @@ -43,7 +45,7 @@ public: bool IsInverse(const Layer& other) const { return (other.GetType() == LayerType::Transpose) && - GetPermutation().IsInverse(boost::polymorphic_downcast<const TransposeLayer*>(&other)->GetPermutation()); + GetPermutation().IsInverse(PolymorphicDowncast<const TransposeLayer*>(&other)->GetPermutation()); } /// Indicates if the other layer received is equal to this one. @@ -52,7 +54,7 @@ public: bool IsEqual(const Layer& other) const { return (other.GetType() == LayerType::Transpose) && - GetPermutation().IsEqual(boost::polymorphic_downcast<const TransposeLayer*>(&other)->GetPermutation()); + GetPermutation().IsEqual(PolymorphicDowncast<const TransposeLayer*>(&other)->GetPermutation()); } void Accept(ILayerVisitor& visitor) const override; |