#include <kaldi-thread.h>
Classes | |
struct | RunTaskArgsList |
Public Member Functions | |
TaskSequencer (const TaskSequencerConfig &config) | |
void | Run (C *c) |
This function takes ownership of the pointer "c", and will delete it in the same sequence as Run was called on the jobs. More... | |
void | Wait () |
~TaskSequencer () | |
The destructor waits for the last thread to exit. More... | |
Static Private Member Functions | |
static void | RunTask (RunTaskArgsList *args) |
Private Attributes | |
int32 | num_threads_ |
Semaphore | threads_avail_ |
Semaphore | tot_threads_avail_ |
RunTaskArgsList * | thread_list_ |
Definition at line 175 of file kaldi-thread.h.
|
inline |
Definition at line 177 of file kaldi-thread.h.
References KALDI_ASSERT, TaskSequencerConfig::num_threads, and TaskSequencerConfig::num_threads_total.
|
inline |
The destructor waits for the last thread to exit.
Definition at line 221 of file kaldi-thread.h.
|
inline |
This function takes ownership of the pointer "c", and will delete it in the same sequence as Run was called on the jobs.
Definition at line 190 of file kaldi-thread.h.
References MultiThreadable::num_threads_.
Referenced by IvectorExtractor::ComputeDerivedVars(), kaldi::nnet2::LimitRankParallel(), main(), kaldi::ProcessUtterance(), kaldi::TestTaskSequencer(), IvectorExtractorStats::UpdateProjections(), and IvectorExtractorStats::UpdateWeights().
|
inlinestaticprivate |
Definition at line 234 of file kaldi-thread.h.
References TaskSequencer< C >::RunTaskArgsList::c, KALDI_ASSERT, TaskSequencer< C >::RunTaskArgsList::me, Semaphore::Signal(), TaskSequencer< C >::RunTaskArgsList::tail, TaskSequencer< C >::RunTaskArgsList::thread, TaskSequencer< C >::threads_avail_, and TaskSequencer< C >::tot_threads_avail_.
|
inline |
|
private |
Definition at line 272 of file kaldi-thread.h.
|
private |
Definition at line 279 of file kaldi-thread.h.
|
private |
Definition at line 274 of file kaldi-thread.h.
Referenced by TaskSequencer< C >::RunTask().
|
private |
Definition at line 277 of file kaldi-thread.h.
Referenced by TaskSequencer< C >::RunTask().