ソースを参照

macro definition

Andra Hugo 13 年 前
コミット
1a51425310
共有4 個のファイルを変更した9 個の追加6 個の削除を含む
  1. 1 1
      Makefile.am
  2. 5 3
      configure.ac
  3. 1 0
      include/starpu_config.h.in
  4. 2 2
      include/starpu_scheduler.h

+ 1 - 1
Makefile.am

@@ -44,7 +44,7 @@ if BUILD_STARPUFFT
 SUBDIRS += starpufft
 endif
 
-if BUILD_SCHED_CTX_HYPERVISOR
+if STARPU_BUILD_SCHED_CTX_HYPERVISOR
 SUBDIRS += sched_ctx_hypervisor
 endif
 

+ 5 - 3
configure.ac

@@ -239,16 +239,18 @@ AC_ARG_ENABLE([sched_ctx_hypervisor],
   [enable_sched_ctx_hypervisor="no"])
 
 if test "x$enable_sched_ctx_hypervisor" = "xyes"; then
-   AC_DEFINE(STARPU_USE_SCHED_CTX_HYPERVISOR, [1], [enable sched_ctx_hypervisor lib])
+  AC_DEFINE(STARPU_USE_SCHED_CTX_HYPERVISOR, [1], [enable sched_ctx_hypervisor lib])
 #   PKG_CHECK_MODULES([SCHED_CTX_HYPERVISOR], [libsched_ctx_hypervisor], [], build_sched_ctx_hypervisor="yes")
    STARPU_SCHED_CTX_HYPERVISOR="-lsched_ctx_hypervisor"
-   AC_SUBST(STARPU_SCHED_CTX_HYPERVISOR)
+#   AC_SUBST(STARPU_USE_SCHED_CTX_HYPERVISOR, $enable_sched_ctx_hypervisor)
    build_sched_ctx_hypervisor="yes"
 else
    build_sched_ctx_hypervisor="no"
+   exit 1
 fi
 
-AM_CONDITIONAL([BUILD_SCHED_CTX_HYPERVISOR], [test "x$build_sched_ctx_hypervisor" = "xyes"])
+
+AM_CONDITIONAL([STARPU_BUILD_SCHED_CTX_HYPERVISOR], [test "x$build_sched_ctx_hypervisor" = "xyes"])
 AM_CONDITIONAL([STARPU_USE_SCHED_CTX_HYPERVISOR], [test "x$build_sched_ctx_hypervisor" = "xyes"])
 ###############################################################################
 #                                                                             #

+ 1 - 0
include/starpu_config.h.in

@@ -72,6 +72,7 @@
 #undef STARPU_NMAXWORKERS
 #undef STARPU_NMAX_SCHED_CTXS
 #undef STARPU_MAXIMPLEMENTATIONS
+#undef STARPU_USE_SCHED_CTX_HYPERVISOR
 
 /* Define to 1 if you have the <glpk.h> header file. */
 #undef HAVE_GLPK_H

+ 2 - 2
include/starpu_scheduler.h

@@ -158,11 +158,11 @@ struct starpu_performance_counters {
 	void (*notify_submitted_job)(struct starpu_task *task, uint32_t footprint);
 };
 
-#ifdef STARPU_BUILD_SCHED_CTX_HYPERVISOR
+#ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
 void starpu_set_perf_counters(unsigned sched_ctx_id, struct starpu_performance_counters *perf_counters);
 void starpu_call_poped_task_cb(int workerid, unsigned sched_ctx_id, double flops);
 void starpu_call_pushed_task_cb(int workerid, unsigned sched_ctx_id);
-#endif //STARPU_BUILD_SCHED_CTX_HYPERVISOR
+#endif //STARPU_USE_SCHED_CTX_HYPERVISOR
 
 unsigned starpu_create_sched_ctx(const char *policy_name, int *workerids_ctx, int nworkers_ctx, const char *sched_name);