StarPU Handbook
 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 
31 {
35 };
36 
38 {
39  unsigned int id;
40  const char *name;
45  int active;
48 };
49 
51 {
56 };
57 
59 {
60  unsigned int id;
61  const char *name;
63  void *value;
64  char **enum_values;
65  int nb_values;
66  void (*callback)(struct starpu_top_param*);
72 };
73 
75 {
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