StarPU Handbook
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules 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-2014 Université de Bordeaux
4  * Copyright (C) 2010-2014 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_DATA_MODE_ARRAY (9<<16)
44 #define STARPU_TAG (10<<16)
45 #define STARPU_HYPERVISOR_TAG (11<<16)
46 #define STARPU_FLOPS (12<<16)
47 #define STARPU_SCHED_CTX (13<<16)
48 #define STARPU_PROLOGUE_CALLBACK (14<<16)
49 #define STARPU_PROLOGUE_CALLBACK_ARG (15<<16)
50 #define STARPU_PROLOGUE_CALLBACK_POP (16<<16)
51 #define STARPU_PROLOGUE_CALLBACK_POP_ARG (17<<16)
52 #define STARPU_EXECUTE_ON_WORKER (18<<16)
53 #define STARPU_TAG_ONLY (19<<16)
54 #define STARPU_POSSIBLY_PARALLEL (20<<16)
55 #define STARPU_WORKER_ORDER (21<<16)
56 #define STARPU_NODE_SELECTION_POLICY (22<<16)
57 
58 struct starpu_task *starpu_task_build(struct starpu_codelet *cl, ...);
59 int starpu_task_insert(struct starpu_codelet *cl, ...);
60 /* the function starpu_insert_task has the same semantics as starpu_task_insert, it is kept to avoid breaking old codes */
61 int starpu_insert_task(struct starpu_codelet *cl, ...);
62 
63 void starpu_codelet_unpack_args(void *cl_arg, ...);
64 
65 void starpu_codelet_pack_args(void **arg_buffer, size_t *arg_buffer_size, ...);
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 
71 #endif /* __STARPU_TASK_UTIL_H__ */
Definition: starpu_task.h:86
struct starpu_codelet * cl
Definition: starpu_task.h:127
void * callback_arg
Definition: starpu_task.h:143
struct starpu_task * starpu_task_build(struct starpu_codelet *cl,...)
int starpu_task_insert(struct starpu_codelet *cl,...)
void * cl_arg
Definition: starpu_task.h:139
Definition: starpu_task.h:123
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:68
void starpu_create_sync_task(starpu_tag_t sync_tag, unsigned ndeps, starpu_tag_t *deps, void(*callback)(void *), void *callback_arg)
int starpu_insert_task(struct starpu_codelet *cl,...)