GEOSX
Public Member Functions | List of all members
geos::FixedSizeDeque< T, INDEX_TYPE > Class Template Reference

Implement a double ended queue with fixed number of fixed size buffer to be stored. More...

#include <FixedSizeDeque.hpp>

Inheritance diagram for geos::FixedSizeDeque< T, INDEX_TYPE >:
Inheritance graph
[legend]

Public Member Functions

 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 ()
 

Detailed Description

template<typename T, typename INDEX_TYPE>
class geos::FixedSizeDeque< T, INDEX_TYPE >

Implement a double ended queue with fixed number of fixed size buffer to be stored.

Definition at line 28 of file FixedSizeDeque.hpp.

Constructor & Destructor Documentation

◆ FixedSizeDeque()

template<typename T , typename INDEX_TYPE >
geos::FixedSizeDeque< T, INDEX_TYPE >::FixedSizeDeque ( IndexType  maxEntries,
IndexType  valuesPerEntry,
LvArray::MemorySpace  space,
camp::resources::Resource  stream 
)
inline

Create a fixed size double ended queue.

Parameters
maxEntriesMaximum number of array to store in the queue.
valuesPerEntryNumber of values in each array of the deque.
spaceSpace used to store que queue.
streamCamp resource to perform the copies.

Definition at line 45 of file FixedSizeDeque.hpp.

Member Function Documentation

◆ back()

template<typename T , typename INDEX_TYPE >
ArraySlice1DLarge geos::FixedSizeDeque< T, INDEX_TYPE >::back ( ) const
inline
Returns
the last array of the queue

Definition at line 92 of file FixedSizeDeque.hpp.

◆ capacity()

template<typename T , typename INDEX_TYPE >
size_t geos::FixedSizeDeque< T, INDEX_TYPE >::capacity ( ) const
inline
Returns
the maximum number of array that can be store in the queue

Definition at line 72 of file FixedSizeDeque.hpp.

◆ emplace_back()

template<typename T , typename INDEX_TYPE >
template<typename INDEX_TYPE2 >
camp::resources::Event geos::FixedSizeDeque< T, INDEX_TYPE >::emplace_back ( const LvArray::ArraySlice< T const, 1, 0, INDEX_TYPE2 > &  src)
inline

Add one array (copy of src) at the end of the queue

Parameters
srcArray to emplace at the end of the queue
Returns
Event associated to the copy.

Definition at line 155 of file FixedSizeDeque.hpp.

◆ emplace_front()

template<typename T , typename INDEX_TYPE >
template<typename INDEX_TYPE2 >
camp::resources::Event geos::FixedSizeDeque< T, INDEX_TYPE >::emplace_front ( const LvArray::ArraySlice< T const, 1, 0, INDEX_TYPE2 > &  src)
inline

Add one array (copy of src) at the front of the queue

Parameters
srcArray to emplace at the front of the queue
Returns
Event associated to the copy.

Definition at line 140 of file FixedSizeDeque.hpp.

◆ empty()

template<typename T , typename INDEX_TYPE >
bool geos::FixedSizeDeque< T, INDEX_TYPE >::empty ( ) const
inline
Returns
true if the queue is empty

Definition at line 54 of file FixedSizeDeque.hpp.

◆ front()

template<typename T , typename INDEX_TYPE >
ArraySlice1DLarge geos::FixedSizeDeque< T, INDEX_TYPE >::front ( ) const
inline
Returns
the first array in the queue

Definition at line 78 of file FixedSizeDeque.hpp.

◆ full()

template<typename T , typename INDEX_TYPE >
bool geos::FixedSizeDeque< T, INDEX_TYPE >::full ( ) const
inline
Returns
true if the queue is full

Definition at line 60 of file FixedSizeDeque.hpp.

◆ getStream()

template<typename T , typename INDEX_TYPE >
camp::resources::Resource geos::FixedSizeDeque< T, INDEX_TYPE >::getStream ( )
inline

Getter for the associated stream.

Returns
the associated stream.

Definition at line 169 of file FixedSizeDeque.hpp.

◆ next_back()

template<typename T , typename INDEX_TYPE >
ArraySlice1DLarge geos::FixedSizeDeque< T, INDEX_TYPE >::next_back ( ) const
inline
Returns
the future last array of the queue when inc_back will be called

Definition at line 99 of file FixedSizeDeque.hpp.

◆ next_front()

template<typename T , typename INDEX_TYPE >
ArraySlice1DLarge geos::FixedSizeDeque< T, INDEX_TYPE >::next_front ( ) const
inline
Returns
the future first array in the queue after inc_front will be called

Definition at line 85 of file FixedSizeDeque.hpp.

◆ size()

template<typename T , typename INDEX_TYPE >
size_t geos::FixedSizeDeque< T, INDEX_TYPE >::size ( ) const
inline
Returns
the number of arrays stores in the queue

Definition at line 66 of file FixedSizeDeque.hpp.


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