Xmipp
v3.23.11-Nereus
|
#include <xmipp_threads.h>
Public Member Functions | |
ThreadTaskDistributor (size_t nTasks, size_t bSize) | |
virtual | ~ThreadTaskDistributor () |
virtual void | reset () |
Public Member Functions inherited from ParallelTaskDistributor | |
ParallelTaskDistributor (size_t nTasks, size_t bSize) | |
virtual | ~ParallelTaskDistributor () |
void | clear () |
void | setBlockSize (size_t bSize) |
int | getBlockSize () const |
bool | getTasks (size_t &first, size_t &last) |
bool | setAssignedTasks (size_t tasks) |
Protected Member Functions | |
virtual void | lock () |
virtual void | unlock () |
virtual bool | distribute (size_t &first, size_t &last) |
Protected Attributes | |
Mutex | mutex |
Mutex to synchronize access to critical region. More... | |
Protected Attributes inherited from ParallelTaskDistributor | |
size_t | blockSize |
size_t | assignedTasks |
Additional Inherited Members | |
Public Attributes inherited from ParallelTaskDistributor | |
size_t | numberOfTasks |
This class is a concrete implementation of ParallelTaskDistributor for POSIX threads. It use mutex as the locking mechanism and distributes tasks from 0 to numberOfTasks.
Definition at line 451 of file xmipp_threads.h.
|
inline |
Definition at line 454 of file xmipp_threads.h.
|
inlinevirtual |
Definition at line 456 of file xmipp_threads.h.
|
protectedvirtual |
Implements ParallelTaskDistributor.
Reimplemented in MpiTaskDistributor.
Definition at line 346 of file xmipp_threads.cpp.
|
protectedvirtual |
Implements ParallelTaskDistributor.
Definition at line 336 of file xmipp_threads.cpp.
|
inlinevirtual |
Definition at line 465 of file xmipp_threads.h.
|
protectedvirtual |
Implements ParallelTaskDistributor.
Definition at line 341 of file xmipp_threads.cpp.
|
protected |
Mutex to synchronize access to critical region.
Definition at line 458 of file xmipp_threads.h.