Browse Source

Make epilogue_callback_func documentation more explicit

Samuel Thibault 4 years ago
parent
commit
f2dcb038e6
1 changed files with 25 additions and 20 deletions
  1. 25 20
      include/starpu_task.h

+ 25 - 20
include/starpu_task.h

@@ -789,11 +789,34 @@ struct starpu_task
 
 	/**
 	   Optional field, the default value is <c>NULL</c>. This is a
+	   function pointer of prototype <c>void (*f)(void *)</c> which
+	   specifies a possible callback. If this pointer is non-<c>NULL</c>,
+	   the callback function is executed on the host after the execution of
+	   the task. Contrary to starpu_task::callback_func, it is called
+	   before releasing tasks which depend on this task, so those cannot be
+	   already executing. The callback is passed
+	   the value contained in the starpu_task::epilogue_callback_arg field.
+	   No callback is executed if the field is set to <c>NULL</c>.
+	*/
+	void (*epilogue_callback_func)(void *);
+
+	/**
+	   Optional field, the default value is <c>NULL</c>. This is
+	   the pointer passed to the epilogue callback function. This field is
+	   ignored if the field starpu_task::epilogue_callback_func is set to
+	   <c>NULL</c>.
+	*/
+	void *epilogue_callback_arg;
+
+	/**
+	   Optional field, the default value is <c>NULL</c>. This is a
 	   function pointer of prototype <c>void (*f)(void *)</c>
 	   which specifies a possible callback. If this pointer is
 	   non-<c>NULL</c>, the callback function is executed on the
-	   host after the execution of the task. Tasks which depend on
-	   it might already be executing. The callback is passed the
+	   host after the execution of the task. Contrary to
+	   starpu_task::epilogue_callback, it is called after releasing
+	   tasks which depend on this task, so those
+	   might already be executing. The callback is passed the
 	   value contained in the starpu_task::callback_arg field. No
 	   callback is executed if the field is set to <c>NULL</c>.
 
@@ -821,24 +844,6 @@ struct starpu_task
 
 	/**
 	   Optional field, the default value is <c>NULL</c>. This is a
-	   function pointer of prototype <c>void (*f)(void *)</c> which specifies
-	   a possible callback just as starpu_task::callback_func. But this function
-	   is executed before task dependencies release. The callback is passed
-	   the value contained in the starpu_task::epilogue_callback_arg field.
-	   No callback is executed if the field is set to <c>NULL</c>.
-	*/
-	void (*epilogue_callback_func)(void *);
-
-	/**
-	   Optional field, the default value is <c>NULL</c>. This is
-	   the pointer passed to the epilogue callback function. This field is
-	   ignored if the field starpu_task::epilogue_callback_func is set to
-	   <c>NULL</c>.
-	*/
-	void *epilogue_callback_arg;
-
-	/**
-	   Optional field, the default value is <c>NULL</c>. This is a
 	   function pointer of prototype <c>void (*f)(void *)</c>
 	   which specifies a possible callback. If this pointer is
 	   non-<c>NULL</c>, the callback function is executed on the