ArmNN
 20.02
Version Class Reference

#include <EncodeVersion.hpp>

Public Member Functions

 Version (uint32_t encodedValue)
 
 Version (uint32_t major, uint32_t minor, uint32_t patch)
 
uint32_t GetEncodedValue ()
 
uint32_t GetMajor ()
 
uint32_t GetMinor ()
 
uint32_t GetPatch ()
 
bool operator== (const Version &other) const
 
std::string ToString () const
 

Detailed Description

Definition at line 29 of file EncodeVersion.hpp.

Constructor & Destructor Documentation

◆ Version() [1/2]

Version ( uint32_t  encodedValue)
inline

Definition at line 32 of file EncodeVersion.hpp.

33  {
34  m_Major = (encodedValue >> 22) & 1023;
35  m_Minor = (encodedValue >> 12) & 1023;
36  m_Patch = encodedValue & 4095;
37  }

◆ Version() [2/2]

Version ( uint32_t  major,
uint32_t  minor,
uint32_t  patch 
)
inline

Definition at line 39 of file EncodeVersion.hpp.

39  :
40  m_Major(major),
41  m_Minor(minor),
42  m_Patch(patch)
43  {}

Member Function Documentation

◆ GetEncodedValue()

uint32_t GetEncodedValue ( )
inline

Definition at line 45 of file EncodeVersion.hpp.

References armnn::profiling::EncodeVersion().

Referenced by BOOST_AUTO_TEST_CASE(), main(), CommandHandler::Stop(), GatordMockService::WaitCommand(), and FileOnlyProfilingConnection::WritePacket().

46  {
47  return EncodeVersion(m_Major, m_Minor, m_Patch);
48  }
constexpr uint32_t EncodeVersion(uint32_t major, uint32_t minor, uint32_t patch)

◆ GetMajor()

uint32_t GetMajor ( )
inline

Definition at line 50 of file EncodeVersion.hpp.

Referenced by BOOST_AUTO_TEST_CASE().

50 { return m_Major; }

◆ GetMinor()

uint32_t GetMinor ( )
inline

Definition at line 51 of file EncodeVersion.hpp.

Referenced by BOOST_AUTO_TEST_CASE().

51 { return m_Minor; }

◆ GetPatch()

uint32_t GetPatch ( )
inline

Definition at line 52 of file EncodeVersion.hpp.

Referenced by BOOST_AUTO_TEST_CASE().

52 { return m_Patch; }

◆ operator==()

bool operator== ( const Version other) const
inline

Definition at line 54 of file EncodeVersion.hpp.

55  {
56  return m_Major == other.m_Major && m_Minor == other.m_Minor && m_Patch == other.m_Patch;
57  }

◆ ToString()

std::string ToString ( ) const
inline

Definition at line 59 of file EncodeVersion.hpp.

Referenced by armnn::profiling::operator<<().

60  {
61  constexpr char separator = '.';
62 
63  std::stringstream stringStream;
64  stringStream << m_Major << separator << m_Minor << separator << m_Patch;
65 
66  return stringStream.str();
67  }

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