StarPU Handbook
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
starpu_task_util.h
Go to the documentation of this file.
1 /* StarPU --- Runtime system for heterogeneous multicore architectures.
2  *
3  * Copyright (C) 2010-2013 Université de Bordeaux 1
4  * Copyright (C) 2010-2013 Centre National de la Recherche Scientifique
5  * Copyright (C) 2014 INRIA
6  *
7  * StarPU is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU Lesser General Public License as published by
9  * the Free Software Foundation; either version 2.1 of the License, or (at
10  * your option) any later version.
11  *
12  * StarPU is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15  *
16  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
17  */
18 
19 #ifndef __STARPU_TASK_UTIL_H__
20 #define __STARPU_TASK_UTIL_H__
21 
22 #include <stdio.h>
23 #include <stdlib.h>
24 #include <string.h>
25 #include <assert.h>
26 #include <starpu.h>
27 
28 #ifdef __cplusplus
29 extern "C"
30 {
31 #endif
32 
33 void starpu_create_sync_task(starpu_tag_t sync_tag, unsigned ndeps, starpu_tag_t *deps, void (*callback)(void *), void *callback_arg);
34 
35 #define STARPU_VALUE (1<<16)
36 #define STARPU_CALLBACK (2<<16)
37 #define STARPU_CALLBACK_WITH_ARG (3<<16)
38 #define STARPU_CALLBACK_ARG (4<<16)
39 #define STARPU_PRIORITY (5<<16)
40 #define STARPU_EXECUTE_ON_NODE (6<<16)
41 #define STARPU_EXECUTE_ON_DATA (7<<16)
42 #define STARPU_DATA_ARRAY (8<<16)
43 #define STARPU_TAG (9<<16)
44 #define STARPU_HYPERVISOR_TAG (10<<16)
45 #define STARPU_FLOPS (11<<16)
46 #define STARPU_SCHED_CTX (12<<16)
47 #define STARPU_PROLOGUE_CALLBACK (13<<16)
48 #define STARPU_PROLOGUE_CALLBACK_ARG (14<<16)
49 #define STARPU_EXECUTE_ON_WORKER (15<<16)
50 
51 struct starpu_task *starpu_task_build(struct starpu_codelet *cl, ...);
52 int starpu_insert_task(struct starpu_codelet *cl, ...);
53 
54 void starpu_codelet_unpack_args(void *cl_arg, ...);
55 
56 void starpu_codelet_pack_args(void **arg_buffer, size_t *arg_buffer_size, ...);
57 
58 #ifdef __cplusplus
59 }
60 #endif
61 
62 #endif /* __STARPU_TASK_UTIL_H__ */
Definition: starpu_task.h:73
void * cl_arg
Definition: starpu_task.h:115
struct starpu_task * starpu_task_build(struct starpu_codelet *cl,...)
int starpu_insert_task(struct starpu_codelet *cl,...)
Definition: starpu_task.h:104
void starpu_codelet_unpack_args(void *cl_arg,...)
void starpu_codelet_pack_args(void **arg_buffer, size_t *arg_buffer_size,...)
uint64_t starpu_tag_t
Definition: starpu_task.h:62
void * callback_arg
Definition: starpu_task.h:121
struct starpu_codelet * cl
Definition: starpu_task.h:106
void starpu_create_sync_task(starpu_tag_t sync_tag, unsigned ndeps, starpu_tag_t *deps, void(*callback)(void *), void *callback_arg)