![]() |
GHOST
1.1.2
General, Hybrid, and Optimized Sparse Toolkit
|
This structure represents a GHOST task. More...
#include <task.h>
Public Attributes | |
int | nThreads |
The number of threads the task should use. (user-defined) More... | |
int | LD |
The index of the queue in which the task should be present and (preferrably) running. (user-defined) More... | |
int | flags |
Optional flags for the task. (user-defined) More... | |
void *(* | func )(void *) |
The function to be executed by the task. (user-defined) More... | |
void * | arg |
The arguments to the task's function. (user-defined) More... | |
struct ghost_task ** | depends |
A list of tasks which have to be finished before this task can start. (user-defined) More... | |
int | ndepends |
The number of dependencies. (user-defined) More... | |
sem_t * | progressSem |
A semaphore for the user to mark progress in this thread. (set by the library) More... | |
ghost_task_state | state |
The current state of the task. (set by the library) More... | |
hwloc_bitmap_t | coremap |
The list of cores where the task's threads are running. (set by the library) More... | |
hwloc_bitmap_t | childusedmap |
Map of cores a child of this task is using. (set by the library) More... | |
void * | ret |
The return value of the task's funtion. (set by the library) More... | |
struct ghost_task * | next |
Pointer to the next task in the queue. (set by the library) More... | |
struct ghost_task * | prev |
Pointer to the previous task in the queue. (set by the library) More... | |
struct ghost_task * | parent |
The enqueueing task if the task has been enqueued from within a task. (set by the library, can be overwritten by the user before enqueueing) More... | |
pthread_cond_t * | finishedCond |
Indicator that the task is finished. (set by the library) More... | |
pthread_mutex_t * | mutex |
Protect accesses to the task's members. (set by the library) More... | |
pthread_mutex_t * | finishedMutex |
pthread_mutex_t * | stateMutex |
int | freed |
Set to one as soon as the task's resources have been free'd. This can be the case when the task waits for a child-task to finish or when the task itself is finished. More... | |
This structure represents a GHOST task.
This data structure holds all necessary information for a task. The members ghost_task::nThreads, ghost_task::LD, ghost_task::flags, ghost_task::func, ghost_task::arg, ghost_task::depends, and ghost_task::ndepends have to be set by the user in ghost_task_init(). All other members are set by the library at some point.
void* ghost_task::arg |
The arguments to the task's function. (user-defined)
hwloc_bitmap_t ghost_task::childusedmap |
Map of cores a child of this task is using. (set by the library)
hwloc_bitmap_t ghost_task::coremap |
The list of cores where the task's threads are running. (set by the library)
Map of cores this task is using. (set by the library)
struct ghost_task** ghost_task::depends |
A list of tasks which have to be finished before this task can start. (user-defined)
pthread_cond_t* ghost_task::finishedCond |
Indicator that the task is finished. (set by the library)
pthread_mutex_t* ghost_task::finishedMutex |
int ghost_task::flags |
Optional flags for the task. (user-defined)
int ghost_task::freed |
Set to one as soon as the task's resources have been free'd. This can be the case when the task waits for a child-task to finish or when the task itself is finished.
void*(* ghost_task::func)(void *) |
The function to be executed by the task. (user-defined)
int ghost_task::LD |
The index of the queue in which the task should be present and (preferrably) running. (user-defined)
pthread_mutex_t* ghost_task::mutex |
Protect accesses to the task's members. (set by the library)
int ghost_task::ndepends |
The number of dependencies. (user-defined)
struct ghost_task* ghost_task::next |
Pointer to the next task in the queue. (set by the library)
int ghost_task::nThreads |
The number of threads the task should use. (user-defined)
struct ghost_task* ghost_task::parent |
The enqueueing task if the task has been enqueued from within a task. (set by the library, can be overwritten by the user before enqueueing)
struct ghost_task* ghost_task::prev |
Pointer to the previous task in the queue. (set by the library)
sem_t* ghost_task::progressSem |
A semaphore for the user to mark progress in this thread. (set by the library)
void* ghost_task::ret |
The return value of the task's funtion. (set by the library)
ghost_task_state ghost_task::state |
The current state of the task. (set by the library)
pthread_mutex_t* ghost_task::stateMutex |