StarPU Handbook

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
starpu_top.h
Go to the documentation of this file.
1 /* StarPU --- Runtime system for heterogeneous multicore architectures.
2 *
3 * Copyright (C) 2011 William Braik, Yann Courtois, Jean-Marie Couteyen, Anthony
4 * Roy
5 *
6 * StarPU is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or (at
9 * your option) any later version.
10 *
11 * StarPU is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 *
15 * See the GNU Lesser General Public License in COPYING.LGPL for more details.
16 */
17
18 #ifndef __STARPU_TOP_H__
19 #define __STARPU_TOP_H__
20
21 #include <starpu.h>
22 #include <stdlib.h>
23 #include <time.h>
24
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29
30 enum starpu_top_data_type
31 {
32 STARPU_TOP_DATA_BOOLEAN,
33 STARPU_TOP_DATA_INTEGER,
34 STARPU_TOP_DATA_FLOAT
35 };
36
37 struct starpu_top_data
38 {
39 unsigned int id;
40 const char *name;
41 int int_min_value;
42 int int_max_value;
43 double double_min_value;
44 double double_max_value;
45 int active;
46 enum starpu_top_data_type type;
47 struct starpu_top_data *next;
48 };
49
50 enum starpu_top_param_type
51 {
52 STARPU_TOP_PARAM_BOOLEAN,
53 STARPU_TOP_PARAM_INTEGER,
54 STARPU_TOP_PARAM_FLOAT,
55 STARPU_TOP_PARAM_ENUM
56 };
57
58 struct starpu_top_param
59 {
60 unsigned int id;
61 const char *name;
62 enum starpu_top_param_type type;
63 void *value;
64 char **enum_values;
65 int nb_values;
66 void (*callback)(struct starpu_top_param*);
67 int int_min_value;
68 int int_max_value;
69 double double_min_value;
70 double double_max_value;
71 struct starpu_top_param *next;
72 };
73
74 enum starpu_top_message_type
75 {
76 TOP_TYPE_GO,
77 TOP_TYPE_SET,
78 TOP_TYPE_CONTINUE,
79 TOP_TYPE_ENABLE,
80 TOP_TYPE_DISABLE,
81 TOP_TYPE_DEBUG,
82 TOP_TYPE_UNKNOW
83 };
84
85 struct starpu_top_data *starpu_top_add_data_boolean(const char *data_name, int active);
86 struct starpu_top_data *starpu_top_add_data_integer(const char *data_name, int minimum_value, int maximum_value, int active);
87 struct starpu_top_data *starpu_top_add_data_float(const char *data_name, double minimum_value, double maximum_value, int active);
88
89 struct starpu_top_param *starpu_top_register_parameter_boolean(const char *param_name, int *parameter_field, void (*callback)(struct starpu_top_param*));
90 struct starpu_top_param *starpu_top_register_parameter_integer(const char *param_name, int *parameter_field, int minimum_value, int maximum_value, void (*callback)(struct starpu_top_param*));
91 struct starpu_top_param *starpu_top_register_parameter_float(const char *param_name, double *parameter_field, double minimum_value, double maximum_value, void (*callback)(struct starpu_top_param*));
92 struct starpu_top_param *starpu_top_register_parameter_enum(const char *param_name, int *parameter_field, char **values, int nb_values, void (*callback)(struct starpu_top_param*));
93
94 void starpu_top_init_and_wait(const char *server_name);
95
96 void starpu_top_update_parameter(const struct starpu_top_param *param);
97 void starpu_top_update_data_boolean(const struct starpu_top_data *data, int value);
98 void starpu_top_update_data_integer(const struct starpu_top_data *data, int value);
99 void starpu_top_update_data_float(const struct starpu_top_data *data, double value);
100 void starpu_top_task_prevision(struct starpu_task *task, int devid, unsigned long long start, unsigned long long end);
101
102 void starpu_top_debug_log(const char *message);
103 void starpu_top_debug_lock(const char *message);
104
105
106 #ifdef __cplusplus
107 }
108 #endif
109
110 #endif /* __STARPU_TOP_H__ */
111
starpu_top_data::name
const char * name
Definition: starpu_top.h:40
TOP_TYPE_DEBUG
Definition: starpu_top.h:81
STARPU_TOP_PARAM_BOOLEAN
Definition: starpu_top.h:52
STARPU_TOP_DATA_INTEGER
Definition: starpu_top.h:33
starpu_top_update_parameter
void starpu_top_update_parameter(const struct starpu_top_param *param)
STARPU_TOP_PARAM_ENUM
Definition: starpu_top.h:55
starpu_top_update_data_float
void starpu_top_update_data_float(const struct starpu_top_data *data, double value)
STARPU_TOP_DATA_BOOLEAN
Definition: starpu_top.h:32
starpu_top_param::enum_values
char ** enum_values
Definition: starpu_top.h:64
starpu_top_param::name
const char * name
Definition: starpu_top.h:61
starpu_top_param::double_min_value
double double_min_value
Definition: starpu_top.h:69
starpu_top_add_data_integer
struct starpu_top_data * starpu_top_add_data_integer(const char *data_name, int minimum_value, int maximum_value, int active)
STARPU_TOP_PARAM_FLOAT
Definition: starpu_top.h:54
STARPU_TOP_PARAM_INTEGER
Definition: starpu_top.h:53
starpu_top_param::next
struct starpu_top_param * next
Definition: starpu_top.h:71
starpu_top_param
Definition: starpu_top.h:58
starpu_top_data::int_max_value
int int_max_value
Definition: starpu_top.h:42
starpu_top_debug_lock
void starpu_top_debug_lock(const char *message)
starpu_top_update_data_integer
void starpu_top_update_data_integer(const struct starpu_top_data *data, int value)
TOP_TYPE_UNKNOW
Definition: starpu_top.h:82
TOP_TYPE_CONTINUE
Definition: starpu_top.h:78
starpu_top_register_parameter_enum
struct starpu_top_param * starpu_top_register_parameter_enum(const char *param_name, int *parameter_field, char **values, int nb_values, void(*callback)(struct starpu_top_param *))
starpu_top_data::double_min_value
double double_min_value
Definition: starpu_top.h:43
starpu_top_debug_log
void starpu_top_debug_log(const char *message)
starpu_top_data_type
starpu_top_data_type
Definition: starpu_top.h:30
starpu_top_data::type
enum starpu_top_data_type type
Definition: starpu_top.h:46
TOP_TYPE_ENABLE
Definition: starpu_top.h:79
TOP_TYPE_DISABLE
Definition: starpu_top.h:80
starpu_task
Definition: starpu_task.h:104
starpu_top_param::type
enum starpu_top_param_type type
Definition: starpu_top.h:62
starpu_top_param::int_max_value
int int_max_value
Definition: starpu_top.h:68
TOP_TYPE_GO
Definition: starpu_top.h:76
starpu_top_message_type
starpu_top_message_type
Definition: starpu_top.h:74
starpu_top_param::int_min_value
int int_min_value
Definition: starpu_top.h:67
starpu_top_param_type
starpu_top_param_type
Definition: starpu_top.h:50
starpu_top_register_parameter_float
struct starpu_top_param * starpu_top_register_parameter_float(const char *param_name, double *parameter_field, double minimum_value, double maximum_value, void(*callback)(struct starpu_top_param *))
starpu_top_register_parameter_boolean
struct starpu_top_param * starpu_top_register_parameter_boolean(const char *param_name, int *parameter_field, void(*callback)(struct starpu_top_param *))
starpu_top_param::callback
void(* callback)(struct starpu_top_param *)
Definition: starpu_top.h:66
starpu_top_data::id
unsigned int id
Definition: starpu_top.h:39
starpu_top_add_data_boolean
struct starpu_top_data * starpu_top_add_data_boolean(const char *data_name, int active)
starpu_top_data::int_min_value
int int_min_value
Definition: starpu_top.h:41
starpu_top_param::id
unsigned int id
Definition: starpu_top.h:60
starpu_top_update_data_boolean
void starpu_top_update_data_boolean(const struct starpu_top_data *data, int value)
starpu_top_data::double_max_value
double double_max_value
Definition: starpu_top.h:44
starpu_top_data::next
struct starpu_top_data * next
Definition: starpu_top.h:47
starpu_top_data::active
int active
Definition: starpu_top.h:45
TOP_TYPE_SET
Definition: starpu_top.h:77
starpu_top_add_data_float
struct starpu_top_data * starpu_top_add_data_float(const char *data_name, double minimum_value, double maximum_value, int active)
starpu_top_param::double_max_value
double double_max_value
Definition: starpu_top.h:70
starpu_top_param::nb_values
int nb_values
Definition: starpu_top.h:65
starpu_top_register_parameter_integer
struct starpu_top_param * starpu_top_register_parameter_integer(const char *param_name, int *parameter_field, int minimum_value, int maximum_value, void(*callback)(struct starpu_top_param *))
STARPU_TOP_DATA_FLOAT
Definition: starpu_top.h:34
starpu.h
starpu_top_data
Definition: starpu_top.h:37
starpu_top_task_prevision
void starpu_top_task_prevision(struct starpu_task *task, int devid, unsigned long long start, unsigned long long end)
starpu_top_init_and_wait
void starpu_top_init_and_wait(const char *server_name)
starpu_top_param::value
void * value
Definition: starpu_top.h:63