浏览代码

include: remove documentation as it is already defined elsewhere

Nathalie Furmento 12 年之前
父节点
当前提交
9b6f25c976
共有 5 个文件被更改,包括 43 次插入166 次删除
  1. 0 4
      include/starpu_data.h
  2. 5 22
      include/starpu_perfmodel.h
  3. 5 7
      include/starpu_task.h
  4. 27 114
      include/starpu_top.h
  5. 6 19
      include/starpu_worker.h

+ 0 - 4
include/starpu_data.h

@@ -94,11 +94,7 @@ enum starpu_node_kind
 	STARPU_CUDA_RAM   = 0x02,
 	STARPU_OPENCL_RAM = 0x03,
 	STARPU_MIC_RAM    = 0x05,
-
-	/* This node kind is not used anymore, but implementations in interfaces
-	 * will be useful for MPI. */
 	STARPU_SCC_RAM    = 0x06,
-
 	STARPU_SCC_SHM    = 0x07
 };
 

+ 5 - 22
include/starpu_perfmodel.h

@@ -32,19 +32,11 @@ extern "C"
 struct starpu_task;
 struct starpu_data_descr;
 
-/*
-   it is possible that we have multiple versions of the same kind of workers,
-   for instance multiple GPUs or even different CPUs within the same machine
-   so we do not use the archtype enum type directly for performance models
-*/
-
 enum starpu_perfmodel_archtype
 {
 	STARPU_CPU_DEFAULT = 0,
-	/* CPU combined workers between 0 and STARPU_MAXCPUS-1 */
 	STARPU_CUDA_DEFAULT = STARPU_MAXCPUS,
 	STARPU_OPENCL_DEFAULT = STARPU_CUDA_DEFAULT + STARPU_MAXCUDADEVS,
-	/* STARPU_OPENCL_DEFAULT + devid */
 	STARPU_MIC_DEFAULT = STARPU_OPENCL_DEFAULT + STARPU_MAXOPENCLDEVS,
 	STARPU_SCC_DEFAULT = STARPU_MIC_DEFAULT + STARPU_MAXMICDEVS
 };
@@ -134,41 +126,33 @@ struct starpu_perfmodel_per_arch
 
 enum starpu_perfmodel_type
 {
-	STARPU_PER_ARCH,	/* Application-provided per-arch cost model function */
-	STARPU_COMMON,		/* Application-provided common cost model function, with per-arch factor */
-	STARPU_HISTORY_BASED,	/* Automatic history-based cost model */
-	STARPU_REGRESSION_BASED,	/* Automatic linear regression-based cost model  (alpha * size ^ beta) */
-	STARPU_NL_REGRESSION_BASED	/* Automatic non-linear regression-based cost model (a * size ^ b + c) */
+	STARPU_PER_ARCH,
+	STARPU_COMMON,
+	STARPU_HISTORY_BASED,
+	STARPU_REGRESSION_BASED,
+	STARPU_NL_REGRESSION_BASED
 };
 
 struct starpu_perfmodel
 {
-	/* which model is used for that task ? */
 	enum starpu_perfmodel_type type;
 
-	/* single cost model (STARPU_COMMON), returns expected duration in µs */
 	double (*cost_model)(struct starpu_data_descr *) STARPU_DEPRECATED;
 	double (*cost_function)(struct starpu_task *, unsigned nimpl);
 
 	size_t (*size_base)(struct starpu_task *, unsigned nimpl);
 
-	/* per-architecture model */
 	struct starpu_perfmodel_per_arch per_arch[STARPU_NARCH_VARIATIONS][STARPU_MAXIMPLEMENTATIONS];
 
-	/* Name of the performance model, this is used as a file name when saving history-based performance models */
 	const char *symbol;
 
-	/* Internal variables */
 	unsigned is_loaded;
 	unsigned benchmarking;
-
 	starpu_pthread_rwlock_t model_rwlock;
 };
 
 enum starpu_perfmodel_archtype starpu_worker_get_perf_archtype(int workerid);
 
-/* This function is intended to be used by external tools that should read the
- * performance model files */
 int starpu_perfmodel_load_symbol(const char *symbol, struct starpu_perfmodel *model);
 int starpu_perfmodel_unload_model(struct starpu_perfmodel *model);
 
@@ -185,7 +169,6 @@ void starpu_perfmodel_update_history(struct starpu_perfmodel *model, struct star
 void starpu_bus_print_bandwidth(FILE *f);
 void starpu_bus_print_affinity(FILE *f);
 
-/* use bw & latency to compute the velocity of resources*/
 double starpu_get_bandwidth_RAM_CUDA(unsigned cudadev);
 double starpu_get_latency_RAM_CUDA(unsigned cudadev);
 

+ 5 - 7
include/starpu_task.h

@@ -40,7 +40,6 @@ extern "C"
 #define STARPU_MIC	((1ULL)<<7)
 #define STARPU_SCC	((1ULL)<<8)
 
-/* Codelet types */
 enum starpu_codelet_type
 {
 	STARPU_SEQ,
@@ -48,7 +47,6 @@ enum starpu_codelet_type
 	STARPU_FORKJOIN
 };
 
-/* task status */
 enum starpu_task_status
 {
 	STARPU_TASK_INVALID,
@@ -64,11 +62,11 @@ enum starpu_task_status
 
 typedef uint64_t starpu_tag_t;
 
-typedef void (*starpu_cpu_func_t)(void **, void*);    /* CPU core */
-typedef void (*starpu_cuda_func_t)(void **, void*);   /* NVIDIA CUDA device */
-typedef void (*starpu_opencl_func_t)(void **, void*); /* OpenCL CUDA device */
-typedef void (*starpu_mic_kernel_t)(void **, void*); /* MIC device */
-typedef void (*starpu_scc_kernel_t)(void **, void*); /* SCC device */
+typedef void (*starpu_cpu_func_t)(void **, void*);
+typedef void (*starpu_cuda_func_t)(void **, void*);
+typedef void (*starpu_opencl_func_t)(void **, void*);
+typedef void (*starpu_mic_kernel_t)(void **, void*);
+typedef void (*starpu_scc_kernel_t)(void **, void*);
 
 typedef starpu_mic_kernel_t (*starpu_mic_func_t)(void);
 typedef starpu_scc_kernel_t (*starpu_scc_func_t)(void);

+ 27 - 114
include/starpu_top.h

@@ -37,14 +37,14 @@ enum starpu_top_data_type
 struct starpu_top_data
 {
 	unsigned int id;
-	const char* name;
+	const char *name;
 	int int_min_value;
 	int int_max_value;
 	double double_min_value;
 	double double_max_value;
 	int active;
 	enum starpu_top_data_type type;
-	struct starpu_top_data * next;
+	struct starpu_top_data *next;
 };
 
 enum starpu_top_param_type
@@ -58,17 +58,17 @@ enum starpu_top_param_type
 struct starpu_top_param
 {
 	unsigned int id;
-	const char* name;
+	const char *name;
 	enum starpu_top_param_type type;
-	void* value;
-	char** enum_values; /* only for enum type can be NULL */
+	void *value;
+	char **enum_values;
 	int nb_values;
 	void (*callback)(struct starpu_top_param*);
-	int int_min_value; /* only for integer type */
+	int int_min_value;
 	int int_max_value;
-	double double_min_value; /*only for double type */
+	double double_min_value;
 	double double_max_value;
-	struct starpu_top_param * next;
+	struct starpu_top_param *next;
 };
 
 enum starpu_top_message_type
@@ -82,140 +82,53 @@ enum starpu_top_message_type
 	TOP_TYPE_UNKNOW
 };
 
-/*****************************************************
-****   Functions to call BEFORE initialisation   *****
-*****************************************************/
-/*
- * This fonction register a data named data_name of type boolean
- * If active=0, the value will NOT be displayed to user by default.
- * Any other value will make the value displayed by default.
-*/
-struct starpu_top_data *starpu_top_add_data_boolean(const char* data_name,
+struct starpu_top_data *starpu_top_add_data_boolean(const char *data_name,
 						    int active);
-/*
- * This fonction register a data named data_name of type integer
- * The minimum and maximum value will be usefull to define the scale in UI
- * If active=0, the value will NOT be displayed to user by default.
- * Any other value will make the value displayed by default.
-*/
-struct starpu_top_data * starpu_top_add_data_integer(const char* data_name,
+struct starpu_top_data *starpu_top_add_data_integer(const char *data_name,
 						     int minimum_value,
 						     int maximum_value,
 						     int active);
-/*
- * This fonction register a data named data_name of type float
- * The minimum and maximum value will be usefull to define the scale in UI
- * If active=0, the value will NOT be displayed to user by default.
- * Any other value will make the value displayed by default.
-*/
-struct starpu_top_data* starpu_top_add_data_float(const char* data_name,
+struct starpu_top_data *starpu_top_add_data_float(const char *data_name,
 						  double minimum_value,
 						  double maximum_value,
 						  int active);
-
-/*
- * This fonction register a parameter named parameter_name, of type boolean.
- * The callback fonction will be called when the parameter is modified by UI,
- * and can be null.
-*/
-struct starpu_top_param* starpu_top_register_parameter_boolean(const char* param_name,
-							       int* parameter_field,
+struct starpu_top_param *starpu_top_register_parameter_boolean(const char *param_name,
+							       int *parameter_field,
 							       void (*callback)(struct starpu_top_param*));
-/*
- * This fonction register a parameter named param_name, of type integer.
- * Minimum and maximum value will be used to prevent user seting incorrect
- * value.
- * The callback fonction will be called when the parameter is modified by UI,
- * and can be null.
-*/
-struct starpu_top_param* starpu_top_register_parameter_integer(const char* param_name,
-							       int* parameter_field,
+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*));
-/*
- * This fonction register a parameter named param_name, of type float.
- * Minimum and maximum value will be used to prevent user seting incorrect
- * value.
- * The callback fonction will be called when the parameter is modified by UI,
- * and can be null.
-*/
-struct starpu_top_param* starpu_top_register_parameter_float(const char* param_name,
-							     double* parameter_field,
+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*));
-
-/*
- * This fonction register a parameter named param_name, of type enum.
- * Minimum and maximum value will be used to prevent user seting incorrect
- * value.
- * The callback fonction will be called when the parameter is modified by UI,
- * and can be null.
-*/
-struct starpu_top_param* starpu_top_register_parameter_enum(const char* param_name,
-							    int* parameter_field,
-							    char** values,
+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*));
 
 
 
 
-/****************************************************
-******************* Initialisation ******************
-*****************************************************/
-/*
- * This function must be called when all parameters and
- * data have been registered AND initialised (for parameters).
- * This function will wait for a TOP to connect, send initialisation
- * sentences, and wait for the GO message.
- */
-void starpu_top_init_and_wait(const char* server_name);
-
-/****************************************************
-************ To call after initialisation************
-*****************************************************/
-
-/*
- * This function should be called after every modification
- * of a parameter from something other than starpu_top.
- * This fonction notice UI that the configuration changed
- */
-void starpu_top_update_parameter(const struct starpu_top_param* param);
+void starpu_top_init_and_wait(const char *server_name);
 
-/*
- * This functions update the value of the starpu_top_data on UI
- */
-void starpu_top_update_data_boolean(const struct starpu_top_data* data,
+void starpu_top_update_parameter(const struct starpu_top_param *param);
+void starpu_top_update_data_boolean(const struct starpu_top_data *data,
 				    int value);
-void starpu_top_update_data_integer(const struct starpu_top_data* data,
+void starpu_top_update_data_integer(const struct starpu_top_data *data,
 				    int value);
-void starpu_top_update_data_float(const struct starpu_top_data* data,
+void starpu_top_update_data_float(const struct starpu_top_data *data,
 				  double value);
-
-/*
- * This function notifies UI than the task have been planed to
- * run from start to end, on computation-core
- */
 void starpu_top_task_prevision(struct starpu_task *task,
 			       int devid, unsigned long long start,
 			       unsigned long long end);
 
-/*
- * This functions are usefull in debug mode. The starpu developper doesn't need
- * to check if the debug mode is active.
- * This is checked by starpu_top itsefl.
- *
- * top_debug_log just send a message to display by UI
- * top_debug_lock send a message and wait for a continue message from UI
- * to return
- *
- * The lock (wich create a stop-point) should be called only by the main thread.
- * Calling it from more than one thread is not supported.
- */
-void starpu_top_debug_log(const char* message);
-void starpu_top_debug_lock(const char* message);
+void starpu_top_debug_log(const char *message);
+void starpu_top_debug_lock(const char *message);
 
 
 #ifdef __cplusplus

+ 6 - 19
include/starpu_worker.h

@@ -33,12 +33,12 @@ extern "C"
 
 enum starpu_worker_archtype
 {
-	STARPU_ANY_WORKER,    /* any worker, used in the hypervisor */
-	STARPU_CPU_WORKER,    /* CPU core */
-	STARPU_CUDA_WORKER,   /* NVIDIA CUDA device */
-	STARPU_OPENCL_WORKER, /* OpenCL device */
-	STARPU_MIC_WORKER,    /* Intel MIC device */
-	STARPU_SCC_WORKER     /* Intel SCC device */
+	STARPU_ANY_WORKER,
+	STARPU_CPU_WORKER,
+	STARPU_CUDA_WORKER,
+	STARPU_OPENCL_WORKER,
+	STARPU_MIC_WORKER,
+	STARPU_SCC_WORKER
 };
 
 struct starpu_sched_ctx_iterator
@@ -46,7 +46,6 @@ struct starpu_sched_ctx_iterator
 	int cursor;
 };
 
-/* types of structures the worker collection can implement */
 enum starpu_worker_collection_type
 {
 	STARPU_WORKER_LIST
@@ -54,30 +53,18 @@ enum starpu_worker_collection_type
 
 struct starpu_worker_collection
 {
-	/* hidden data structure used to memorize the workers */
 	void *workerids;
-	/* the number of workers in the collection */
 	unsigned nworkers;
-	/* the type of structure */
 	enum starpu_worker_collection_type type;
-	/* checks if there is another element in collection */
 	unsigned (*has_next)(struct starpu_worker_collection *workers, struct starpu_sched_ctx_iterator *it);
-	/* return the next element in the collection */
 	int (*get_next)(struct starpu_worker_collection *workers, struct starpu_sched_ctx_iterator *it);
-	/* add a new element in the collection */
 	int (*add)(struct starpu_worker_collection *workers, int worker);
-	/* remove an element from the collection */
 	int (*remove)(struct starpu_worker_collection *workers, int worker);
-	/* initialize the structure */
 	void (*init)(struct starpu_worker_collection *workers);
-	/* free the structure */
 	void (*deinit)(struct starpu_worker_collection *workers);
-	/* initialize the cursor if there is one */
 	void (*init_iterator)(struct starpu_worker_collection *workers, struct starpu_sched_ctx_iterator *it);
 };
 
-/* This function returns the number of workers (ie. processing units executing
- * StarPU tasks). The returned value should be at most STARPU_NMAXWORKERS. */
 unsigned starpu_worker_get_count(void);
 unsigned starpu_combined_worker_get_count(void);
 unsigned starpu_worker_is_combined_worker(int id);