Explorar el Código

Driver API: rename starpu_set_end_of_submissions into starpu_drivers_request_termination and document it

Nathalie Furmento hace 13 años
padre
commit
74e3d138f2
Se han modificado 4 ficheros con 8 adiciones y 4 borrados
  1. 4 0
      doc/chapters/advanced-api.texi
  2. 1 1
      examples/gl_interop/gl_interop.c
  3. 2 2
      include/starpu.h
  4. 1 1
      src/core/task.c

+ 4 - 0
doc/chapters/advanced-api.texi

@@ -719,6 +719,10 @@ Deinitialize the given driver. Returns 0 on success, -EINVAL if
 STARPU_CUDA_WORKER or STARPU_OPENCL_WORKER).
 @end deftypefun
 
+@deftypefun void starpu_drivers_request_termination(void)
+Notify all running drivers they should terminate.
+@end deftypefun
+
 @node Example
 @subsection Example
 

+ 1 - 1
examples/gl_interop/gl_interop.c

@@ -70,7 +70,7 @@ void callback_func(void *foo) {
 	printf("rendering done\n");
 
 	/* Tell it was already the last submitted task */
-	starpu_set_end_of_submissions();
+	starpu_drivers_request_termination();
 }
 
 int main(int argc, char **argv)

+ 2 - 2
include/starpu.h

@@ -202,8 +202,8 @@ void starpu_worker_get_name(int id, char *dst, size_t maxlen);
  */
 int starpu_worker_get_devid(int id);
 
-int starpu_driver_run(struct starpu_driver *);
-void starpu_set_end_of_submissions(void);
+int starpu_driver_run(struct starpu_driver *d);
+void starpu_drivers_request_termination(void);
 
 int starpu_driver_init(struct starpu_driver *d);
 int starpu_driver_run_once(struct starpu_driver *d);

+ 1 - 1
src/core/task.c

@@ -613,7 +613,7 @@ void _starpu_decrement_nsubmitted_tasks(void)
 }
 
 void
-starpu_set_end_of_submissions(void)
+starpu_drivers_request_termination(void)
 {
 	struct _starpu_machine_config *config = _starpu_get_machine_config();