|
| | Threads (int size=0) |
| |
|
int | size () const |
| | Returns number of workers.
|
| |
|
void | resize (int n) |
| | Resize number of workers.
|
| |
|
void | start (bool joinAll=true) |
| | Start all worker threads.
|
| |
|
void | join () |
| | Join all worker threads.
|
| |
|
Worker & | worker (int i) |
| | Get a worker.
|
| |
|
Thread & | thread (int i) |
| | Get a worker thread.
|
| |
|
ThreadFunction & | function (int i) |
| | Get a worker thread function.
|
| |
| template<class T > |
| double | range (T max, T min=T(0)) |
| | Get worker sub-interval range of a full interval [min, max) More...
|
| |
| template<class T > |
| void | getInterval (T *interval, int i, T max, T min=T(0)) |
| | Get worker sub-interval of a full interval [min, max) More...
|
| |
template<class ThreadFunction>
class al::Threads< ThreadFunction >
Multiple threads acting as a single work unit
Definition at line 142 of file al_Thread.hpp.
template<class ThreadFunction >
template<class T >
Get worker sub-interval range of a full interval [min, max)
This is useful for determining how to break up for loops into sub-intervals. E.g., if the full loop interval is [ 0, N ), then the ith worker's interval is [ range(N)*i, range(N)*(i+1) ).
Definition at line 196 of file al_Thread.hpp.