ArmNN
 24.08
armnn::utility Namespace Reference

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)
 

Function Documentation

◆ DynamicPointerCast() [1/2]

std::shared_ptr<T1> armnn::utility::DynamicPointerCast ( const std::shared_ptr< T2 > &  sp)

Definition at line 44 of file PolymorphicDowncast.hpp.

45 {
46  return std::dynamic_pointer_cast<T1>(sp);
47 }

◆ DynamicPointerCast() [2/2]

T1* armnn::utility::DynamicPointerCast ( T2 *  ptr)
inline

Definition at line 58 of file PolymorphicDowncast.hpp.

59 {
60  return dynamic_cast<T1*>(ptr);
61 }

◆ StaticPointerCast() [1/2]

std::shared_ptr<T1> armnn::utility::StaticPointerCast ( const std::shared_ptr< T2 > &  sp)

Definition at line 37 of file PolymorphicDowncast.hpp.

38 {
39  return std::static_pointer_cast<T1>(sp);
40 }

◆ StaticPointerCast() [2/2]

T1* armnn::utility::StaticPointerCast ( T2 *  ptr)
inline

Definition at line 51 of file PolymorphicDowncast.hpp.

52 {
53  return static_cast<T1*>(ptr);
54 }