gem5  v20.1.0.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
tlm::circular_buffer< T > Class Template Reference

#include <circular_buffer.hh>

Public Member Functions

 circular_buffer (int size=0)
 
 ~circular_buffer ()
 
void resize (int size)
 
void clear ()
 
read ()
 
void write (const T &)
 
bool is_empty () const
 
bool is_full () const
 
int size () const
 
int used () const
 
int free () const
 
const T & read_data () const
 
const T & peek_data (int i) const
 
T & poke_data (int i)
 
void debug () const
 

Private Member Functions

void increment_write_pos (int i=1)
 
void increment_read_pos (int i=1)
 
void init ()
 
 circular_buffer (const circular_buffer< T > &b)
 
circular_buffer< T > & operator= (const circular_buffer< T > &)
 
void * buf_alloc (int size)
 
void buf_free (void *&buf)
 
void buf_write (void *buf, int n, const T &t)
 
T & buf_read (void *buf, int n) const
 
void buf_clear (void *buf, int n)
 

Private Attributes

int m_size
 
void * m_buf
 
int m_free
 
int m_used
 
int m_ri
 
int m_wi
 

Detailed Description

template<typename T>
class tlm::circular_buffer< T >

Definition at line 46 of file circular_buffer.hh.

Constructor & Destructor Documentation

◆ circular_buffer() [1/2]

template<typename T >
tlm::circular_buffer< T >::circular_buffer ( int  size = 0)
explicit

Definition at line 129 of file circular_buffer.hh.

◆ ~circular_buffer()

template<typename T >
tlm::circular_buffer< T >::~circular_buffer

Definition at line 146 of file circular_buffer.hh.

◆ circular_buffer() [2/2]

template<typename T >
tlm::circular_buffer< T >::circular_buffer ( const circular_buffer< T > &  b)
private

Member Function Documentation

◆ buf_alloc()

template<typename T >
void * tlm::circular_buffer< T >::buf_alloc ( int  size)
inlineprivate

Definition at line 230 of file circular_buffer.hh.

◆ buf_clear()

template<typename T >
void tlm::circular_buffer< T >::buf_clear ( void *  buf,
int  n 
)
inlineprivate

Definition at line 261 of file circular_buffer.hh.

◆ buf_free()

template<typename T >
void tlm::circular_buffer< T >::buf_free ( void *&  buf)
inlineprivate

Definition at line 237 of file circular_buffer.hh.

◆ buf_read()

template<typename T >
T & tlm::circular_buffer< T >::buf_read ( void *  buf,
int  n 
) const
inlineprivate

Definition at line 253 of file circular_buffer.hh.

◆ buf_write()

template<typename T >
void tlm::circular_buffer< T >::buf_write ( void *  buf,
int  n,
const T &  t 
)
inlineprivate

Definition at line 245 of file circular_buffer.hh.

◆ clear()

template<typename T >
void tlm::circular_buffer< T >::clear

Definition at line 136 of file circular_buffer.hh.

◆ debug()

template<typename T >
void tlm::circular_buffer< T >::debug

Definition at line 107 of file circular_buffer.hh.

◆ free()

template<typename T >
int tlm::circular_buffer< T >::free ( ) const
inline

Definition at line 80 of file circular_buffer.hh.

◆ increment_read_pos()

template<typename T >
void tlm::circular_buffer< T >::increment_read_pos ( int  i = 1)
private

Definition at line 221 of file circular_buffer.hh.

◆ increment_write_pos()

template<typename T >
void tlm::circular_buffer< T >::increment_write_pos ( int  i = 1)
private

Definition at line 212 of file circular_buffer.hh.

◆ init()

template<typename T >
void tlm::circular_buffer< T >::init
private

Definition at line 178 of file circular_buffer.hh.

◆ is_empty()

template<typename T >
bool tlm::circular_buffer< T >::is_empty ( ) const
inline

Definition at line 75 of file circular_buffer.hh.

◆ is_full()

template<typename T >
bool tlm::circular_buffer< T >::is_full ( ) const
inline

Definition at line 76 of file circular_buffer.hh.

◆ operator=()

template<typename T >
circular_buffer<T>& tlm::circular_buffer< T >::operator= ( const circular_buffer< T > &  )
private

◆ peek_data()

template<typename T >
const T& tlm::circular_buffer< T >::peek_data ( int  i) const
inline

Definition at line 84 of file circular_buffer.hh.

◆ poke_data()

template<typename T >
T& tlm::circular_buffer< T >::poke_data ( int  i)
inline

Definition at line 90 of file circular_buffer.hh.

◆ read()

template<typename T >
T tlm::circular_buffer< T >::read

Definition at line 192 of file circular_buffer.hh.

◆ read_data()

template<typename T >
const T& tlm::circular_buffer< T >::read_data ( ) const
inline

Definition at line 82 of file circular_buffer.hh.

◆ resize()

template<typename T >
void tlm::circular_buffer< T >::resize ( int  size)

Definition at line 154 of file circular_buffer.hh.

◆ size()

template<typename T >
int tlm::circular_buffer< T >::size ( ) const
inline

Definition at line 78 of file circular_buffer.hh.

◆ used()

template<typename T >
int tlm::circular_buffer< T >::used ( ) const
inline

Definition at line 79 of file circular_buffer.hh.

◆ write()

template<typename T >
void tlm::circular_buffer< T >::write ( const T &  t)

Definition at line 204 of file circular_buffer.hh.

Member Data Documentation

◆ m_buf

template<typename T >
void* tlm::circular_buffer< T >::m_buf
private

Definition at line 115 of file circular_buffer.hh.

◆ m_free

template<typename T >
int tlm::circular_buffer< T >::m_free
private

Definition at line 116 of file circular_buffer.hh.

◆ m_ri

template<typename T >
int tlm::circular_buffer< T >::m_ri
private

Definition at line 118 of file circular_buffer.hh.

◆ m_size

template<typename T >
int tlm::circular_buffer< T >::m_size
private

Definition at line 114 of file circular_buffer.hh.

◆ m_used

template<typename T >
int tlm::circular_buffer< T >::m_used
private

Definition at line 117 of file circular_buffer.hh.

◆ m_wi

template<typename T >
int tlm::circular_buffer< T >::m_wi
private

Definition at line 119 of file circular_buffer.hh.


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

Generated on Wed Sep 30 2020 14:03:13 for gem5 by doxygen 1.8.17