GHOST
1.1.2
General, Hybrid, and Optimized Sparse Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
include
ghost
helper.h
Go to the documentation of this file.
1
6
#ifndef GHOST_HELPER_H
7
#define GHOST_HELPER_H
8
9
#define GHOST_MAIN_TASK_START \
10
typedef struct\
11
{\
12
int argc;\
13
char **argv;\
14
}\
15
ghost_main_task_args;\
16
\
17
static void *ghost_main_task(void *varg) {\
18
int argc = ((ghost_main_task_args *)varg)->argc;\
19
char ** argv = ((ghost_main_task_args *)varg)->argv;
20
21
22
#define GHOST_MAIN_TASK_END \
23
return NULL;\
24
}\
25
int main(int argc, char** argv) {\
26
ghost_main_task_args arg;\
27
arg.argc = argc;\
28
arg.argv = argv;\
29
ghost_init(argc,argv);\
30
ghost_task *t;\
31
ghost_task_create(&t,GHOST_TASK_FILL_ALL, 0, &ghost_main_task, &arg, GHOST_TASK_DEFAULT, NULL, 0);\
32
ghost_task_enqueue(t);\
33
ghost_task_wait(t);\
34
ghost_task_destroy(t);\
35
ghost_finalize();\
36
return EXIT_SUCCESS;\
37
}
38
39
#endif
Generated on Thu Dec 13 2018 20:56:02 for GHOST by
1.8.6