GHOST  1.1.2
General, Hybrid, and Optimized Sparse Toolkit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
helper.h File Reference

Helpers for applications which use GHOST. More...

Go to the source code of this file.

Macros

#define GHOST_MAIN_TASK_START
 
#define GHOST_MAIN_TASK_END
 

Detailed Description

Helpers for applications which use GHOST.

Author
Moritz Kreutzer morit.nosp@m.z.kr.nosp@m.eutze.nosp@m.r@fa.nosp@m.u.de

Macro Definition Documentation

#define GHOST_MAIN_TASK_END
Value:
return NULL;\
}\
int main(int argc, char** argv) {\
ghost_main_task_args arg;\
arg.argc = argc;\
arg.argv = argv;\
ghost_init(argc,argv);\
ghost_task_create(&t,GHOST_TASK_FILL_ALL, 0, &ghost_main_task, &arg, GHOST_TASK_DEFAULT, NULL, 0);\
return EXIT_SUCCESS;\
}
#define GHOST_TASK_FILL_ALL
Use all available processing units.
Definition: task.h:50
The default task.
Definition: task.h:23
ghost_error ghost_init(int argc, char **argv)
Initialize GHOST.
Definition: core.c:122
ghost_error ghost_task_enqueue(ghost_task *t)
Enqueue a task.
Definition: task.c:64
ghost_error ghost_finalize()
Finalize GHOST.
Definition: core.c:600
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.
Definition: task.c:205
struct ghost_task ghost_task
This structure represents a GHOST task.
ghost_error ghost_task_wait(ghost_task *task)
Wait for a task to finish.
Definition: task.c:119
void ghost_task_destroy(ghost_task *t)
Destroy a task.
Definition: task.c:181
#define GHOST_MAIN_TASK_START
Value:
typedef struct\
{\
int argc;\
char **argv;\
}\
ghost_main_task_args;\
\
static void *ghost_main_task(void *varg) {\
int argc = ((ghost_main_task_args *)varg)->argc;\
char ** argv = ((ghost_main_task_args *)varg)->argv;