Browse Source

Always make sure that starpu.h gets included first, since that one knows which order has to be used for the rest. Expose history entries to applications.

Samuel Thibault 13 years ago
parent
commit
2b4e61f351

+ 2 - 1
include/starpu_data.h

@@ -15,10 +15,11 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#include <starpu.h>
+
 #ifndef __STARPU_DATA_H__
 #define __STARPU_DATA_H__
 
-#include <starpu.h>
 #include <starpu_config.h>
 
 struct starpu_data_state_t;

+ 2 - 1
include/starpu_data_filters.h

@@ -16,12 +16,13 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#include <starpu.h>
+
 #ifndef __STARPU_DATA_FILTERS_H__
 #define __STARPU_DATA_FILTERS_H__
 
 #include <stdarg.h>
 
-#include <starpu.h>
 #include <starpu_config.h>
 
 #ifdef __cplusplus

+ 2 - 1
include/starpu_data_interfaces.h

@@ -16,10 +16,11 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#include <starpu.h>
+
 #ifndef __STARPU_DATA_INTERFACES_H__
 #define __STARPU_DATA_INTERFACES_H__
 
-#include <starpu.h>
 #include <starpu_data.h>
 #include <starpu_util.h>
 

+ 2 - 1
include/starpu_expert.h

@@ -14,10 +14,11 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#include <starpu.h>
+
 #ifndef __STARPU_EXPERT_H__
 #define __STARPU_EXPERT_H__
 
-#include <starpu.h>
 #include <starpu_config.h>
 
 #ifdef __cplusplus

+ 47 - 1
include/starpu_perfmodel.h

@@ -16,12 +16,13 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#include <starpu.h>
+
 #ifndef __STARPU_PERFMODEL_H__
 #define __STARPU_PERFMODEL_H__
 
 #include <starpu_config.h>
 #include <stdio.h>
-#include <starpu.h>
 #include <starpu_task.h>
 
 #if ! defined(_MSC_VER)
@@ -53,6 +54,51 @@ enum starpu_perf_archtype {
 
 #define STARPU_NARCH_VARIATIONS	(STARPU_GORDON_DEFAULT+1)
 
+struct starpu_history_entry_t {
+	//double measured;
+	
+	/* mean_n = 1/n sum */
+	double mean;
+
+	/* n dev_n = sum2 - 1/n (sum)^2 */
+	double deviation;
+
+	/* sum of samples */
+	double sum;
+
+	/* sum of samples^2 */
+	double sum2;
+
+//	/* sum of ln(measured) */
+//	double sumlny;
+//
+//	/* sum of ln(size) */
+//	double sumlnx;
+//	double sumlnx2;
+//
+//	/* sum of ln(size) ln(measured) */
+//	double sumlnxlny;
+//
+	unsigned nsample;
+
+	uint32_t footprint;
+#ifdef STARPU_HAVE_WINDOWS
+	unsigned size; /* in bytes */
+#else
+	size_t size; /* in bytes */
+#endif
+};
+
+struct starpu_history_list_t {
+	struct starpu_history_list_t *next;
+	struct starpu_history_entry_t *entry;
+};
+
+struct starpu_model_list_t {
+	struct starpu_model_list_t *next;
+	struct starpu_perfmodel *model;
+};
+
 struct starpu_regression_model_t {
 	/* sum of ln(measured) */
 	double sumlny;

+ 2 - 1
include/starpu_profiling.h

@@ -15,13 +15,14 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#include <starpu.h>
+
 #ifndef __STARPU_PROFILING_H__
 #define __STARPU_PROFILING_H__
 
 #include <errno.h>
 #include <sys/time.h>
 
-#include <starpu.h>
 
 #ifdef __cplusplus
 extern "C" {

+ 2 - 1
include/starpu_scheduler.h

@@ -15,10 +15,11 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#include <starpu.h>
+
 #ifndef __STARPU_SCHEDULER_H__
 #define __STARPU_SCHEDULER_H__
 
-#include <starpu.h>
 #include <starpu_config.h>
 
 #if ! defined(_MSC_VER)

+ 2 - 1
include/starpu_task.h

@@ -16,11 +16,12 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#include <starpu.h>
+
 #ifndef __STARPU_TASK_H__
 #define __STARPU_TASK_H__
 
 #include <errno.h>
-#include <starpu.h>
 #include <starpu_config.h>
 
 #if defined STARPU_USE_CUDA && !defined STARPU_DONT_INCLUDE_CUDA_HEADERS

+ 2 - 1
include/starpu_task_bundle.h

@@ -15,10 +15,11 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#include <starpu.h>
+
 #ifndef __STARPU_TASK_BUNDLE_H__
 #define __STARPU_TASK_BUNDLE_H__
 
-#include <starpu.h>
 #include <starpu_config.h>
 
 #if ! defined(_MSC_VER)

+ 2 - 1
include/starpu_top.h

@@ -15,11 +15,12 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+#include <starpu.h>
+
 #ifndef __STARPU_TOP_H__
 #define __STARPU_TOP_H__
 #include <stdlib.h>
 #include <time.h>
-#include <starpu.h>
 
 #ifdef __cplusplus
 extern "C" {

+ 0 - 46
src/core/perfmodel/perfmodel.h

@@ -33,52 +33,6 @@ struct starpu_jobq_s;
 struct starpu_job_s;
 enum starpu_perf_archtype;
 
-struct starpu_history_entry_t {
-	//double measured;
-	
-	/* mean_n = 1/n sum */
-	double mean;
-
-	/* n dev_n = sum2 - 1/n (sum)^2 */
-	double deviation;
-
-	/* sum of samples */
-	double sum;
-
-	/* sum of samples^2 */
-	double sum2;
-
-//	/* sum of ln(measured) */
-//	double sumlny;
-//
-//	/* sum of ln(size) */
-//	double sumlnx;
-//	double sumlnx2;
-//
-//	/* sum of ln(size) ln(measured) */
-//	double sumlnxlny;
-//
-	unsigned nsample;
-
-	uint32_t footprint;
-#ifdef STARPU_HAVE_WINDOWS
-	unsigned size; /* in bytes */
-#else
-	size_t size; /* in bytes */
-#endif
-};
-
-struct starpu_history_list_t {
-	struct starpu_history_list_t *next;
-	struct starpu_history_entry_t *entry;
-};
-
-struct starpu_model_list_t {
-	struct starpu_model_list_t *next;
-	struct starpu_perfmodel *model;
-};
-
-//
 ///* File format */
 //struct model_file_format {
 //	unsigned ncore_entries;