ArmNN
 22.05
MockPacketBuffer Class Reference

#include <ProfilingMocks.hpp>

Inheritance diagram for MockPacketBuffer:

Public Member Functions

 MockPacketBuffer (unsigned int maxSize)
 
 ~MockPacketBuffer ()
 
const unsigned char * GetReadableData () const override
 
unsigned int GetSize () const override
 
void MarkRead () override
 
void Commit (unsigned int size) override
 
void Release () override
 
unsigned char * GetWritableData () override
 
void Destroy () override
 

Detailed Description

Definition at line 176 of file ProfilingMocks.hpp.

Constructor & Destructor Documentation

◆ MockPacketBuffer()

MockPacketBuffer ( unsigned int  maxSize)
inline

Definition at line 179 of file ProfilingMocks.hpp.

180  : m_MaxSize(maxSize)
181  , m_Size(0)
182  , m_Data(std::make_unique<unsigned char[]>(m_MaxSize))
183  {}

◆ ~MockPacketBuffer()

~MockPacketBuffer ( )
inline

Definition at line 185 of file ProfilingMocks.hpp.

185 {}

Member Function Documentation

◆ Commit()

void Commit ( unsigned int  size)
inlineoverride

Definition at line 193 of file ProfilingMocks.hpp.

193 { m_Size = size; }

◆ Destroy()

void Destroy ( )
inlineoverride

Definition at line 199 of file ProfilingMocks.hpp.

199 {m_Data.reset(nullptr); m_Size = 0; m_MaxSize =0;}

◆ GetReadableData()

const unsigned char* GetReadableData ( ) const
inlineoverride

Definition at line 187 of file ProfilingMocks.hpp.

187 { return m_Data.get(); }

◆ GetSize()

unsigned int GetSize ( ) const
inlineoverride

Definition at line 189 of file ProfilingMocks.hpp.

189 { return m_Size; }

◆ GetWritableData()

unsigned char* GetWritableData ( )
inlineoverride

Definition at line 197 of file ProfilingMocks.hpp.

197 { return m_Data.get(); }

◆ MarkRead()

void MarkRead ( )
inlineoverride

Definition at line 191 of file ProfilingMocks.hpp.

191 { m_Size = 0; }

◆ Release()

void Release ( )
inlineoverride

Definition at line 195 of file ProfilingMocks.hpp.

195 { m_Size = 0; }

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