StarPU Internal Handbook
Loading...
Searching...
No Matches
errorcheck.h File Reference
#include <starpu.h>

Go to the source code of this file.

Enumerations

enum  _starpu_worker_status_index {
  STATUS_INDEX_INITIALIZING , STATUS_INDEX_EXECUTING , STATUS_INDEX_CALLBACK , STATUS_INDEX_WAITING ,
  STATUS_INDEX_SLEEPING , STATUS_INDEX_SCHEDULING , STATUS_INDEX_NR
}
 
enum  _starpu_worker_status {
  STATUS_INVALID , STATUS_UNKNOWN , STATUS_INITIALIZING , STATUS_EXECUTING ,
  STATUS_CALLBACK , STATUS_WAITING , STATUS_SLEEPING , STATUS_SCHEDULING
}
 

Functions

void _starpu_add_worker_status (struct _starpu_worker *worker, enum _starpu_worker_status_index st, struct timespec *time)
 
void _starpu_add_local_worker_status (enum _starpu_worker_status_index st, struct timespec *time)
 
void _starpu_clear_worker_status (struct _starpu_worker *worker, enum _starpu_worker_status_index st, struct timespec *time)
 
void _starpu_clear_local_worker_status (enum _starpu_worker_status_index st, struct timespec *time)
 
enum _starpu_worker_status _starpu_get_local_worker_status (void)
 
unsigned _starpu_worker_may_perform_blocking_calls (void)
 

Enumeration Type Documentation

◆ _starpu_worker_status_index

This type enumerates the actions that can be done by a worker. Some can be happening during others, that is why enum _starpu_worker_status is a bitset indexed by the values of enum _starpu_worker_status_index.

◆ _starpu_worker_status

This type describes in which state a worker may be.

Enumerator
STATUS_INVALID 

invalid status (for instance if we request the status of some thread that is not controlled by StarPU

STATUS_UNKNOWN 

Nothing particular, thus just overhead

STATUS_INITIALIZING 

during the initialization

STATUS_EXECUTING 

during the execution of a codelet

STATUS_CALLBACK 

during the execution of the callback

STATUS_WAITING 

while waiting for a data transfer

STATUS_SLEEPING 

while sleeping because there is no task to do

STATUS_SCHEDULING 

while executing the scheduler code

Function Documentation

◆ _starpu_add_worker_status()

void _starpu_add_worker_status ( struct _starpu_worker worker,
enum _starpu_worker_status_index  st,
struct timespec *  time 
)

Specify what the local worker is currently doing (eg. executing a callback). This permits to detect if this is legal to do a blocking call for instance.

◆ _starpu_clear_worker_status()

void _starpu_clear_worker_status ( struct _starpu_worker worker,
enum _starpu_worker_status_index  st,
struct timespec *  time 
)

Clear the fact that the local worker was currently doing something(eg. executing a callback).

◆ _starpu_get_local_worker_status()

enum _starpu_worker_status _starpu_get_local_worker_status ( void  )

Indicate what type of operation the worker is currently doing.

◆ _starpu_worker_may_perform_blocking_calls()

unsigned _starpu_worker_may_perform_blocking_calls ( void  )

It is forbidden to do blocking calls during some operations such as callback or during the execution of a task. This function indicates whether it is legal to call a blocking operation in the current context.