ArmNN
 24.02
PolymorphicDowncast.hpp File Reference
#include "Assert.hpp"
#include <armnn/Exceptions.hpp>
#include <memory>
#include <type_traits>
Include dependency graph for PolymorphicDowncast.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 armnn
 Copyright (c) 2021 ARM Limited and Contributors.
 
 armnn::utility
 

Macros

#define ARMNN_POLYMORPHIC_CAST_CHECK_METHOD(cond)   ARMNN_ASSERT(cond)
 
#define ARMNN_POLYMORPHIC_CAST_CHECK(cond)   ARMNN_POLYMORPHIC_CAST_CHECK_METHOD(cond)
 

Functions

template<class T1 , class T2 >
std::shared_ptr< T1 > StaticPointerCast (const std::shared_ptr< T2 > &sp)
 
template<class T1 , class T2 >
std::shared_ptr< T1 > DynamicPointerCast (const std::shared_ptr< T2 > &sp)
 
template<class T1 , class T2 >
T1 * StaticPointerCast (T2 *ptr)
 
template<class T1 , class T2 >
T1 * DynamicPointerCast (T2 *ptr)
 
template<typename DestType , typename SourceType >
DestType PolymorphicDowncast (SourceType *value)
 Polymorphic downcast for build in pointers only. More...
 
template<typename DestType , typename SourceType >
auto PolymorphicPointerDowncast (const SourceType &value)
 Polymorphic downcast for shared pointers and build in pointers. More...
 

Macro Definition Documentation

◆ ARMNN_POLYMORPHIC_CAST_CHECK

#define ARMNN_POLYMORPHIC_CAST_CHECK (   cond)    ARMNN_POLYMORPHIC_CAST_CHECK_METHOD(cond)

Definition at line 27 of file PolymorphicDowncast.hpp.

◆ ARMNN_POLYMORPHIC_CAST_CHECK_METHOD

#define ARMNN_POLYMORPHIC_CAST_CHECK_METHOD (   cond)    ARMNN_ASSERT(cond)

Definition at line 22 of file PolymorphicDowncast.hpp.