瀏覽代碼

- update Changelog and documentation with sched ctx's user_data functionality

Olivier Aumage 8 年之前
父節點
當前提交
3715866caf
共有 2 個文件被更改,包括 16 次插入0 次删除
  1. 4 0
      ChangeLog
  2. 12 0
      doc/doxygen/chapters/api/scheduling_contexts.doxy

+ 4 - 0
ChangeLog

@@ -22,6 +22,10 @@ New features:
   * New scheduler with heterogeneous priorities
   * Support priorities for data transfers.
 
+Small features:
+  * Scheduling contexts may now be associated a user data pointer at creation
+    time, that can later be recalled through starpu_sched_ctx_get_user_data().
+
 Changes:
   * Vastly improve simgrid simulation time.
 

+ 12 - 0
doc/doxygen/chapters/api/scheduling_contexts.doxy

@@ -71,6 +71,9 @@ scheduling policy.
 <li> ::STARPU_SCHED_CTX_POLICY_INIT, followed by a function pointer
 (ie. void init_sched(void)) allowing to initialize the scheduling policy.
 </li>
+<li> ::STARPU_SCHED_CTX_USER_DATA, followed by a pointer
+to a custom user data structure, to be retrieved by \ref starpu_sched_ctx_get_user_data().
+</li>
 </ul>
 
 \def STARPU_SCHED_CTX_POLICY_NAME
@@ -98,6 +101,11 @@ maximum scheduler priority value.
 This macro is used when calling starpu_sched_ctx_create() to specify a
 function pointer allowing to initialize the scheduling policy.
 
+\def STARPU_SCHED_CTX_USER_DATA
+\ingroup API_Scheduling_Contexts
+This macro is used when calling starpu_sched_ctx_create() to specify a
+pointer to some user data related to the context being created.
+
 \fn unsigned starpu_sched_ctx_create_inside_interval(const char *policy_name, const char *sched_ctx_name, int min_ncpus, int max_ncpus, int min_ngpus, int max_ngpus, unsigned allow_overlap)
 \ingroup API_Scheduling_Contexts
 Create a context indicating an approximate interval of resources
@@ -237,6 +245,10 @@ todo
 \ingroup API_Scheduling_Contexts
 todo
 
+\fn void *starpu_sched_ctx_get_user_data(unsigned sched_ctx_id)
+\ingroup API_Scheduling_Contexts
+Return the user data pointer associated to the scheduling context.
+
 @name Scheduling Context Worker Collection
 \ingroup API_Scheduling_Contexts