4template <
typename Type,
size_t MaxSize>
17 void reset() __attribute__((always_inline))
24 void push_back(
const Type datum) __attribute__((flatten))
33 Type
operator[] (
const size_t index)
const __attribute__((always_inline))
35 return buffer[index % MaxSize];
Definition: simpler_circular_buffer.hpp:6
Type buffer[MaxSize]
Definition: simpler_circular_buffer.hpp:10
size_t tail
Index / Pointer of the first element of the buffer.
Definition: simpler_circular_buffer.hpp:12
Type operator[](const size_t index) const __attribute__((always_inline))
Random access operator can be used to retrive the nth element in the buffer at any state of the buffe...
Definition: simpler_circular_buffer.hpp:33
void reset() __attribute__((always_inline))
Index / Pointer to the last element of the buffer.
Definition: simpler_circular_buffer.hpp:17
size_t head
Fixed Size Buffer.
Definition: simpler_circular_buffer.hpp:11
void push_back(const Type datum) __attribute__((flatten))
Adds a datum to the circular buffer.
Definition: simpler_circular_buffer.hpp:24