![]() |
GHOST
1.1.2
General, Hybrid, and Optimized Sparse Toolkit
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include <semaphore.h>
#include <errno.h>
#include <unistd.h>
#include <strings.h>
#include "ghost/types.h"
#include "ghost/locality.h"
#include "ghost/task.h"
#include "ghost/thpool.h"
#include "ghost/pumap.h"
#include "ghost/util.h"
#include "ghost/machine.h"
#include "ghost/log.h"
#include "ghost/taskq.h"
Macros | |
#define | _XOPEN_SOURCE 500 |
Functions | |
ghost_error | ghost_task_unpin (ghost_task *task) |
Unpin a task's threads. More... | |
ghost_error | ghost_task_string (char **str, ghost_task *t) |
Stringify a task. More... | |
ghost_error | ghost_task_enqueue (ghost_task *t) |
Enqueue a task. More... | |
ghost_task_state | ghost_taskest (ghost_task *t) |
Test the task's current state. More... | |
ghost_error | ghost_task_wait (ghost_task *task) |
Wait for a task to finish. More... | |
const char * | ghost_task_state_string (ghost_task_state state) |
Return a string representing the task's state. More... | |
void | ghost_task_destroy (ghost_task *t) |
Destroy a task. More... | |
ghost_error | ghost_task_create (ghost_task **t, int nThreads, int LD, void *(*func)(void *), void *arg, ghost_task_flags flags, ghost_task **depends, int ndepends) |
Create a task. More... | |
ghost_error | ghost_task_cur (ghost_task **task) |
bool | ghost_tasking_enabled () |
Check whether tasking is globally enabled. More... | |
#define _XOPEN_SOURCE 500 |
ghost_error ghost_task_create | ( | ghost_task ** | task, |
int | nThreads, | ||
int | LD, | ||
void *(*)(void *) | func, | ||
void * | arg, | ||
ghost_task_flags | flags, | ||
ghost_task ** | depends, | ||
int | ndepends | ||
) |
Create a task.
task | Where to store the task |
nThreads | The number of threads which are reserved for the task |
LD | The index of the task queue this task should be added to |
func | The function the task should execute |
arg | The arguments to the task's function |
flags | The task's flags |
depends | List of ghost_task * on which this task depends |
ndepends | Length of the depends argument |
ghost_error ghost_task_cur | ( | ghost_task ** | task | ) |
void ghost_task_destroy | ( | ghost_task * | t | ) |
Destroy a task.
[in,out] | t | The task to be destroyed |
ghost_error ghost_task_enqueue | ( | ghost_task * | t | ) |
Enqueue a task.
t | The task. |
ghost_error ghost_task_unpin | ( | ghost_task * | task | ) |
Unpin a task's threads.
[in,out] | task | The task. |
ghost_error ghost_task_wait | ( | ghost_task * | t | ) |
Wait for a task to finish.
t | The task to wait for |
ghost_task_state ghost_taskest | ( | ghost_task * | t | ) |
Test the task's current state.
t | The task to test |
bool ghost_tasking_enabled | ( | ) |
Check whether tasking is globally enabled.