ArmNN
 25.11
Loading...
Searching...
No Matches
OptionalBase Class Reference

OptionalBase is the common functionality between reference and non-reference optional types. More...

#include <Optional.hpp>

Inheritance diagram for OptionalBase:
[legend]

Public Member Functions

 OptionalBase () noexcept
bool has_value () const noexcept
 operator bool () const noexcept
 Conversion to bool, so can be used in if-statements and similar contexts expecting a bool.

Protected Member Functions

 OptionalBase (bool hasValue) noexcept

Protected Attributes

bool m_HasValue

Detailed Description

OptionalBase is the common functionality between reference and non-reference optional types.

Definition at line 45 of file Optional.hpp.

Constructor & Destructor Documentation

◆ OptionalBase() [1/2]

OptionalBase ( )
inlinenoexcept

Definition at line 48 of file Optional.hpp.

49 : m_HasValue{false}
50 {
51 }

References m_HasValue.

◆ OptionalBase() [2/2]

OptionalBase ( bool hasValue)
inlineprotectednoexcept

Definition at line 67 of file Optional.hpp.

68 : m_HasValue{hasValue}
69 {
70 }

References m_HasValue.

Member Function Documentation

◆ has_value()

bool has_value ( ) const
inlinenoexcept

Definition at line 53 of file Optional.hpp.

54 {
55 return m_HasValue;
56 }

References m_HasValue.

Referenced by ProfilingDetails::AddDetailsToString(), NetworkImpl::AddPrecompiledLayer(), NetworkImpl::AddTransposeConvolution2dLayer(), armnn::ClConvolution2dWorkloadValidate(), armnn::ClConvolution3dWorkloadValidate(), armnn::ClDepthwiseConvolutionWorkloadValidate(), armnn::ClFullyConnectedWorkloadValidate(), armnn::ClTransposeConvolution2dWorkloadValidate(), armnnOnnxParser::CreateConstTensorImpl(), armnn::ExtractJsonObjects(), LayerSupportHandle::IsConvolution2dSupported(), RefLayerSupport::IsConvolution2dSupported(), LayerSupportHandle::IsConvolution3dSupported(), RefLayerSupport::IsConvolution3dSupported(), LayerSupportHandle::IsDepthwiseConvolutionSupported(), RefLayerSupport::IsDepthwiseConvolutionSupported(), LayerSupportHandle::IsDilatedDepthwiseConvolutionSupported(), LayerSupportHandle::IsFullyConnectedSupported(), NeonLayerSupport::IsLayerSupported(), LayerSupportHandle::IsTransposeConvolution2dSupported(), RefLayerSupport::IsTransposeConvolution2dSupported(), armnn::NeonConvolution2dWorkloadValidate(), armnn::NeonConvolution3dWorkloadValidate(), armnn::NeonDepthwiseConvolutionWorkloadValidate(), armnn::NeonFullyConnectedWorkloadValidate(), armnn::NeonTransposeConvolution2dWorkloadValidate(), operator bool(), OptionalReferenceSwitch< std::is_reference< T >::value, T >::operator=(), OptionalReferenceSwitch< true, T >::operator=(), Optional< T >::operator==(), OptionalReferenceSwitch< std::is_reference< T >::value, T >::reset(), OptionalReferenceSwitch< std::is_reference< T >::value, T >::value(), OptionalReferenceSwitch< std::is_reference< T >::value, T >::value(), OptionalReferenceSwitch< true, T >::value(), and OptionalReferenceSwitch< true, T >::value().

◆ operator bool()

operator bool ( ) const
inlineexplicitnoexcept

Conversion to bool, so can be used in if-statements and similar contexts expecting a bool.

Note this is explicit so that it doesn't get implicitly converted to a bool in unwanted cases, for example "Optional<TypeA> == Optional<TypeB>" should not compile.

Definition at line 61 of file Optional.hpp.

62 {
63 return has_value();
64 }

References has_value().

Member Data Documentation

◆ m_HasValue


The documentation for this class was generated from the following file: