NVBIO
|
A class implementing a multiple-buffered CPU pipeline thread
StageType | a class implementing the actual pipeline stage, must define the following interface: |
Definition at line 172 of file pipeline_inl.h.
#include <pipeline_inl.h>
Public Types | |
typedef StageType::argument_type | argument_type |
typedef StageType::return_type | return_type |
Public Methods | |
PipelineStageThread (StageType *stage, const uint32 buffers) | |
void | run () |
bool | fill () |
void * | fetch (const uint32 i) |
void | release (const uint32 i) |
Public Methods inherited from nvbio::priv::PipelineThreadBase | |
PipelineThreadBase () | |
virtual | ~PipelineThreadBase () |
void | add_dependency (PipelineThreadBase *dep) |
void | add_client () |
void | set_id (const uint32 id) |
Public Methods inherited from nvbio::Thread< PipelineThreadBase > | |
void | create () |
create the thread More... | |
void | join () |
join the thread More... | |
Public Methods inherited from nvbio::ThreadBase | |
ThreadBase () | |
~ThreadBase () | |
void | set_id (const uint32 id) |
uint32 | get_id () const |
void | create (void *(*func)(void *), void *arg) |
create the thread More... | |
void | join () |
join the thread More... | |
Public Members | |
StageType * | m_stage |
uint32 | m_buffers |
std::vector< return_type > | m_data |
return_type *volatile | m_data_ptr [64] |
uint32 volatile | m_data_id [64] |
uint32 volatile | m_count [64] |
volatile uint32 | m_counter |
float | m_time |
Public Members inherited from nvbio::priv::PipelineThreadBase | |
std::vector< PipelineThreadBase * > | m_deps |
uint32 | m_clients |
uint32 | m_id |
Static Public Members | |
static const uint32 | EMPTY_SLOT = uint32(-1) |
typedef StageType::argument_type nvbio::priv::PipelineStageThread< StageType >::argument_type |
Definition at line 176 of file pipeline_inl.h.
typedef StageType::return_type nvbio::priv::PipelineStageThread< StageType >::return_type |
Definition at line 177 of file pipeline_inl.h.
|
inline |
constructor
Definition at line 181 of file pipeline_inl.h.
|
inlinevirtual |
a client method to obtain the next loaded batch; once the client has finished using the sequence, it is responsible to call the release() method to signal completion NOTE: this function will poll until the next batch is available, or return NULL if finished
Reimplemented from nvbio::priv::PipelineThreadBase.
Definition at line 291 of file pipeline_inl.h.
|
inline |
fill the next batch
Definition at line 203 of file pipeline_inl.h.
|
inlinevirtual |
a client method to release a given input
Reimplemented from nvbio::priv::PipelineThreadBase.
Definition at line 312 of file pipeline_inl.h.
|
inlinevirtual |
run the thread
Reimplemented from nvbio::priv::PipelineThreadBase.
Definition at line 196 of file pipeline_inl.h.
|
static |
Definition at line 174 of file pipeline_inl.h.
uint32 nvbio::priv::PipelineStageThread< StageType >::m_buffers |
Definition at line 330 of file pipeline_inl.h.
uint32 volatile nvbio::priv::PipelineStageThread< StageType >::m_count[64] |
Definition at line 334 of file pipeline_inl.h.
volatile uint32 nvbio::priv::PipelineStageThread< StageType >::m_counter |
Definition at line 335 of file pipeline_inl.h.
std::vector<return_type> nvbio::priv::PipelineStageThread< StageType >::m_data |
Definition at line 331 of file pipeline_inl.h.
uint32 volatile nvbio::priv::PipelineStageThread< StageType >::m_data_id[64] |
Definition at line 333 of file pipeline_inl.h.
return_type* volatile nvbio::priv::PipelineStageThread< StageType >::m_data_ptr[64] |
Definition at line 332 of file pipeline_inl.h.
StageType* nvbio::priv::PipelineStageThread< StageType >::m_stage |
Definition at line 329 of file pipeline_inl.h.
float nvbio::priv::PipelineStageThread< StageType >::m_time |
Definition at line 336 of file pipeline_inl.h.