Associate mutexes with the fixedSizeDeque.
More...
#include <FixedSizeDequeWithMutexes.hpp>
|
| FixedSizeDequeWithMutexes (int maxEntries, int valuesPerEntry, LvArray::MemorySpace space) |
|
camp::resources::Event | emplaceFront (arrayView1d< T > array) |
|
camp::resources::Event | popFront (arrayView1d< T > array) |
|
void | emplaceFrontFromBack (FixedSizeDequeWithMutexes< T, INDEX_TYPE > &q2) |
|
void | emplaceBackFromFront (FixedSizeDequeWithMutexes< T, INDEX_TYPE > &q2) |
|
| FixedSizeDeque (IndexType maxEntries, IndexType valuesPerEntry, LvArray::MemorySpace space, camp::resources::Resource stream) |
|
bool | empty () const |
|
bool | full () const |
|
size_t | size () const |
|
size_t | capacity () const |
|
ArraySlice1DLarge | front () const |
|
ArraySlice1DLarge | next_front () const |
|
ArraySlice1DLarge | back () const |
|
ArraySlice1DLarge | next_back () const |
|
void | pop_front () |
| Removes first array of the queue.
|
|
void | pop_back () |
| Removes last array of the queue.
|
|
void | inc_front () |
| Add one array (uninitialized) at the front of the queue.
|
|
void | inc_back () |
| Add one array (uninitialized) at the end of the queue.
|
|
template<typename INDEX_TYPE2 > |
camp::resources::Event | emplace_front (const LvArray::ArraySlice< T const, 1, 0, INDEX_TYPE2 > &src) |
|
template<typename INDEX_TYPE2 > |
camp::resources::Event | emplace_back (const LvArray::ArraySlice< T const, 1, 0, INDEX_TYPE2 > &src) |
|
camp::resources::Resource | getStream () |
|
|
std::mutex | m_frontMutex |
| Mutex to protect access to the front.
|
|
std::mutex | m_backMutex |
| Mutex to protect access to the back.
|
|
std::mutex | m_popMutex |
| Mutex to prevent two simulteaneous pop (can be an issue for last one)
|
|
std::mutex | m_emplaceMutex |
| Mutex to prevent two simulteaneous emplace (can be an issue for last one)
|
|
std::condition_variable_any | m_notFullCond |
| Condition used to notify when queue is not full.
|
|
std::condition_variable_any | m_notEmptyCond |
| Condition used to notify when queue is not empty.
|
|
template<typename T, typename INDEX_TYPE>
class geos::FixedSizeDequeWithMutexes< T, INDEX_TYPE >
Associate mutexes with the fixedSizeDeque.
Definition at line 29 of file FixedSizeDequeWithMutexes.hpp.
◆ FixedSizeDequeWithMutexes()
template<typename T , typename INDEX_TYPE >
Create a fixed size double ended queue with associated mutexes and condition variables.
- Parameters
-
maxEntries | Maximum number of array to store in the queue. |
valuesPerEntry | Number of values in each array of the deque. |
space | Space used to store que queue. |
Definition at line 52 of file FixedSizeDequeWithMutexes.hpp.
◆ emplaceBackFromFront()
template<typename T , typename INDEX_TYPE >
◆ emplaceFront()
template<typename T , typename INDEX_TYPE >
Emplace on front from array with locks.
- Parameters
-
array | The array to emplace |
- Returns
- Event to sync with the memcpy.
Definition at line 66 of file FixedSizeDequeWithMutexes.hpp.
◆ emplaceFrontFromBack()
template<typename T , typename INDEX_TYPE >
◆ popFront()
template<typename T , typename INDEX_TYPE >
Pop from front to array with locks
- Parameters
-
array | The array to copy data into |
- Returns
- Event to sync with the memcpy.
Definition at line 91 of file FixedSizeDequeWithMutexes.hpp.
The documentation for this class was generated from the following file: