warpcore 0.0.1
Hashing at the Speed of Light on modern CUDA-accelerators
warpcore::storage::CyclicStore< T > Class Template Reference

thread-safe device-sided ring buffer without any overflow checks More...

Public Types

using base_type = T
 
using index_type = index_t
 
using status_type = Status
 

Public Member Functions

__host__ CyclicStore (const index_type capacity) noexcept
 constructor More...
 
__host____device__ CyclicStore (const CyclicStore &o) noexcept
 copy-constructor (shallow) More...
 
__host__ CyclicStore (CyclicStore &&o) noexcept
 move-constructor More...
 
__host__ ~CyclicStore () noexcept
 destructor More...
 
__host__ T * get () const noexcept
 atomically fetches the next slot in the buffer More...
 
__host__ status_type status () const noexcept
 get buffer status More...
 
__host__ index_type capacity () const noexcept
 get buffer capacity More...
 
__host__ index_type bytes_total () const noexcept
 get the total number of bytes occupied by this data structure More...
 

Detailed Description

template<class T>
class warpcore::storage::CyclicStore< T >

thread-safe device-sided ring buffer without any overflow checks

Template Parameters
Tbase type

Definition at line 16 of file storage.cuh.

Member Typedef Documentation

◆ base_type

template<class T >
using warpcore::storage::CyclicStore< T >::base_type = T

Definition at line 19 of file storage.cuh.

◆ index_type

template<class T >
using warpcore::storage::CyclicStore< T >::index_type = index_t

Definition at line 20 of file storage.cuh.

◆ status_type

template<class T >
using warpcore::storage::CyclicStore< T >::status_type = Status

Definition at line 21 of file storage.cuh.

Constructor & Destructor Documentation

◆ CyclicStore() [1/3]

template<class T >
__host__ warpcore::storage::CyclicStore< T >::CyclicStore ( const index_type  capacity)
inlineexplicitnoexcept

constructor

Parameters
[in]capacitybuffer capacity

Definition at line 27 of file storage.cuh.

◆ CyclicStore() [2/3]

template<class T >
__host____device__ warpcore::storage::CyclicStore< T >::CyclicStore ( const CyclicStore< T > &  o)
inlinenoexcept

copy-constructor (shallow)

Parameters
[in]objectto be copied

Definition at line 59 of file storage.cuh.

◆ CyclicStore() [3/3]

template<class T >
__host__ warpcore::storage::CyclicStore< T >::CyclicStore ( CyclicStore< T > &&  o)
inlinenoexcept

move-constructor

Parameters
[in]objectto be moved

Definition at line 71 of file storage.cuh.

◆ ~CyclicStore()

template<class T >
__host__ warpcore::storage::CyclicStore< T >::~CyclicStore ( )
inlinenoexcept

destructor

Definition at line 85 of file storage.cuh.

Member Function Documentation

◆ bytes_total()

template<class T >
__host__ index_type warpcore::storage::CyclicStore< T >::bytes_total ( ) const
inlinenoexcept

get the total number of bytes occupied by this data structure

Returns
bytes

Definition at line 136 of file storage.cuh.

◆ capacity()

template<class T >
__host__ index_type warpcore::storage::CyclicStore< T >::capacity ( ) const
inlinenoexcept

get buffer capacity

Returns
capacity

Definition at line 127 of file storage.cuh.

◆ get()

template<class T >
__host__ T* warpcore::storage::CyclicStore< T >::get ( ) const
inlinenoexcept

atomically fetches the next slot in the buffer

Returns
pointer to the next slot in the buffer \info const on purpose

Definition at line 100 of file storage.cuh.

◆ status()

template<class T >
__host__ status_type warpcore::storage::CyclicStore< T >::status ( ) const
inlinenoexcept

get buffer status

Returns
status

Definition at line 118 of file storage.cuh.


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