![]() |
Ice Sheet System Model
4.18
Code documentation
|
launch thread in a generic way, covering single and multi-threaded cases This routine attempts to simplify management of multi-threading. When multi-threadeing is not requested (serial run), LaunchThread will just call the function (provided in argument list), nothing fancy there. If multi-threading is requested, LaunchThread will launch the function on multiple threads (num_threads of them), and provide these functions with the local data they need (folded in the "gate" structure) + the thread id + the number of threads All this info is collected in the pthread_handle structure. More...
Go to the source code of this file.
Functions | |
void | LaunchThread (void *function(void *), void *gate, int num_threads) |
launch thread in a generic way, covering single and multi-threaded cases This routine attempts to simplify management of multi-threading. When multi-threadeing is not requested (serial run), LaunchThread will just call the function (provided in argument list), nothing fancy there. If multi-threading is requested, LaunchThread will launch the function on multiple threads (num_threads of them), and provide these functions with the local data they need (folded in the "gate" structure) + the thread id + the number of threads All this info is collected in the pthread_handle structure.
Definition in file LaunchThread.cpp.
void LaunchThread | ( | void * | functionvoid *, |
void * | gate, | ||
int | num_threads | ||
) |
Definition at line 25 of file LaunchThread.cpp.