#include <Thread.h>
Public Member Functions | |
Constructors & destructor | |
Thread (ident_t id, const std::string &name) | |
Get thread information | |
Process * | get_process () const |
Location * | get_location () const |
The numerical identifiers of the individual threads are continuously enumerated, however, unlike the IDs of machines, nodes, and processes, thread IDs are not global but local to the process they belong to. For OpenMP applications, the thread identifier is equal to the thread number returned by omp_get_thread_num().
Creates a new instance and sets its identifier and name to the given values id and name, respectively.
Right after the initialization, the thread is not associated with any process or location.
id | Thread identifier | |
name | Thread name |
Location * get_location | ( | ) | const |
Returns the location associated to this thread. If the thread has not been bound to a location object yet, a NULL pointer is returned.
Process * get_process | ( | ) | const |
Returns the process this thread belongs to. If the thread has not been assigned to a process yet, a NULL pointer is returned.
![]() |
Copyright © 1998–2009 Forschungszentrum Jülich, Jülich Supercomputing Centre |