Browse Source

Functions starpu_insert_task and starpu_mpi_insert_task are renamed
in starpu_task_insert and starpu_mpi_task_insert.
Old names are kept to avoid breaking old codes.

Nathalie Furmento 12 years ago
parent
commit
98d9eb5c64
62 changed files with 334 additions and 321 deletions
  1. 3 0
      ChangeLog
  2. 20 20
      doc/doxygen/chapters/advanced_examples.doxy
  3. 14 10
      doc/doxygen/chapters/api/insert_task.doxy
  4. 8 4
      doc/doxygen/chapters/api/mpi.doxy
  5. 6 6
      doc/doxygen/chapters/mpi_support.doxy
  6. 5 5
      doc/doxygen/chapters/scheduling_context_hypervisor.doxy
  7. 1 1
      doc/doxygen/chapters/scheduling_contexts.doxy
  8. 4 4
      examples/basic_examples/dynamic_handles.c
  9. 1 1
      examples/binary/binary.c
  10. 1 1
      examples/callback/prologue.c
  11. 12 12
      examples/cg/cg_kernels.c
  12. 7 7
      examples/cholesky/cholesky_implicit.c
  13. 1 1
      examples/cpp/incrementer_cpp.cpp
  14. 14 14
      examples/interface/complex.c
  15. 3 3
      examples/mandelbrot/mandelbrot.c
  16. 8 8
      examples/pipeline/pipeline.c
  17. 6 6
      gcc-plugin/src/tasks.c
  18. 4 4
      gcc-plugin/tests/base.c
  19. 2 2
      gcc-plugin/tests/lib-user.c
  20. 10 10
      gcc-plugin/tests/mocks.h
  21. 3 3
      gcc-plugin/tests/opencl.c
  22. 2 2
      gcc-plugin/tests/output-pointer.c
  23. 4 4
      gcc-plugin/tests/pointers.c
  24. 2 1
      include/starpu_task_util.h
  25. 4 4
      mpi/examples/complex/mpi_complex.c
  26. 15 15
      mpi/examples/matrix_decomposition/mpi_cholesky_codelets.c
  27. 42 42
      mpi/examples/mpi_lu/pxlu_implicit.c
  28. 1 1
      mpi/examples/stencil/stencil5.c
  29. 2 1
      mpi/include/starpu_mpi.h
  30. 2 2
      mpi/src/Makefile.am
  31. 1 1
      mpi/src/starpu_mpi.c
  32. 9 9
      mpi/src/starpu_mpi_insert_task.c
  33. 0 0
      mpi/src/starpu_mpi_task_insert.h
  34. 9 9
      mpi/tests/insert_task.c
  35. 3 3
      mpi/tests/insert_task_block.c
  36. 4 4
      mpi/tests/insert_task_cache.c
  37. 8 8
      mpi/tests/insert_task_owner.c
  38. 2 2
      mpi/tests/insert_task_owner2.c
  39. 2 2
      mpi/tests/insert_task_owner_data.c
  40. 2 2
      mpi/tests/mpi_reduction.c
  41. 1 1
      mpi/tests/mpi_scatter_gather.c
  42. 14 14
      sc_hypervisor/examples/cholesky/cholesky_implicit.c
  43. 3 3
      src/Makefile.am
  44. 7 7
      src/util/starpu_insert_task.c
  45. 10 10
      src/util/starpu_insert_task_utils.c
  46. 7 7
      src/util/starpu_insert_task_utils.h
  47. 4 4
      tests/datawizard/acquire_cb_insert.c
  48. 1 1
      tests/datawizard/commute.c
  49. 2 2
      tests/datawizard/data_lookup.c
  50. 4 4
      tests/datawizard/handle_to_pointer.c
  51. 1 1
      tests/datawizard/interfaces/test_interfaces.c
  52. 4 4
      tests/datawizard/lazy_allocation.c
  53. 1 1
      tests/datawizard/partition_lazy.c
  54. 3 3
      tests/datawizard/readonly.c
  55. 2 2
      tests/main/codelet_null_callback.c
  56. 6 6
      tests/main/deprecated_buffer.c
  57. 1 1
      tests/main/deprecated_func.c
  58. 7 7
      tests/main/insert_task.c
  59. 2 2
      tests/main/insert_task_array.c
  60. 3 3
      tests/main/insert_task_nullcodelet.c
  61. 3 3
      tests/microbenchs/matrix_as_vector.c
  62. 1 1
      tests/perfmodels/valid_model.c

+ 3 - 0
ChangeLog

@@ -66,6 +66,9 @@ Small features:
     enable automatic free(cl_arg); free(callback_arg);
     enable automatic free(cl_arg); free(callback_arg);
     free(prologue_callback_arg) on task destroy.
     free(prologue_callback_arg) on task destroy.
   * New function starpu_task_build
   * New function starpu_task_build
+  * Functions starpu_insert_task and starpu_mpi_insert_task are
+    renamed in starpu_task_insert and starpu_mpi_task_insert. Old
+    names are kept to avoid breaking old codes.
 
 
 Changes:
 Changes:
   * Fix of the livelock issue discovered while executing applications
   * Fix of the livelock issue discovered while executing applications

+ 20 - 20
doc/doxygen/chapters/advanced_examples.doxy

@@ -481,7 +481,7 @@ to a less optimal solution. This increases even more computation time.
 
 
 \section InsertTaskUtility Insert Task Utility
 \section InsertTaskUtility Insert Task Utility
 
 
-StarPU provides the wrapper function starpu_insert_task() to ease
+StarPU provides the wrapper function starpu_task_insert() to ease
 the creation and submission of tasks.
 the creation and submission of tasks.
 
 
 Here the implementation of the codelet:
 Here the implementation of the codelet:
@@ -508,17 +508,17 @@ struct starpu_codelet mycodelet = {
 };
 };
 \endcode
 \endcode
 
 
-And the call to the function starpu_insert_task():
+And the call to the function starpu_task_insert():
 
 
 \code{.c}
 \code{.c}
-starpu_insert_task(&mycodelet,
+starpu_task_insert(&mycodelet,
                    STARPU_VALUE, &ifactor, sizeof(ifactor),
                    STARPU_VALUE, &ifactor, sizeof(ifactor),
                    STARPU_VALUE, &ffactor, sizeof(ffactor),
                    STARPU_VALUE, &ffactor, sizeof(ffactor),
                    STARPU_RW, data_handles[0], STARPU_RW, data_handles[1],
                    STARPU_RW, data_handles[0], STARPU_RW, data_handles[1],
                    0);
                    0);
 \endcode
 \endcode
 
 
-The call to starpu_insert_task() is equivalent to the following
+The call to starpu_task_insert() is equivalent to the following
 code:
 code:
 
 
 \code{.c}
 \code{.c}
@@ -540,7 +540,7 @@ int ret = starpu_task_submit(task);
 Here a similar call using ::STARPU_DATA_ARRAY.
 Here a similar call using ::STARPU_DATA_ARRAY.
 
 
 \code{.c}
 \code{.c}
-starpu_insert_task(&mycodelet,
+starpu_task_insert(&mycodelet,
                    STARPU_DATA_ARRAY, data_handles, 2,
                    STARPU_DATA_ARRAY, data_handles, 2,
                    STARPU_VALUE, &ifactor, sizeof(ifactor),
                    STARPU_VALUE, &ifactor, sizeof(ifactor),
                    STARPU_VALUE, &ffactor, sizeof(ffactor),
                    STARPU_VALUE, &ffactor, sizeof(ffactor),
@@ -554,11 +554,11 @@ instance, assuming that the index variable <c>i</c> was registered as handle
 
 
 \code{.c}
 \code{.c}
 /* Compute which portion we will work on, e.g. pivot */
 /* Compute which portion we will work on, e.g. pivot */
-starpu_insert_task(&which_index, STARPU_W, i_handle, 0);
+starpu_task_insert(&which_index, STARPU_W, i_handle, 0);
 
 
 /* And submit the corresponding task */
 /* And submit the corresponding task */
 STARPU_DATA_ACQUIRE_CB(i_handle, STARPU_R,
 STARPU_DATA_ACQUIRE_CB(i_handle, STARPU_R,
-                       starpu_insert_task(&work, STARPU_RW, A_handle[i], 0));
+                       starpu_task_insert(&work, STARPU_RW, A_handle[i], 0));
 \endcode
 \endcode
 
 
 The macro ::STARPU_DATA_ACQUIRE_CB submits an asynchronous request for
 The macro ::STARPU_DATA_ACQUIRE_CB submits an asynchronous request for
@@ -637,7 +637,7 @@ dot products with partitioned vectors:
 
 
 \code{.c}
 \code{.c}
 for (b = 0; b < nblocks; b++)
 for (b = 0; b < nblocks; b++)
-    starpu_insert_task(&dot_kernel_cl,
+    starpu_task_insert(&dot_kernel_cl,
         STARPU_REDUX, dtq_handle,
         STARPU_REDUX, dtq_handle,
         STARPU_R, starpu_data_get_sub_data(v1, 1, b),
         STARPU_R, starpu_data_get_sub_data(v1, 1, b),
         STARPU_R, starpu_data_get_sub_data(v2, 1, b),
         STARPU_R, starpu_data_get_sub_data(v2, 1, b),
@@ -659,9 +659,9 @@ the initial status <c>register(NULL)</c>.
 The example <c>cg</c> also uses reduction for the blocked gemv kernel,
 The example <c>cg</c> also uses reduction for the blocked gemv kernel,
 leading to yet more relaxed dependencies and more parallelism.
 leading to yet more relaxed dependencies and more parallelism.
 
 
-::STARPU_REDUX can also be passed to starpu_mpi_insert_task() in the MPI
+::STARPU_REDUX can also be passed to starpu_mpi_task_insert() in the MPI
 case. That will however not produce any MPI communication, but just pass
 case. That will however not produce any MPI communication, but just pass
-::STARPU_REDUX to the underlying starpu_insert_task(). It is up to the
+::STARPU_REDUX to the underlying starpu_task_insert(). It is up to the
 application to call starpu_mpi_redux_data(), which posts tasks that will
 application to call starpu_mpi_redux_data(), which posts tasks that will
 reduce the partial results among MPI nodes into the MPI node which owns the
 reduce the partial results among MPI nodes into the MPI node which owns the
 data. For instance, some hypothetical application which collects partial results
 data. For instance, some hypothetical application which collects partial results
@@ -670,11 +670,11 @@ with a new reduction:
 
 
 \code{.c}
 \code{.c}
 for (i = 0; i < 100; i++) {
 for (i = 0; i < 100; i++) {
-    starpu_mpi_insert_task(MPI_COMM_WORLD, &init_res, STARPU_W, res, 0);
-    starpu_mpi_insert_task(MPI_COMM_WORLD, &work, STARPU_RW, A,
+    starpu_mpi_task_insert(MPI_COMM_WORLD, &init_res, STARPU_W, res, 0);
+    starpu_mpi_task_insert(MPI_COMM_WORLD, &work, STARPU_RW, A,
                STARPU_R, B, STARPU_REDUX, res, 0);
                STARPU_R, B, STARPU_REDUX, res, 0);
     starpu_mpi_redux_data(MPI_COMM_WORLD, res);
     starpu_mpi_redux_data(MPI_COMM_WORLD, res);
-    starpu_mpi_insert_task(MPI_COMM_WORLD, &work2, STARPU_RW, B, STARPU_R, res, 0);
+    starpu_mpi_task_insert(MPI_COMM_WORLD, &work2, STARPU_RW, B, STARPU_R, res, 0);
 }
 }
 \endcode
 \endcode
 
 
@@ -705,9 +705,9 @@ unregistration.
 
 
 \code{.c}
 \code{.c}
 starpu_vector_data_register(&handle, -1, 0, n, sizeof(float));
 starpu_vector_data_register(&handle, -1, 0, n, sizeof(float));
-starpu_insert_task(&produce_data, STARPU_W, handle, 0);
-starpu_insert_task(&compute_data, STARPU_RW, handle, 0);
-starpu_insert_task(&summarize_data, STARPU_R, handle, STARPU_W, result_handle, 0);
+starpu_task_insert(&produce_data, STARPU_W, handle, 0);
+starpu_task_insert(&compute_data, STARPU_RW, handle, 0);
+starpu_task_insert(&summarize_data, STARPU_R, handle, STARPU_W, result_handle, 0);
 starpu_data_unregister_submit(handle);
 starpu_data_unregister_submit(handle);
 \endcode
 \endcode
 
 
@@ -725,7 +725,7 @@ provides per-worker buffers without content consistency.
 \code{.c}
 \code{.c}
 starpu_vector_data_register(&workspace, -1, 0, sizeof(float));
 starpu_vector_data_register(&workspace, -1, 0, sizeof(float));
 for (i = 0; i < N; i++)
 for (i = 0; i < N; i++)
-    starpu_insert_task(&compute, STARPU_R, input[i],
+    starpu_task_insert(&compute, STARPU_R, input[i],
                        STARPU_SCRATCH, workspace, STARPU_W, output[i], 0);
                        STARPU_SCRATCH, workspace, STARPU_W, output[i], 0);
 \endcode
 \endcode
 
 
@@ -1028,7 +1028,7 @@ starpu_vector_data_register(&handle, starpu_worker_get_memory_node(workerid),
                             output, num_bytes / sizeof(float4), sizeof(float4));
                             output, num_bytes / sizeof(float4), sizeof(float4));
 
 
 /* The handle can now be used as usual */
 /* The handle can now be used as usual */
-starpu_insert_task(&cl, STARPU_RW, handle, 0);
+starpu_task_insert(&cl, STARPU_RW, handle, 0);
 
 
 /* ... */
 /* ... */
 
 
@@ -1122,7 +1122,7 @@ Complex data interfaces can then be registered to StarPU.
 \code{.c}
 \code{.c}
 double real = 45.0;
 double real = 45.0;
 double imaginary = 12.0;starpu_complex_data_register(&handle1, STARPU_MAIN_RAM, &real, &imaginary, 1);
 double imaginary = 12.0;starpu_complex_data_register(&handle1, STARPU_MAIN_RAM, &real, &imaginary, 1);
-starpu_insert_task(&cl_display, STARPU_R, handle1, 0);
+starpu_task_insert(&cl_display, STARPU_R, handle1, 0);
 \endcode
 \endcode
 
 
 and used by codelets.
 and used by codelets.
@@ -1186,7 +1186,7 @@ for(i=0 ; i<dummy_big_cl.nbuffers ; i++)
 {
 {
 	handles[i] = handle;
 	handles[i] = handle;
 }
 }
-starpu_insert_task(&dummy_big_cl,
+starpu_task_insert(&dummy_big_cl,
         	 STARPU_VALUE, &dummy_big_cl.nbuffers, sizeof(dummy_big_cl.nbuffers),
         	 STARPU_VALUE, &dummy_big_cl.nbuffers, sizeof(dummy_big_cl.nbuffers),
 		 STARPU_DATA_ARRAY, handles, dummy_big_cl.nbuffers,
 		 STARPU_DATA_ARRAY, handles, dummy_big_cl.nbuffers,
 		 0);
 		 0);

+ 14 - 10
doc/doxygen/chapters/api/insert_task.doxy

@@ -8,7 +8,11 @@
 
 
 /*! \defgroup API_Insert_Task Insert_Task
 /*! \defgroup API_Insert_Task Insert_Task
 
 
-\fn int starpu_insert_task(struct starpu_codelet *cl, ...)
+\def starpu_insert_task
+\ingroup API_Insert_Task
+Convenience macro for the function starpu_task_insert() which used to be called starpu_insert_task.
+
+\fn int starpu_task_insert(struct starpu_codelet *cl, ...)
 \ingroup API_Insert_Task
 \ingroup API_Insert_Task
 Create and submit a task corresponding to \p cl with the
 Create and submit a task corresponding to \p cl with the
 following arguments. The argument list must be zero-terminated.
 following arguments. The argument list must be zero-terminated.
@@ -35,18 +39,18 @@ implementation to retrieve them.
 
 
 \def STARPU_VALUE
 \def STARPU_VALUE
 \ingroup API_Insert_Task
 \ingroup API_Insert_Task
-this macro is used when calling starpu_insert_task(), and must
+this macro is used when calling starpu_task_insert(), and must
 be followed by a pointer to a constant value and the size of the
 be followed by a pointer to a constant value and the size of the
 constant
 constant
 
 
 \def STARPU_CALLBACK
 \def STARPU_CALLBACK
 \ingroup API_Insert_Task
 \ingroup API_Insert_Task
-this macro is used when calling starpu_insert_task(), and must
+this macro is used when calling starpu_task_insert(), and must
 be followed by a pointer to a callback function
 be followed by a pointer to a callback function
 
 
 \def STARPU_CALLBACK_WITH_ARG
 \def STARPU_CALLBACK_WITH_ARG
 \ingroup API_Insert_Task
 \ingroup API_Insert_Task
-this macro is used when calling starpu_insert_task(), and must
+this macro is used when calling starpu_task_insert(), and must
 be followed by two pointers: one to a callback function, and the other
 be followed by two pointers: one to a callback function, and the other
 to be given as an argument to the callback function; this is
 to be given as an argument to the callback function; this is
 equivalent to using both ::STARPU_CALLBACK and
 equivalent to using both ::STARPU_CALLBACK and
@@ -54,13 +58,13 @@ equivalent to using both ::STARPU_CALLBACK and
 
 
 \def STARPU_CALLBACK_ARG
 \def STARPU_CALLBACK_ARG
 \ingroup API_Insert_Task
 \ingroup API_Insert_Task
-this macro is used when calling starpu_insert_task(), and must
+this macro is used when calling starpu_task_insert(), and must
 be followed by a pointer to be given as an argument to the callback
 be followed by a pointer to be given as an argument to the callback
 function
 function
 
 
 \def STARPU_PRIORITY
 \def STARPU_PRIORITY
 \ingroup API_Insert_Task
 \ingroup API_Insert_Task
-this macro is used when calling starpu_insert_task(), and must
+this macro is used when calling starpu_task_insert(), and must
 be followed by a integer defining a priority level
 be followed by a integer defining a priority level
 
 
 \def STARPU_DATA_ARRAY
 \def STARPU_DATA_ARRAY
@@ -69,18 +73,18 @@ TODO
 
 
 \def STARPU_TAG
 \def STARPU_TAG
 \ingroup API_Insert_Task
 \ingroup API_Insert_Task
-this macro is used when calling starpu_insert_task(), and must be followed by a tag.
+this macro is used when calling starpu_task_insert(), and must be followed by a tag.
 
 
 \def STARPU_FLOPS
 \def STARPU_FLOPS
 \ingroup API_Insert_Task
 \ingroup API_Insert_Task
-this macro is used when calling starpu_insert_task(), and must
+this macro is used when calling starpu_task_insert(), and must
 be followed by an amount of floating point operations, as a double.
 be followed by an amount of floating point operations, as a double.
 Users <b>MUST</b> explicitly cast into double, otherwise parameter
 Users <b>MUST</b> explicitly cast into double, otherwise parameter
 passing will not work.
 passing will not work.
 
 
 \def STARPU_SCHED_CTX
 \def STARPU_SCHED_CTX
 \ingroup API_Insert_Task
 \ingroup API_Insert_Task
-this macro is used when calling starpu_insert_task(), and must
+this macro is used when calling starpu_task_insert(), and must
 be followed by the id of the scheduling context to which we want to
 be followed by the id of the scheduling context to which we want to
 submit the task.
 submit the task.
 
 
@@ -93,7 +97,7 @@ starpu_codelet_unpack_args().
 \fn void starpu_codelet_unpack_args(void *cl_arg, ...)
 \fn void starpu_codelet_unpack_args(void *cl_arg, ...)
 \ingroup API_Insert_Task
 \ingroup API_Insert_Task
 Retrieve the arguments of type ::STARPU_VALUE associated to a
 Retrieve the arguments of type ::STARPU_VALUE associated to a
-task automatically created using the function starpu_insert_task().
+task automatically created using the function starpu_task_insert().
 
 
 \fn struct starpu_task *starpu_task_build(struct starpu_codelet *cl, ...)
 \fn struct starpu_task *starpu_task_build(struct starpu_codelet *cl, ...)
 \ingroup API_Insert_Task
 \ingroup API_Insert_Task

+ 8 - 4
doc/doxygen/chapters/api/mpi.doxy

@@ -204,23 +204,27 @@ Returns the last value set by starpu_data_set_rank().
 
 
 \def STARPU_EXECUTE_ON_NODE
 \def STARPU_EXECUTE_ON_NODE
 \ingroup API_MPI_Support
 \ingroup API_MPI_Support
-this macro is used when calling starpu_mpi_insert_task(), and must be
+this macro is used when calling starpu_mpi_task_insert(), and must be
 followed by a integer value which specified the node on which to
 followed by a integer value which specified the node on which to
 execute the codelet.
 execute the codelet.
 
 
 \def STARPU_EXECUTE_ON_DATA
 \def STARPU_EXECUTE_ON_DATA
 \ingroup API_MPI_Support
 \ingroup API_MPI_Support
-this macro is used when calling starpu_mpi_insert_task(), and must be
+this macro is used when calling starpu_mpi_task_insert(), and must be
 followed by a data handle to specify that the node owning the given
 followed by a data handle to specify that the node owning the given
 data will execute the codelet.
 data will execute the codelet.
 
 
-\fn int starpu_mpi_insert_task(MPI_Comm comm, struct starpu_codelet *codelet, ...)
+\def starpu_mpi_insert_task
+\ingroup API_MPI_Support
+Convenience macro for the function starpu_mpi_task_insert() which used to be called starpu_mpi_insert_task.
+
+\fn int starpu_mpi_task_insert(MPI_Comm comm, struct starpu_codelet *codelet, ...)
 \ingroup API_MPI_Support
 \ingroup API_MPI_Support
 Create and submit a task corresponding to codelet with the following
 Create and submit a task corresponding to codelet with the following
 arguments. The argument list must be zero-terminated.
 arguments. The argument list must be zero-terminated.
 
 
 The arguments following the codelets are the same types as for the
 The arguments following the codelets are the same types as for the
-function starpu_insert_task(). The extra argument
+function starpu_task_insert(). The extra argument
 ::STARPU_EXECUTE_ON_NODE followed by an integer allows to specify the
 ::STARPU_EXECUTE_ON_NODE followed by an integer allows to specify the
 MPI node to execute the codelet. It is also possible to specify that
 MPI node to execute the codelet. It is also possible to specify that
 the node owning a specific data will execute the codelet, by using
 the node owning a specific data will execute the codelet, by using

+ 6 - 6
doc/doxygen/chapters/mpi_support.doxy

@@ -232,7 +232,7 @@ task, and trigger the required MPI transfers.
 
 
 The list of functions is described in \ref MPIInsertTask "MPI Insert Task".
 The list of functions is described in \ref MPIInsertTask "MPI Insert Task".
 
 
-Here an stencil example showing how to use starpu_mpi_insert_task(). One
+Here an stencil example showing how to use starpu_mpi_task_insert(). One
 first needs to define a distribution function which specifies the
 first needs to define a distribution function which specifies the
 locality of the data. Note that that distribution information needs to
 locality of the data. Note that that distribution information needs to
 be given to StarPU by calling starpu_data_set_rank(). A MPI tag
 be given to StarPU by calling starpu_data_set_rank(). A MPI tag
@@ -291,14 +291,14 @@ data which will be needed by the tasks that we will execute.
     }
     }
 \endcode
 \endcode
 
 
-Now starpu_mpi_insert_task() can be called for the different
+Now starpu_mpi_task_insert() can be called for the different
 steps of the application.
 steps of the application.
 
 
 \code{.c}
 \code{.c}
     for(loop=0 ; loop<niter; loop++)
     for(loop=0 ; loop<niter; loop++)
         for (x = 1; x < X-1; x++)
         for (x = 1; x < X-1; x++)
             for (y = 1; y < Y-1; y++)
             for (y = 1; y < Y-1; y++)
-                starpu_mpi_insert_task(MPI_COMM_WORLD, &stencil5_cl,
+                starpu_mpi_task_insert(MPI_COMM_WORLD, &stencil5_cl,
                                        STARPU_RW, data_handles[x][y],
                                        STARPU_RW, data_handles[x][y],
                                        STARPU_R, data_handles[x-1][y],
                                        STARPU_R, data_handles[x-1][y],
                                        STARPU_R, data_handles[x+1][y],
                                        STARPU_R, data_handles[x+1][y],
@@ -365,7 +365,7 @@ for(x = 0; x < nblocks ;  x++) {
     if (data_handles[x]) {
     if (data_handles[x]) {
         int owner = starpu_data_get_rank(data_handles[x]);
         int owner = starpu_data_get_rank(data_handles[x]);
         if (owner == rank) {
         if (owner == rank) {
-            starpu_insert_task(&cl, STARPU_RW, data_handles[x], 0);
+            starpu_task_insert(&cl, STARPU_RW, data_handles[x], 0);
         }
         }
     }
     }
 }
 }
@@ -383,9 +383,9 @@ MPI examples are available in the StarPU source code in mpi/examples:
 <ul>
 <ul>
 <li><c>complex</c> is a simple example using a user-define data interface over
 <li><c>complex</c> is a simple example using a user-define data interface over
 MPI (complex numbers),
 MPI (complex numbers),
-<li><c>stencil5</c> is a simple stencil example using <c>starpu_mpi_insert_task</c>,
+<li><c>stencil5</c> is a simple stencil example using starpu_mpi_task_insert(),
 <li><c>matrix_decomposition</c> is a cholesky decomposition example using
 <li><c>matrix_decomposition</c> is a cholesky decomposition example using
-<c>starpu_mpi_insert_task</c>. The non-distributed version can check for
+starpu_mpi_task_insert(). The non-distributed version can check for
 <algorithm correctness in 1-node configuration, the distributed version uses
 <algorithm correctness in 1-node configuration, the distributed version uses
 exactly the same source code, to be used over MPI,
 exactly the same source code, to be used over MPI,
 <li><c>mpi_lu</c> is an LU decomposition example, provided in three versions:
 <li><c>mpi_lu</c> is an LU decomposition example, provided in three versions:

+ 5 - 5
doc/doxygen/chapters/scheduling_context_hypervisor.doxy

@@ -76,7 +76,7 @@ The <b>Application driven</b> strategy uses the user's input concerning the mome
 Thus, the users tags the task that should trigger the resizing
 Thus, the users tags the task that should trigger the resizing
 process. We can set directly the field starpu_task::hypervisor_tag or
 process. We can set directly the field starpu_task::hypervisor_tag or
 use the macro ::STARPU_HYPERVISOR_TAG in the function
 use the macro ::STARPU_HYPERVISOR_TAG in the function
-starpu_insert_task().
+starpu_task_insert().
 
 
 \code{.c}
 \code{.c}
 task.hypervisor_tag = 2;
 task.hypervisor_tag = 2;
@@ -85,7 +85,7 @@ task.hypervisor_tag = 2;
 or
 or
 
 
 \code{.c}
 \code{.c}
-starpu_insert_task(&codelet,
+starpu_task_insert(&codelet,
 		    ...,
 		    ...,
 		    STARPU_HYPERVISOR_TAG, 2,
 		    STARPU_HYPERVISOR_TAG, 2,
                     0);
                     0);
@@ -131,7 +131,7 @@ The number of flops to be executed by a context are passed as
  (<c>sc_hypervisor_register_ctx(sched_ctx_id, flops)</c>) and the one
  (<c>sc_hypervisor_register_ctx(sched_ctx_id, flops)</c>) and the one
  to be executed by each task are passed when the task is submitted.
  to be executed by each task are passed when the task is submitted.
  The corresponding field is starpu_task::flops and the corresponding
  The corresponding field is starpu_task::flops and the corresponding
- macro in the function starpu_insert_task() is ::STARPU_FLOPS
+ macro in the function starpu_task_insert() is ::STARPU_FLOPS
  (<b>Caution</b>: but take care of passing a double, not an integer,
  (<b>Caution</b>: but take care of passing a double, not an integer,
  otherwise parameter passing will be bogus). When the task is executed
  otherwise parameter passing will be bogus). When the task is executed
  the resizing process is triggered.
  the resizing process is triggered.
@@ -143,7 +143,7 @@ task.flops = 100;
 or
 or
 
 
 \code{.c}
 \code{.c}
-starpu_insert_task(&codelet,
+starpu_task_insert(&codelet,
                     ...,
                     ...,
                     STARPU_FLOPS, (double) 100,
                     STARPU_FLOPS, (double) 100,
                     0);
                     0);
@@ -215,4 +215,4 @@ struct sc_hypervisor_policy dummy_policy =
 \endcode
 \endcode
 
 
 
 
-*/
+*/

+ 1 - 1
doc/doxygen/chapters/scheduling_contexts.doxy

@@ -97,7 +97,7 @@ the current thread will submit tasks to the coresponding context.
 When the application may not assign a thread of submission to each
 When the application may not assign a thread of submission to each
 context, the id of the context must be indicated by using the
 context, the id of the context must be indicated by using the
 function <c>starpu_task_submit_to_ctx</c> or the field <c>STARPU_SCHED_CTX</c> 
 function <c>starpu_task_submit_to_ctx</c> or the field <c>STARPU_SCHED_CTX</c> 
-for <c>starpu_insert_task</c>.
+for starpu_task_insert().
 
 
 \section DeletingAContext Deleting A Context
 \section DeletingAContext Deleting A Context
 
 

+ 4 - 4
examples/basic_examples/dynamic_handles.c

@@ -112,12 +112,12 @@ int main(int argc, char **argv)
 	if (ret == -ENODEV) goto enodev;
 	if (ret == -ENODEV) goto enodev;
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit");
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit");
 
 
-	ret = starpu_insert_task(&dummy_small_cl,
+	ret = starpu_task_insert(&dummy_small_cl,
 				 STARPU_VALUE, &dummy_small_cl.nbuffers, sizeof(dummy_small_cl.nbuffers),
 				 STARPU_VALUE, &dummy_small_cl.nbuffers, sizeof(dummy_small_cl.nbuffers),
 				 STARPU_RW, handle,
 				 STARPU_RW, handle,
 				 0);
 				 0);
 	if (ret == -ENODEV) goto enodev;
 	if (ret == -ENODEV) goto enodev;
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
         ret = starpu_task_wait_for_all();
         ret = starpu_task_wait_for_all();
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_wait_for_all");
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_wait_for_all");
 
 
@@ -126,12 +126,12 @@ int main(int argc, char **argv)
 	{
 	{
 		handles[i] = handle;
 		handles[i] = handle;
 	}
 	}
-	ret = starpu_insert_task(&dummy_big_cl,
+	ret = starpu_task_insert(&dummy_big_cl,
 				 STARPU_VALUE, &dummy_big_cl.nbuffers, sizeof(dummy_big_cl.nbuffers),
 				 STARPU_VALUE, &dummy_big_cl.nbuffers, sizeof(dummy_big_cl.nbuffers),
 				 STARPU_DATA_ARRAY, handles, dummy_big_cl.nbuffers,
 				 STARPU_DATA_ARRAY, handles, dummy_big_cl.nbuffers,
 				 0);
 				 0);
 	if (ret == -ENODEV) goto enodev;
 	if (ret == -ENODEV) goto enodev;
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
         ret = starpu_task_wait_for_all();
         ret = starpu_task_wait_for_all();
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_wait_for_all");
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_wait_for_all");
 	free(handles);
 	free(handles);

+ 1 - 1
examples/binary/binary.c

@@ -67,7 +67,7 @@ int compute(char *file_name, int load_as_file)
 
 
 	for (i = 0; i < niter; i++)
 	for (i = 0; i < niter; i++)
 	{
 	{
-		ret = starpu_insert_task(&cl, STARPU_RW, float_array_handle, 0);
+		ret = starpu_task_insert(&cl, STARPU_RW, float_array_handle, 0);
 		if (STARPU_UNLIKELY(ret == -ENODEV))
 		if (STARPU_UNLIKELY(ret == -ENODEV))
 		{
 		{
 			FPRINTF(stderr, "No worker may execute this task\n");
 			FPRINTF(stderr, "No worker may execute this task\n");

+ 1 - 1
examples/callback/prologue.c

@@ -80,7 +80,7 @@ int main(int argc, char **argv)
 
 
 	double *x = (double*)malloc(sizeof(double));
 	double *x = (double*)malloc(sizeof(double));
 	*x = -999.0;
 	*x = -999.0;
-	int ret2 = starpu_insert_task(&cl,
+	int ret2 = starpu_task_insert(&cl,
 				      STARPU_RW, handle,
 				      STARPU_RW, handle,
 				      STARPU_PROLOGUE_CALLBACK, prologue_callback_func,
 				      STARPU_PROLOGUE_CALLBACK, prologue_callback_func,
 				      STARPU_PROLOGUE_CALLBACK_ARG, x,
 				      STARPU_PROLOGUE_CALLBACK_ARG, x,

+ 12 - 12
examples/cg/cg_kernels.c

@@ -288,20 +288,20 @@ int dot_kernel(starpu_data_handle_t v1,
 	if (use_reduction)
 	if (use_reduction)
 		starpu_data_invalidate_submit(s);
 		starpu_data_invalidate_submit(s);
 	else {
 	else {
-		ret = starpu_insert_task(&bzero_variable_cl, STARPU_W, s, 0);
+		ret = starpu_task_insert(&bzero_variable_cl, STARPU_W, s, 0);
 		if (ret == -ENODEV) return ret;
 		if (ret == -ENODEV) return ret;
-		STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 	}
 	}
 
 
 	unsigned b;
 	unsigned b;
 	for (b = 0; b < nblocks; b++)
 	for (b = 0; b < nblocks; b++)
 	{
 	{
-		ret = starpu_insert_task(&dot_kernel_cl,
+		ret = starpu_task_insert(&dot_kernel_cl,
 					 use_reduction?STARPU_REDUX:STARPU_RW, s,
 					 use_reduction?STARPU_REDUX:STARPU_RW, s,
 					 STARPU_R, starpu_data_get_sub_data(v1, 1, b),
 					 STARPU_R, starpu_data_get_sub_data(v1, 1, b),
 					 STARPU_R, starpu_data_get_sub_data(v2, 1, b),
 					 STARPU_R, starpu_data_get_sub_data(v2, 1, b),
 					 0);
 					 0);
-		STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 	}
 	}
 	return 0;
 	return 0;
 }
 }
@@ -442,12 +442,12 @@ int gemv_kernel(starpu_data_handle_t v1,
 
 
 	for (b2 = 0; b2 < nblocks; b2++)
 	for (b2 = 0; b2 < nblocks; b2++)
 	{
 	{
-		ret = starpu_insert_task(&scal_kernel_cl,
+		ret = starpu_task_insert(&scal_kernel_cl,
 					 STARPU_RW, starpu_data_get_sub_data(v1, 1, b2),
 					 STARPU_RW, starpu_data_get_sub_data(v1, 1, b2),
 					 STARPU_VALUE, &p1, sizeof(p1),
 					 STARPU_VALUE, &p1, sizeof(p1),
 					 0);
 					 0);
 		if (ret == -ENODEV) return ret;
 		if (ret == -ENODEV) return ret;
-		STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 	}
 	}
 
 
 	for (b2 = 0; b2 < nblocks; b2++)
 	for (b2 = 0; b2 < nblocks; b2++)
@@ -455,14 +455,14 @@ int gemv_kernel(starpu_data_handle_t v1,
 		for (b1 = 0; b1 < nblocks; b1++)
 		for (b1 = 0; b1 < nblocks; b1++)
 		{
 		{
 			TYPE one = 1.0;
 			TYPE one = 1.0;
-			ret = starpu_insert_task(&gemv_kernel_cl,
+			ret = starpu_task_insert(&gemv_kernel_cl,
 						 use_reduction?STARPU_REDUX:STARPU_RW,	starpu_data_get_sub_data(v1, 1, b2),
 						 use_reduction?STARPU_REDUX:STARPU_RW,	starpu_data_get_sub_data(v1, 1, b2),
 						 STARPU_R,	starpu_data_get_sub_data(matrix, 2, b2, b1),
 						 STARPU_R,	starpu_data_get_sub_data(matrix, 2, b2, b1),
 						 STARPU_R,	starpu_data_get_sub_data(v2, 1, b1),
 						 STARPU_R,	starpu_data_get_sub_data(v2, 1, b1),
 						 STARPU_VALUE,	&one,	sizeof(one),
 						 STARPU_VALUE,	&one,	sizeof(one),
 						 STARPU_VALUE,	&p2,	sizeof(p2),
 						 STARPU_VALUE,	&p2,	sizeof(p2),
 						 0);
 						 0);
-			STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+			STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 		}
 		}
 	}
 	}
 	return 0;
 	return 0;
@@ -535,14 +535,14 @@ int scal_axpy_kernel(starpu_data_handle_t v1, TYPE p1,
 	unsigned b;
 	unsigned b;
 	for (b = 0; b < nblocks; b++)
 	for (b = 0; b < nblocks; b++)
 	{
 	{
-		ret = starpu_insert_task(&scal_axpy_kernel_cl,
+		ret = starpu_task_insert(&scal_axpy_kernel_cl,
 					 STARPU_RW, starpu_data_get_sub_data(v1, 1, b),
 					 STARPU_RW, starpu_data_get_sub_data(v1, 1, b),
 					 STARPU_R,  starpu_data_get_sub_data(v2, 1, b),
 					 STARPU_R,  starpu_data_get_sub_data(v2, 1, b),
 					 STARPU_VALUE, &p1, sizeof(p1),
 					 STARPU_VALUE, &p1, sizeof(p1),
 					 STARPU_VALUE, &p2, sizeof(p2),
 					 STARPU_VALUE, &p2, sizeof(p2),
 					 0);
 					 0);
 		if (ret == -ENODEV) return ret;
 		if (ret == -ENODEV) return ret;
-		STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 	}
 	}
 	return 0;
 	return 0;
 }
 }
@@ -609,13 +609,13 @@ int axpy_kernel(starpu_data_handle_t v1,
 	unsigned b;
 	unsigned b;
 	for (b = 0; b < nblocks; b++)
 	for (b = 0; b < nblocks; b++)
 	{
 	{
-		ret = starpu_insert_task(&axpy_kernel_cl,
+		ret = starpu_task_insert(&axpy_kernel_cl,
 					 STARPU_RW, starpu_data_get_sub_data(v1, 1, b),
 					 STARPU_RW, starpu_data_get_sub_data(v1, 1, b),
 					 STARPU_R,  starpu_data_get_sub_data(v2, 1, b),
 					 STARPU_R,  starpu_data_get_sub_data(v2, 1, b),
 					 STARPU_VALUE, &p1, sizeof(p1),
 					 STARPU_VALUE, &p1, sizeof(p1),
 					 0);
 					 0);
 		if (ret == -ENODEV) return ret;
 		if (ret == -ENODEV) return ret;
-		STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 	}
 	}
 	return 0;
 	return 0;
 }
 }

+ 7 - 7
examples/cholesky/cholesky_implicit.c

@@ -2,7 +2,7 @@
  *
  *
  * Copyright (C) 2009-2013  Université de Bordeaux 1
  * Copyright (C) 2009-2013  Université de Bordeaux 1
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
  * it under the terms of the GNU Lesser General Public License as published by
@@ -96,27 +96,27 @@ static int _cholesky(starpu_data_handle_t dataA, unsigned nblocks)
 	{
 	{
                 starpu_data_handle_t sdatakk = starpu_data_get_sub_data(dataA, 2, k, k);
                 starpu_data_handle_t sdatakk = starpu_data_get_sub_data(dataA, 2, k, k);
 
 
-                ret = starpu_insert_task(&cl11,
+                ret = starpu_task_insert(&cl11,
 					 STARPU_PRIORITY, prio_level,
 					 STARPU_PRIORITY, prio_level,
 					 STARPU_RW, sdatakk,
 					 STARPU_RW, sdatakk,
 					 STARPU_CALLBACK, (k == 3*nblocks/4)?callback_turn_spmd_on:NULL,
 					 STARPU_CALLBACK, (k == 3*nblocks/4)?callback_turn_spmd_on:NULL,
 					 STARPU_FLOPS, (double) FLOPS_SPOTRF(nn),
 					 STARPU_FLOPS, (double) FLOPS_SPOTRF(nn),
 					 0);
 					 0);
 		if (ret == -ENODEV) return 77;
 		if (ret == -ENODEV) return 77;
-		STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
 		for (j = k+1; j<nblocks; j++)
 		for (j = k+1; j<nblocks; j++)
 		{
 		{
                         starpu_data_handle_t sdatakj = starpu_data_get_sub_data(dataA, 2, k, j);
                         starpu_data_handle_t sdatakj = starpu_data_get_sub_data(dataA, 2, k, j);
 
 
-                        ret = starpu_insert_task(&cl21,
+                        ret = starpu_task_insert(&cl21,
 						 STARPU_PRIORITY, (j == k+1)?prio_level:STARPU_DEFAULT_PRIO,
 						 STARPU_PRIORITY, (j == k+1)?prio_level:STARPU_DEFAULT_PRIO,
 						 STARPU_R, sdatakk,
 						 STARPU_R, sdatakk,
 						 STARPU_RW, sdatakj,
 						 STARPU_RW, sdatakj,
 						 STARPU_FLOPS, (double) FLOPS_STRSM(nn, nn),
 						 STARPU_FLOPS, (double) FLOPS_STRSM(nn, nn),
 						 0);
 						 0);
 			if (ret == -ENODEV) return 77;
 			if (ret == -ENODEV) return 77;
-			STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+			STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
 			for (i = k+1; i<nblocks; i++)
 			for (i = k+1; i<nblocks; i++)
 			{
 			{
@@ -125,7 +125,7 @@ static int _cholesky(starpu_data_handle_t dataA, unsigned nblocks)
 					starpu_data_handle_t sdataki = starpu_data_get_sub_data(dataA, 2, k, i);
 					starpu_data_handle_t sdataki = starpu_data_get_sub_data(dataA, 2, k, i);
 					starpu_data_handle_t sdataij = starpu_data_get_sub_data(dataA, 2, i, j);
 					starpu_data_handle_t sdataij = starpu_data_get_sub_data(dataA, 2, i, j);
 
 
-					ret = starpu_insert_task(&cl22,
+					ret = starpu_task_insert(&cl22,
 								 STARPU_PRIORITY, ((i == k+1) && (j == k+1))?prio_level:STARPU_DEFAULT_PRIO,
 								 STARPU_PRIORITY, ((i == k+1) && (j == k+1))?prio_level:STARPU_DEFAULT_PRIO,
 								 STARPU_R, sdataki,
 								 STARPU_R, sdataki,
 								 STARPU_R, sdatakj,
 								 STARPU_R, sdatakj,
@@ -133,7 +133,7 @@ static int _cholesky(starpu_data_handle_t dataA, unsigned nblocks)
 								 STARPU_FLOPS, (double) FLOPS_SGEMM(nn, nn, nn),
 								 STARPU_FLOPS, (double) FLOPS_SGEMM(nn, nn, nn),
 								 0);
 								 0);
 					if (ret == -ENODEV) return 77;
 					if (ret == -ENODEV) return 77;
-					STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+					STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
                                 }
                                 }
 			}
 			}
 		}
 		}

+ 1 - 1
examples/cpp/incrementer_cpp.cpp

@@ -71,7 +71,7 @@ int main(int argc, char **argv)
 
 
 	for (i = 0; i < niter; i++)
 	for (i = 0; i < niter; i++)
 	{
 	{
-		ret = starpu_insert_task(&cl,
+		ret = starpu_task_insert(&cl,
 					 STARPU_RW, float_array_handle,
 					 STARPU_RW, float_array_handle,
 					 0);
 					 0);
                 if (STARPU_UNLIKELY(ret == -ENODEV))
                 if (STARPU_UNLIKELY(ret == -ENODEV))

+ 14 - 14
examples/interface/complex.c

@@ -93,21 +93,21 @@ int main(int argc, char **argv)
 	starpu_complex_data_register(&handle1, STARPU_MAIN_RAM, &real, &imaginary, 1);
 	starpu_complex_data_register(&handle1, STARPU_MAIN_RAM, &real, &imaginary, 1);
 	starpu_complex_data_register(&handle2, STARPU_MAIN_RAM, &copy_real, &copy_imaginary, 1);
 	starpu_complex_data_register(&handle2, STARPU_MAIN_RAM, &copy_real, &copy_imaginary, 1);
 
 
-	ret = starpu_insert_task(&cl_display, STARPU_VALUE, "handle1", strlen("handle1"), STARPU_R, handle1, 0);
+	ret = starpu_task_insert(&cl_display, STARPU_VALUE, "handle1", strlen("handle1"), STARPU_R, handle1, 0);
 	if (ret == -ENODEV) goto end;
 	if (ret == -ENODEV) goto end;
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
-	ret = starpu_insert_task(&cl_display, STARPU_VALUE, "handle2", strlen("handle2"), STARPU_R, handle2, 0);
+	ret = starpu_task_insert(&cl_display, STARPU_VALUE, "handle2", strlen("handle2"), STARPU_R, handle2, 0);
 	if (ret == -ENODEV) goto end;
 	if (ret == -ENODEV) goto end;
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
-	ret = starpu_insert_task(&cl_compare,
+	ret = starpu_task_insert(&cl_compare,
 				 STARPU_R, handle1,
 				 STARPU_R, handle1,
 				 STARPU_R, handle2,
 				 STARPU_R, handle2,
 				 STARPU_VALUE, &compare_ptr, sizeof(compare_ptr),
 				 STARPU_VALUE, &compare_ptr, sizeof(compare_ptr),
 				 0);
 				 0);
 	if (ret == -ENODEV) goto end;
 	if (ret == -ENODEV) goto end;
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 	starpu_task_wait_for_all();
 	starpu_task_wait_for_all();
 	if (compare != 0)
 	if (compare != 0)
 	{
 	{
@@ -115,28 +115,28 @@ int main(int argc, char **argv)
 	     goto end;
 	     goto end;
 	}
 	}
 
 
-	ret = starpu_insert_task(&cl_copy,
+	ret = starpu_task_insert(&cl_copy,
 				 STARPU_R, handle1,
 				 STARPU_R, handle1,
 				 STARPU_W, handle2,
 				 STARPU_W, handle2,
 				 0);
 				 0);
 	if (ret == -ENODEV) goto end;
 	if (ret == -ENODEV) goto end;
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
-	ret = starpu_insert_task(&cl_display, STARPU_VALUE, "handle1", strlen("handle1"), STARPU_R, handle1, 0);
+	ret = starpu_task_insert(&cl_display, STARPU_VALUE, "handle1", strlen("handle1"), STARPU_R, handle1, 0);
 	if (ret == -ENODEV) goto end;
 	if (ret == -ENODEV) goto end;
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
-	ret = starpu_insert_task(&cl_display, STARPU_VALUE, "handle2", strlen("handle2"), STARPU_R, handle2, 0);
+	ret = starpu_task_insert(&cl_display, STARPU_VALUE, "handle2", strlen("handle2"), STARPU_R, handle2, 0);
 	if (ret == -ENODEV) goto end;
 	if (ret == -ENODEV) goto end;
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
-	ret = starpu_insert_task(&cl_compare,
+	ret = starpu_task_insert(&cl_compare,
 				 STARPU_R, handle1,
 				 STARPU_R, handle1,
 				 STARPU_R, handle2,
 				 STARPU_R, handle2,
 				 STARPU_VALUE, &compare_ptr, sizeof(compare_ptr),
 				 STARPU_VALUE, &compare_ptr, sizeof(compare_ptr),
 				 0);
 				 0);
 	if (ret == -ENODEV) goto end;
 	if (ret == -ENODEV) goto end;
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
 	starpu_task_wait_for_all();
 	starpu_task_wait_for_all();
 
 

+ 3 - 3
examples/mandelbrot/mandelbrot.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
  * Copyright (C) 2010, 2011  Université de Bordeaux 1
  * Copyright (C) 2010, 2011  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
  * it under the terms of the GNU Lesser General Public License as published by
@@ -529,7 +529,7 @@ int main(int argc, char **argv)
 			per_block_cnt[iby] = 0;
 			per_block_cnt[iby] = 0;
 			int *pcnt = &per_block_cnt[iby];
 			int *pcnt = &per_block_cnt[iby];
 
 
-			ret = starpu_insert_task(use_spmd?&spmd_mandelbrot_cl:&mandelbrot_cl,
+			ret = starpu_task_insert(use_spmd?&spmd_mandelbrot_cl:&mandelbrot_cl,
 						 STARPU_VALUE, &iby, sizeof(iby),
 						 STARPU_VALUE, &iby, sizeof(iby),
 						 STARPU_VALUE, &block_size, sizeof(block_size),
 						 STARPU_VALUE, &block_size, sizeof(block_size),
 						 STARPU_VALUE, &stepX, sizeof(stepX),
 						 STARPU_VALUE, &stepX, sizeof(stepX),
@@ -537,7 +537,7 @@ int main(int argc, char **argv)
 						 STARPU_W, block_handles[iby],
 						 STARPU_W, block_handles[iby],
 						 STARPU_VALUE, &pcnt, sizeof(int *),
 						 STARPU_VALUE, &pcnt, sizeof(int *),
 						 0);
 						 0);
-			STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+			STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 		}
 		}
 
 
 		for (iby = 0; iby < nblocks; iby++)
 		for (iby = 0; iby < nblocks; iby++)

+ 8 - 8
examples/pipeline/pipeline.c

@@ -200,33 +200,33 @@ int main(void)
 			sem_wait(&sems[l%C]);
 			sem_wait(&sems[l%C]);
 
 
 		/* Now submit the next stage */
 		/* Now submit the next stage */
-		ret = starpu_insert_task(&pipeline_codelet_x,
+		ret = starpu_task_insert(&pipeline_codelet_x,
 				STARPU_W, buffersX[l%K],
 				STARPU_W, buffersX[l%K],
 				STARPU_VALUE, &x, sizeof(x),
 				STARPU_VALUE, &x, sizeof(x),
 				0);
 				0);
 		if (ret == -ENODEV) goto enodev;
 		if (ret == -ENODEV) goto enodev;
-		STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task x");
+		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert x");
 
 
-		ret = starpu_insert_task(&pipeline_codelet_x,
+		ret = starpu_task_insert(&pipeline_codelet_x,
 				STARPU_W, buffersY[l%K],
 				STARPU_W, buffersY[l%K],
 				STARPU_VALUE, &y, sizeof(y),
 				STARPU_VALUE, &y, sizeof(y),
 				0);
 				0);
 		if (ret == -ENODEV) goto enodev;
 		if (ret == -ENODEV) goto enodev;
-		STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task y");
+		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert y");
 
 
-		ret = starpu_insert_task(&pipeline_codelet_axpy,
+		ret = starpu_task_insert(&pipeline_codelet_axpy,
 				STARPU_R, buffersX[l%K],
 				STARPU_R, buffersX[l%K],
 				STARPU_RW, buffersY[l%K],
 				STARPU_RW, buffersY[l%K],
 				0);
 				0);
 		if (ret == -ENODEV) goto enodev;
 		if (ret == -ENODEV) goto enodev;
-		STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task axpy");
+		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert axpy");
 
 
-		ret = starpu_insert_task(&pipeline_codelet_sum,
+		ret = starpu_task_insert(&pipeline_codelet_sum,
 				STARPU_R, buffersY[l%K],
 				STARPU_R, buffersY[l%K],
 				STARPU_CALLBACK_WITH_ARG, (void (*)(void*))sem_post, &sems[l%C],
 				STARPU_CALLBACK_WITH_ARG, (void (*)(void*))sem_post, &sems[l%C],
 				0);
 				0);
 		if (ret == -ENODEV) goto enodev;
 		if (ret == -ENODEV) goto enodev;
-		STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task sum");
+		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert sum");
 	}
 	}
 	starpu_task_wait_for_all();
 	starpu_task_wait_for_all();
 
 

+ 6 - 6
gcc-plugin/src/tasks.c

@@ -525,7 +525,7 @@ declare_codelet (tree task_decl)
   return cl_decl;
   return cl_decl;
 }
 }
 
 
-/* Build the body of TASK_DECL, which will call `starpu_insert_task'.  */
+/* Build the body of TASK_DECL, which will call `starpu_task_insert'.  */
 
 
 void
 void
 define_task (tree task_decl)
 define_task (tree task_decl)
@@ -583,22 +583,22 @@ define_task (tree task_decl)
   /* Introduce a local variable to hold the error code.  */
   /* Introduce a local variable to hold the error code.  */
 
 
   tree error_var = build_decl (loc, VAR_DECL,
   tree error_var = build_decl (loc, VAR_DECL,
-  			       create_tmp_var_name (".insert_task_error"),
+  			       create_tmp_var_name (".task_insert_error"),
   			       integer_type_node);
   			       integer_type_node);
   DECL_CONTEXT (error_var) = task_decl;
   DECL_CONTEXT (error_var) = task_decl;
   DECL_ARTIFICIAL (error_var) = true;
   DECL_ARTIFICIAL (error_var) = true;
 
 
   /* Build this:
   /* Build this:
 
 
-       err = starpu_insert_task (...);
+       err = starpu_task_insert (...);
        if (err != 0)
        if (err != 0)
          { printf ...; abort (); }
          { printf ...; abort (); }
    */
    */
 
 
-  static tree insert_task_fn;
-  LOOKUP_STARPU_FUNCTION (insert_task_fn, "starpu_insert_task");
+  static tree task_insert_fn;
+  LOOKUP_STARPU_FUNCTION (task_insert_fn, "starpu_task_insert");
 
 
-  tree call = build_call_expr_loc_vec (loc, insert_task_fn, args);
+  tree call = build_call_expr_loc_vec (loc, task_insert_fn, args);
 
 
   tree assignment = build2 (INIT_EXPR, TREE_TYPE (error_var),
   tree assignment = build2 (INIT_EXPR, TREE_TYPE (error_var),
   			    error_var, call);
   			    error_var, call);

+ 4 - 4
gcc-plugin/tests/base.c

@@ -106,7 +106,7 @@ main (int argc, char *argv[])
   unsigned char y = 77;
   unsigned char y = 77;
   long y_as_long_int = 77;
   long y_as_long_int = 77;
 
 
-  struct insert_task_argument expected[] =
+  struct task_insert_argument expected[] =
     {
     {
       { STARPU_VALUE, &x, sizeof x },
       { STARPU_VALUE, &x, sizeof x },
       { STARPU_VALUE, &y, sizeof y },
       { STARPU_VALUE, &y, sizeof y },
@@ -114,7 +114,7 @@ main (int argc, char *argv[])
       { 0, 0, 0 }
       { 0, 0, 0 }
     };
     };
 
 
-  expected_insert_task_arguments = expected;
+  expected_task_insert_arguments = expected;
 
 
   /* Invoke the task, which should make sure it gets called with
   /* Invoke the task, which should make sure it gets called with
      EXPECTED.  */
      EXPECTED.  */
@@ -135,14 +135,14 @@ main (int argc, char *argv[])
 
 
   assert (tasks_submitted == 9);
   assert (tasks_submitted == 9);
 
 
-  struct insert_task_argument expected2[] =
+  struct task_insert_argument expected2[] =
     {
     {
       { STARPU_VALUE, &x, sizeof x },
       { STARPU_VALUE, &x, sizeof x },
       { 0, 0, 0 }
       { 0, 0, 0 }
     };
     };
 
 
   tasks_submitted = 0;
   tasks_submitted = 0;
-  expected_insert_task_arguments = expected2;
+  expected_task_insert_arguments = expected2;
 
 
   my_other_task (42);
   my_other_task (42);
   assert (tasks_submitted == 1);
   assert (tasks_submitted == 1);

+ 2 - 2
gcc-plugin/tests/lib-user.c

@@ -38,7 +38,7 @@ main (int argc, char *argv[])
   static const char forty_two = 42;
   static const char forty_two = 42;
   static const int  sizeof_x = sizeof x;
   static const int  sizeof_x = sizeof x;
 
 
-  struct insert_task_argument expected_pointer_task[] =
+  struct task_insert_argument expected_pointer_task[] =
     {
     {
       { STARPU_VALUE, &forty_two, sizeof forty_two },
       { STARPU_VALUE, &forty_two, sizeof forty_two },
       { STARPU_R,  x },
       { STARPU_R,  x },
@@ -47,7 +47,7 @@ main (int argc, char *argv[])
       { 0, 0, 0 }
       { 0, 0, 0 }
     };
     };
 
 
-  expected_insert_task_arguments = expected_pointer_task;
+  expected_task_insert_arguments = expected_pointer_task;
 
 
   expected_register_arguments.pointer = (void *) x;
   expected_register_arguments.pointer = (void *) x;
   expected_register_arguments.elements = sizeof x / sizeof x[0];
   expected_register_arguments.elements = sizeof x / sizeof x[0];

+ 10 - 10
gcc-plugin/tests/mocks.h

@@ -62,7 +62,7 @@ typedef double         cl_double;
 /* Number of tasks submitted.  */
 /* Number of tasks submitted.  */
 static unsigned int tasks_submitted;
 static unsigned int tasks_submitted;
 
 
-struct insert_task_argument
+struct task_insert_argument
 {
 {
   /* `STARPU_VALUE', etc. */
   /* `STARPU_VALUE', etc. */
   int type;
   int type;
@@ -75,18 +75,18 @@ struct insert_task_argument
 };
 };
 
 
 /* Pointer to a zero-terminated array listing the expected
 /* Pointer to a zero-terminated array listing the expected
-   `starpu_insert_task' arguments.  */
-const struct insert_task_argument *expected_insert_task_arguments;
+   `starpu_task_insert' arguments.  */
+const struct task_insert_argument *expected_task_insert_arguments;
 
 
 /* Expected targets of the codelets submitted.  */
 /* Expected targets of the codelets submitted.  */
-static int expected_insert_task_targets = STARPU_CPU | STARPU_OPENCL;
+static int expected_task_insert_targets = STARPU_CPU | STARPU_OPENCL;
 
 
 
 
 int
 int
-starpu_insert_task (struct starpu_codelet *cl, ...)
+starpu_task_insert (struct starpu_codelet *cl, ...)
 {
 {
   assert (cl->name != NULL && strlen (cl->name) > 0);
   assert (cl->name != NULL && strlen (cl->name) > 0);
-  assert (cl->where == expected_insert_task_targets);
+  assert (cl->where == expected_task_insert_targets);
 
 
   assert ((cl->where & STARPU_CPU) == 0
   assert ((cl->where & STARPU_CPU) == 0
 	  ? cl->cpu_funcs[0] == NULL
 	  ? cl->cpu_funcs[0] == NULL
@@ -106,8 +106,8 @@ starpu_insert_task (struct starpu_codelet *cl, ...)
 
 
   va_start (args, cl);
   va_start (args, cl);
 
 
-  const struct insert_task_argument *expected;
-  for (expected = expected_insert_task_arguments,
+  const struct task_insert_argument *expected;
+  for (expected = expected_task_insert_arguments,
 	 cl_args_offset = 1, scalars = 0, pointers = 0;
 	 cl_args_offset = 1, scalars = 0, pointers = 0;
        expected->type != 0;
        expected->type != 0;
        expected++)
        expected++)
@@ -528,9 +528,9 @@ clSetKernelArg (cl_kernel kernel, cl_uint index, size_t size,
 		const void *value)
 		const void *value)
 {
 {
   size_t n;
   size_t n;
-  const struct insert_task_argument *arg;
+  const struct task_insert_argument *arg;
 
 
-  for (n = 0, arg = expected_insert_task_arguments;
+  for (n = 0, arg = expected_task_insert_arguments;
        n < index;
        n < index;
        n++, arg++)
        n++, arg++)
     assert (arg->pointer != NULL);
     assert (arg->pointer != NULL);

+ 3 - 3
gcc-plugin/tests/opencl.c

@@ -46,15 +46,15 @@ main ()
 #pragma starpu register a
 #pragma starpu register a
 
 
   static int x = 123;
   static int x = 123;
-  struct insert_task_argument expected[] =
+  struct task_insert_argument expected[] =
     {
     {
       { STARPU_VALUE, &x, sizeof x },
       { STARPU_VALUE, &x, sizeof x },
       { STARPU_RW, a },
       { STARPU_RW, a },
       { 0, 0, 0 }
       { 0, 0, 0 }
     };
     };
 
 
-  expected_insert_task_arguments = expected;
-  expected_insert_task_targets = STARPU_OPENCL;
+  expected_task_insert_arguments = expected;
+  expected_task_insert_targets = STARPU_OPENCL;
   size_t y = 8; expected_cl_enqueue_kernel_arguments.global_work_size = &y;
   size_t y = 8; expected_cl_enqueue_kernel_arguments.global_work_size = &y;
 
 
   my_task (123, a);
   my_task (123, a);

+ 2 - 2
gcc-plugin/tests/output-pointer.c

@@ -84,14 +84,14 @@ main (int argc, char *argv[])
   expected_register_arguments.element_size = sizeof x[0];
   expected_register_arguments.element_size = sizeof x[0];
   starpu_vector_data_register (&handle, STARPU_MAIN_RAM, (uintptr_t) x, 42, sizeof x[0]);
   starpu_vector_data_register (&handle, STARPU_MAIN_RAM, (uintptr_t) x, 42, sizeof x[0]);
 
 
-  struct insert_task_argument expected[] =
+  struct task_insert_argument expected[] =
     {
     {
       { STARPU_VALUE, &size, sizeof size },
       { STARPU_VALUE, &size, sizeof size },
       { STARPU_W, x },
       { STARPU_W, x },
       { 0, 0, 0 }
       { 0, 0, 0 }
     };
     };
 
 
-  expected_insert_task_arguments = expected;
+  expected_task_insert_arguments = expected;
 
 
   /* Invoke the task, which makes sure it gets called with EXPECTED.  */
   /* Invoke the task, which makes sure it gets called with EXPECTED.  */
   my_pointer_task (size, x);
   my_pointer_task (size, x);

+ 4 - 4
gcc-plugin/tests/pointers.c

@@ -92,14 +92,14 @@ main (int argc, char *argv[])
   expected_register_arguments.element_size = sizeof *y;
   expected_register_arguments.element_size = sizeof *y;
   starpu_vector_data_register (&handle, STARPU_MAIN_RAM, (uintptr_t) y, 1, sizeof *y);
   starpu_vector_data_register (&handle, STARPU_MAIN_RAM, (uintptr_t) y, 1, sizeof *y);
 
 
-  struct insert_task_argument expected_pointer_task[] =
+  struct task_insert_argument expected_pointer_task[] =
     {
     {
       { STARPU_R,  x },
       { STARPU_R,  x },
       { STARPU_RW, y },
       { STARPU_RW, y },
       { 0, 0, 0 }
       { 0, 0, 0 }
     };
     };
 
 
-  expected_insert_task_arguments = expected_pointer_task;
+  expected_task_insert_arguments = expected_pointer_task;
 
 
   /* Invoke the task, which should make sure it gets called with
   /* Invoke the task, which should make sure it gets called with
      EXPECTED.  */
      EXPECTED.  */
@@ -110,7 +110,7 @@ main (int argc, char *argv[])
 
 
   /* Likewise with `my_mixed_task'.  */
   /* Likewise with `my_mixed_task'.  */
 
 
-  struct insert_task_argument expected_mixed_task[] =
+  struct task_insert_argument expected_mixed_task[] =
     {
     {
       { STARPU_RW, x },
       { STARPU_RW, x },
       { STARPU_VALUE, &z, sizeof z },
       { STARPU_VALUE, &z, sizeof z },
@@ -118,7 +118,7 @@ main (int argc, char *argv[])
       { 0, 0, 0 }
       { 0, 0, 0 }
     };
     };
 
 
-  expected_insert_task_arguments = expected_mixed_task;
+  expected_task_insert_arguments = expected_mixed_task;
 
 
   my_mixed_task (x, 0x77, y);
   my_mixed_task (x, 0x77, y);
 
 

+ 2 - 1
include/starpu_task_util.h

@@ -47,7 +47,8 @@ void starpu_create_sync_task(starpu_tag_t sync_tag, unsigned ndeps, starpu_tag_t
 #define STARPU_PROLOGUE_CALLBACK_ARG (14<<16)
 #define STARPU_PROLOGUE_CALLBACK_ARG (14<<16)
 
 
 struct starpu_task *starpu_task_build(struct starpu_codelet *cl, ...);
 struct starpu_task *starpu_task_build(struct starpu_codelet *cl, ...);
-int starpu_insert_task(struct starpu_codelet *cl, ...);
+int starpu_task_insert(struct starpu_codelet *cl, ...);
+#define starpu_insert_task starpu_task_insert
 
 
 void starpu_codelet_unpack_args(void *cl_arg, ...);
 void starpu_codelet_unpack_args(void *cl_arg, ...);
 
 

+ 4 - 4
mpi/examples/complex/mpi_complex.c

@@ -77,17 +77,17 @@ int main(int argc, char **argv)
 		{
 		{
 			int *compare_ptr = &compare;
 			int *compare_ptr = &compare;
 
 
-			starpu_insert_task(&cl_display, STARPU_VALUE, "node0 initial value", strlen("node0 initial value"), STARPU_R, handle, 0);
+			starpu_task_insert(&cl_display, STARPU_VALUE, "node0 initial value", strlen("node0 initial value"), STARPU_R, handle, 0);
 			starpu_mpi_isend_detached(handle, 1, 10, MPI_COMM_WORLD, NULL, NULL);
 			starpu_mpi_isend_detached(handle, 1, 10, MPI_COMM_WORLD, NULL, NULL);
 			starpu_mpi_irecv_detached(handle2, 1, 20, MPI_COMM_WORLD, NULL, NULL);
 			starpu_mpi_irecv_detached(handle2, 1, 20, MPI_COMM_WORLD, NULL, NULL);
 
 
-			starpu_insert_task(&cl_display, STARPU_VALUE, "node0 received value", strlen("node0 received value"), STARPU_R, handle2, 0);
-			starpu_insert_task(&cl_compare, STARPU_R, handle, STARPU_R, handle2, STARPU_VALUE, &compare_ptr, sizeof(compare_ptr), 0);
+			starpu_task_insert(&cl_display, STARPU_VALUE, "node0 received value", strlen("node0 received value"), STARPU_R, handle2, 0);
+			starpu_task_insert(&cl_compare, STARPU_R, handle, STARPU_R, handle2, STARPU_VALUE, &compare_ptr, sizeof(compare_ptr), 0);
 		}
 		}
 		else if (rank == 1)
 		else if (rank == 1)
 		{
 		{
 			starpu_mpi_irecv_detached(handle, 0, 10, MPI_COMM_WORLD, NULL, NULL);
 			starpu_mpi_irecv_detached(handle, 0, 10, MPI_COMM_WORLD, NULL, NULL);
-			starpu_insert_task(&cl_display, STARPU_VALUE, "node1 received value", strlen("node1 received value"), STARPU_R, handle, 0);
+			starpu_task_insert(&cl_display, STARPU_VALUE, "node1 received value", strlen("node1 received value"), STARPU_R, handle, 0);
 			starpu_mpi_isend_detached(handle, 0, 20, MPI_COMM_WORLD, NULL, NULL);
 			starpu_mpi_isend_detached(handle, 0, 20, MPI_COMM_WORLD, NULL, NULL);
 		}
 		}
 
 

+ 15 - 15
mpi/examples/matrix_decomposition/mpi_cholesky_codelets.c

@@ -112,20 +112,20 @@ void dw_cholesky(float ***matA, unsigned ld, int rank, int nodes, double *timing
 		int prio = STARPU_DEFAULT_PRIO;
 		int prio = STARPU_DEFAULT_PRIO;
 		if (!noprio) prio = STARPU_MAX_PRIO;
 		if (!noprio) prio = STARPU_MAX_PRIO;
 
 
-		starpu_mpi_insert_task(MPI_COMM_WORLD, &cl11,
-				STARPU_PRIORITY, prio,
-				STARPU_RW, data_handles[k][k],
-				0);
+		starpu_mpi_task_insert(MPI_COMM_WORLD, &cl11,
+				       STARPU_PRIORITY, prio,
+				       STARPU_RW, data_handles[k][k],
+				       0);
 
 
 		for (j = k+1; j<nblocks; j++)
 		for (j = k+1; j<nblocks; j++)
 		{
 		{
 			prio = STARPU_DEFAULT_PRIO;
 			prio = STARPU_DEFAULT_PRIO;
 			if (!noprio&& (j == k+1)) prio = STARPU_MAX_PRIO;
 			if (!noprio&& (j == k+1)) prio = STARPU_MAX_PRIO;
-			starpu_mpi_insert_task(MPI_COMM_WORLD, &cl21,
-					STARPU_PRIORITY, prio,
-					STARPU_R, data_handles[k][k],
-					STARPU_RW, data_handles[k][j],
-					0);
+			starpu_mpi_task_insert(MPI_COMM_WORLD, &cl21,
+					       STARPU_PRIORITY, prio,
+					       STARPU_R, data_handles[k][k],
+					       STARPU_RW, data_handles[k][j],
+					       0);
 
 
 			for (i = k+1; i<nblocks; i++)
 			for (i = k+1; i<nblocks; i++)
 			{
 			{
@@ -133,12 +133,12 @@ void dw_cholesky(float ***matA, unsigned ld, int rank, int nodes, double *timing
 				{
 				{
 					prio = STARPU_DEFAULT_PRIO;
 					prio = STARPU_DEFAULT_PRIO;
 					if (!noprio && (i == k + 1) && (j == k +1) ) prio = STARPU_MAX_PRIO;
 					if (!noprio && (i == k + 1) && (j == k +1) ) prio = STARPU_MAX_PRIO;
-					starpu_mpi_insert_task(MPI_COMM_WORLD, &cl22,
-							STARPU_PRIORITY, prio,
-							STARPU_R, data_handles[k][i],
-							STARPU_R, data_handles[k][j],
-							STARPU_RW, data_handles[i][j],
-							0);
+					starpu_mpi_task_insert(MPI_COMM_WORLD, &cl22,
+							       STARPU_PRIORITY, prio,
+							       STARPU_R, data_handles[k][i],
+							       STARPU_R, data_handles[k][j],
+							       STARPU_RW, data_handles[i][j],
+							       0);
 				}
 				}
 			}
 			}
 		}
 		}

+ 42 - 42
mpi/examples/mpi_lu/pxlu_implicit.c

@@ -39,15 +39,15 @@ struct callback_arg {
 
 
 static void create_task_11(unsigned k)
 static void create_task_11(unsigned k)
 {
 {
-	starpu_mpi_insert_task(MPI_COMM_WORLD,
-			&STARPU_PLU(cl11),
-			STARPU_VALUE, &k, sizeof(k),
-			STARPU_VALUE, &k, sizeof(k),
-			STARPU_VALUE, &k, sizeof(k),
-			STARPU_RW, STARPU_PLU(get_block_handle)(k, k),
-			STARPU_PRIORITY, !no_prio ?
-				STARPU_MAX_PRIO : STARPU_MIN_PRIO,
-			0);
+	starpu_mpi_task_insert(MPI_COMM_WORLD,
+			       &STARPU_PLU(cl11),
+			       STARPU_VALUE, &k, sizeof(k),
+			       STARPU_VALUE, &k, sizeof(k),
+			       STARPU_VALUE, &k, sizeof(k),
+			       STARPU_RW, STARPU_PLU(get_block_handle)(k, k),
+			       STARPU_PRIORITY, !no_prio ?
+			       STARPU_MAX_PRIO : STARPU_MIN_PRIO,
+			       0);
 }
 }
 
 
 /*
 /*
@@ -57,17 +57,17 @@ static void create_task_11(unsigned k)
 static void create_task_12(unsigned k, unsigned j)
 static void create_task_12(unsigned k, unsigned j)
 {
 {
 #warning temporary fix 
 #warning temporary fix 
-	starpu_mpi_insert_task(MPI_COMM_WORLD,
-			//&STARPU_PLU(cl12),
-			&STARPU_PLU(cl21),
-			STARPU_VALUE, &j, sizeof(j),
-			STARPU_VALUE, &j, sizeof(j),
-			STARPU_VALUE, &k, sizeof(k),
-			STARPU_R, STARPU_PLU(get_block_handle)(k, k),
-			STARPU_RW, STARPU_PLU(get_block_handle)(k, j),
-			STARPU_PRIORITY, !no_prio && (j == k+1) ?
-				STARPU_MAX_PRIO : STARPU_MIN_PRIO,
-			0);
+	starpu_mpi_task_insert(MPI_COMM_WORLD,
+			       //&STARPU_PLU(cl12),
+			       &STARPU_PLU(cl21),
+			       STARPU_VALUE, &j, sizeof(j),
+			       STARPU_VALUE, &j, sizeof(j),
+			       STARPU_VALUE, &k, sizeof(k),
+			       STARPU_R, STARPU_PLU(get_block_handle)(k, k),
+			       STARPU_RW, STARPU_PLU(get_block_handle)(k, j),
+			       STARPU_PRIORITY, !no_prio && (j == k+1) ?
+			       STARPU_MAX_PRIO : STARPU_MIN_PRIO,
+			       0);
 }
 }
 
 
 /*
 /*
@@ -77,17 +77,17 @@ static void create_task_12(unsigned k, unsigned j)
 static void create_task_21(unsigned k, unsigned i)
 static void create_task_21(unsigned k, unsigned i)
 {
 {
 #warning temporary fix 
 #warning temporary fix 
-	starpu_mpi_insert_task(MPI_COMM_WORLD,
-			//&STARPU_PLU(cl21),
-			&STARPU_PLU(cl12),
-			STARPU_VALUE, &i, sizeof(i),
-			STARPU_VALUE, &i, sizeof(i),
-			STARPU_VALUE, &k, sizeof(k),
-			STARPU_R, STARPU_PLU(get_block_handle)(k, k),
-			STARPU_RW, STARPU_PLU(get_block_handle)(i, k),
-			STARPU_PRIORITY, !no_prio && (i == k+1) ?
-				STARPU_MAX_PRIO : STARPU_MIN_PRIO,
-			0);
+	starpu_mpi_task_insert(MPI_COMM_WORLD,
+			       //&STARPU_PLU(cl21),
+			       &STARPU_PLU(cl12),
+			       STARPU_VALUE, &i, sizeof(i),
+			       STARPU_VALUE, &i, sizeof(i),
+			       STARPU_VALUE, &k, sizeof(k),
+			       STARPU_R, STARPU_PLU(get_block_handle)(k, k),
+			       STARPU_RW, STARPU_PLU(get_block_handle)(i, k),
+			       STARPU_PRIORITY, !no_prio && (i == k+1) ?
+			       STARPU_MAX_PRIO : STARPU_MIN_PRIO,
+			       0);
 }
 }
 
 
 /*
 /*
@@ -96,17 +96,17 @@ static void create_task_21(unsigned k, unsigned i)
 
 
 static void create_task_22(unsigned k, unsigned i, unsigned j)
 static void create_task_22(unsigned k, unsigned i, unsigned j)
 {
 {
-	starpu_mpi_insert_task(MPI_COMM_WORLD,
-			&STARPU_PLU(cl22),
-			STARPU_VALUE, &i, sizeof(i),
-			STARPU_VALUE, &j, sizeof(j),
-			STARPU_VALUE, &k, sizeof(k),
-			STARPU_R, STARPU_PLU(get_block_handle)(k, j),
-			STARPU_R, STARPU_PLU(get_block_handle)(i, k),
-			STARPU_RW, STARPU_PLU(get_block_handle)(i, j),
-			STARPU_PRIORITY, !no_prio && (i == k + 1) && (j == k +1) ?
-				STARPU_MAX_PRIO : STARPU_MIN_PRIO,
-			0);
+	starpu_mpi_task_insert(MPI_COMM_WORLD,
+			       &STARPU_PLU(cl22),
+			       STARPU_VALUE, &i, sizeof(i),
+			       STARPU_VALUE, &j, sizeof(j),
+			       STARPU_VALUE, &k, sizeof(k),
+			       STARPU_R, STARPU_PLU(get_block_handle)(k, j),
+			       STARPU_R, STARPU_PLU(get_block_handle)(i, k),
+			       STARPU_RW, STARPU_PLU(get_block_handle)(i, j),
+			       STARPU_PRIORITY, !no_prio && (i == k + 1) && (j == k +1) ?
+			       STARPU_MAX_PRIO : STARPU_MIN_PRIO,
+			       0);
 }
 }
 
 
 /*
 /*

+ 1 - 1
mpi/examples/stencil/stencil5.c

@@ -138,7 +138,7 @@ int main(int argc, char **argv)
 		{
 		{
 			for (y = 1; y < Y-1; y++)
 			for (y = 1; y < Y-1; y++)
 			{
 			{
-				starpu_mpi_insert_task(MPI_COMM_WORLD, &stencil5_cl, STARPU_RW, data_handles[x][y],
+				starpu_mpi_task_insert(MPI_COMM_WORLD, &stencil5_cl, STARPU_RW, data_handles[x][y],
 						       STARPU_R, data_handles[x-1][y], STARPU_R, data_handles[x+1][y],
 						       STARPU_R, data_handles[x-1][y], STARPU_R, data_handles[x+1][y],
 						       STARPU_R, data_handles[x][y-1], STARPU_R, data_handles[x][y+1],
 						       STARPU_R, data_handles[x][y-1], STARPU_R, data_handles[x][y+1],
 						       0);
 						       0);

+ 2 - 1
mpi/include/starpu_mpi.h

@@ -47,7 +47,8 @@ int starpu_mpi_initialize(void) STARPU_DEPRECATED;
 int starpu_mpi_initialize_extended(int *rank, int *world_size) STARPU_DEPRECATED;
 int starpu_mpi_initialize_extended(int *rank, int *world_size) STARPU_DEPRECATED;
 int starpu_mpi_shutdown(void);
 int starpu_mpi_shutdown(void);
 
 
-int starpu_mpi_insert_task(MPI_Comm comm, struct starpu_codelet *codelet, ...);
+int starpu_mpi_task_insert(MPI_Comm comm, struct starpu_codelet *codelet, ...);
+#define starpu_mpi_insert_task starpu_mpi_task_insert
 void starpu_mpi_get_data_on_node(MPI_Comm comm, starpu_data_handle_t data_handle, int node);
 void starpu_mpi_get_data_on_node(MPI_Comm comm, starpu_data_handle_t data_handle, int node);
 void starpu_mpi_get_data_on_node_detached(MPI_Comm comm, starpu_data_handle_t data_handle, int node, void (*callback)(void*), void *arg);
 void starpu_mpi_get_data_on_node_detached(MPI_Comm comm, starpu_data_handle_t data_handle, int node, void (*callback)(void*), void *arg);
 void starpu_mpi_redux_data(MPI_Comm comm, starpu_data_handle_t data_handle);
 void starpu_mpi_redux_data(MPI_Comm comm, starpu_data_handle_t data_handle);

+ 2 - 2
mpi/src/Makefile.am

@@ -36,14 +36,14 @@ noinst_HEADERS =					\
 	starpu_mpi_private.h				\
 	starpu_mpi_private.h				\
 	starpu_mpi_fxt.h				\
 	starpu_mpi_fxt.h				\
 	starpu_mpi_stats.h				\
 	starpu_mpi_stats.h				\
-	starpu_mpi_insert_task.h			\
+	starpu_mpi_task_insert.h			\
 	starpu_mpi_datatype.h
 	starpu_mpi_datatype.h
 
 
 libstarpumpi_@STARPU_EFFECTIVE_VERSION@_la_SOURCES =	\
 libstarpumpi_@STARPU_EFFECTIVE_VERSION@_la_SOURCES =	\
 	starpu_mpi.c					\
 	starpu_mpi.c					\
 	starpu_mpi_helper.c				\
 	starpu_mpi_helper.c				\
 	starpu_mpi_datatype.c				\
 	starpu_mpi_datatype.c				\
-	starpu_mpi_insert_task.c			\
+	starpu_mpi_task_insert.c			\
 	starpu_mpi_collective.c				\
 	starpu_mpi_collective.c				\
 	starpu_mpi_stats.c				\
 	starpu_mpi_stats.c				\
 	starpu_mpi_private.c
 	starpu_mpi_private.c

+ 1 - 1
mpi/src/starpu_mpi.c

@@ -21,7 +21,7 @@
 #include <starpu_mpi_private.h>
 #include <starpu_mpi_private.h>
 #include <starpu_profiling.h>
 #include <starpu_profiling.h>
 #include <starpu_mpi_stats.h>
 #include <starpu_mpi_stats.h>
-#include <starpu_mpi_insert_task.h>
+#include <starpu_mpi_task_insert.h>
 #include <common/config.h>
 #include <common/config.h>
 #include <common/thread.h>
 #include <common/thread.h>
 
 

+ 9 - 9
mpi/src/starpu_mpi_insert_task.c

@@ -22,7 +22,7 @@
 #include <starpu_data.h>
 #include <starpu_data.h>
 #include <common/utils.h>
 #include <common/utils.h>
 #include <common/uthash.h>
 #include <common/uthash.h>
-#include <util/starpu_insert_task_utils.h>
+#include <util/starpu_task_insert_utils.h>
 #include <datawizard/coherency.h>
 #include <datawizard/coherency.h>
 #include <core/task.h>
 #include <core/task.h>
 
 
@@ -195,7 +195,7 @@ int _starpu_mpi_find_executee_node(starpu_data_handle_t data, enum starpu_data_a
 			 * The application knows we won't do anything
 			 * The application knows we won't do anything
 			 * about this task */
 			 * about this task */
 			/* Yes, the app could actually not call
 			/* Yes, the app could actually not call
-			 * insert_task at all itself, this is just a
+			 * task_insert at all itself, this is just a
 			 * safeguard. */
 			 * safeguard. */
 			_STARPU_MPI_DEBUG(3, "oh oh\n");
 			_STARPU_MPI_DEBUG(3, "oh oh\n");
 			_STARPU_MPI_LOG_OUT();
 			_STARPU_MPI_LOG_OUT();
@@ -363,7 +363,7 @@ void _starpu_mpi_clear_data_after_execution(starpu_data_handle_t data, enum star
 	}
 	}
 }
 }
 
 
-int starpu_mpi_insert_task(MPI_Comm comm, struct starpu_codelet *codelet, ...)
+int starpu_mpi_task_insert(MPI_Comm comm, struct starpu_codelet *codelet, ...)
 {
 {
 	int arg_type;
 	int arg_type;
 	va_list varg_list;
 	va_list varg_list;
@@ -585,7 +585,7 @@ int starpu_mpi_insert_task(MPI_Comm comm, struct starpu_codelet *codelet, ...)
 	{
 	{
 		/* Get the number of buffers and the size of the arguments */
 		/* Get the number of buffers and the size of the arguments */
 		va_start(varg_list, codelet);
 		va_start(varg_list, codelet);
-		arg_buffer_size = _starpu_insert_task_get_arg_size(varg_list);
+		arg_buffer_size = _starpu_task_insert_get_arg_size(varg_list);
 
 
 		/* Pack arguments if needed */
 		/* Pack arguments if needed */
 		if (arg_buffer_size)
 		if (arg_buffer_size)
@@ -604,8 +604,8 @@ int starpu_mpi_insert_task(MPI_Comm comm, struct starpu_codelet *codelet, ...)
 		{
 		{
 			task->dyn_handles = malloc(codelet->nbuffers * sizeof(starpu_data_handle_t));
 			task->dyn_handles = malloc(codelet->nbuffers * sizeof(starpu_data_handle_t));
 		}
 		}
-		int ret = _starpu_insert_task_create_and_submit(arg_buffer, arg_buffer_size, codelet, &task, varg_list);
-		STARPU_ASSERT_MSG(ret==0, "_starpu_insert_task_create_and_submit failure %d", ret);
+		int ret = _starpu_task_insert_create_and_submit(arg_buffer, arg_buffer_size, codelet, &task, varg_list);
+		STARPU_ASSERT_MSG(ret==0, "_starpu_task_insert_create_and_submit failure %d", ret);
 	}
 	}
 
 
 	if (inconsistent_execute)
 	if (inconsistent_execute)
@@ -865,7 +865,7 @@ void _starpu_mpi_redux_data_recv_callback(void *callback_arg)
 	starpu_mpi_irecv_detached_sequential_consistency(args->new_handle, args->node, args->tag, args->comm, _starpu_mpi_redux_data_detached_callback, args, 0);
 	starpu_mpi_irecv_detached_sequential_consistency(args->new_handle, args->node, args->tag, args->comm, _starpu_mpi_redux_data_detached_callback, args, 0);
 }
 }
 
 
-/* TODO: this should rather be implicitly called by starpu_mpi_insert_task when
+/* TODO: this should rather be implicitly called by starpu_mpi_task_insert when
  * a data previously accessed in REDUX mode gets accessed in R mode. */
  * a data previously accessed in REDUX mode gets accessed in R mode. */
 void starpu_mpi_redux_data(MPI_Comm comm, starpu_data_handle_t data_handle)
 void starpu_mpi_redux_data(MPI_Comm comm, starpu_data_handle_t data_handle)
 {
 {
@@ -934,7 +934,7 @@ void starpu_mpi_redux_data(MPI_Comm comm, starpu_data_handle_t data_handle)
 				taskBs[j] = args->taskB; j++;
 				taskBs[j] = args->taskB; j++;
 
 
 				// Submit taskA
 				// Submit taskA
-				starpu_insert_task(&_starpu_mpi_redux_data_read_cl,
+				starpu_task_insert(&_starpu_mpi_redux_data_read_cl,
 						   STARPU_R, data_handle,
 						   STARPU_R, data_handle,
 						   STARPU_CALLBACK_WITH_ARG, _starpu_mpi_redux_data_recv_callback, args,
 						   STARPU_CALLBACK_WITH_ARG, _starpu_mpi_redux_data_recv_callback, args,
 						   0);
 						   0);
@@ -953,7 +953,7 @@ void starpu_mpi_redux_data(MPI_Comm comm, starpu_data_handle_t data_handle)
 	{
 	{
 		_STARPU_MPI_DEBUG(1, "Sending redux handle to %d ...\n", rank);
 		_STARPU_MPI_DEBUG(1, "Sending redux handle to %d ...\n", rank);
 		starpu_mpi_isend_detached(data_handle, rank, tag, comm, NULL, NULL);
 		starpu_mpi_isend_detached(data_handle, rank, tag, comm, NULL, NULL);
-		starpu_insert_task(data_handle->init_cl, STARPU_W, data_handle, 0);
+		starpu_task_insert(data_handle->init_cl, STARPU_W, data_handle, 0);
 	}
 	}
 	/* FIXME: In order to prevent simultaneous receive submissions
 	/* FIXME: In order to prevent simultaneous receive submissions
 	 * on the same handle, we need to wait that all the starpu_mpi
 	 * on the same handle, we need to wait that all the starpu_mpi

mpi/src/starpu_mpi_insert_task.h → mpi/src/starpu_mpi_task_insert.h


+ 9 - 9
mpi/tests/insert_task.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
  * it under the terms of the GNU Lesser General Public License as published by
@@ -102,14 +102,14 @@ int main(int argc, char **argv)
 		}
 		}
 	}
 	}
 
 
-	ret = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet, STARPU_RW, data_handles[1][1], STARPU_R, data_handles[0][1], 0);
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_insert_task");
-	ret = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet, STARPU_RW, data_handles[3][1], STARPU_R, data_handles[0][1], 0);
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_insert_task");
-	ret = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet, STARPU_RW, data_handles[0][1], STARPU_R, data_handles[0][0], 0);
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_insert_task");
-	ret = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet, STARPU_RW, data_handles[3][1], STARPU_R, data_handles[0][1], 0);
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_insert_task");
+	ret = starpu_mpi_task_insert(MPI_COMM_WORLD, &mycodelet, STARPU_RW, data_handles[1][1], STARPU_R, data_handles[0][1], 0);
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_task_insert");
+	ret = starpu_mpi_task_insert(MPI_COMM_WORLD, &mycodelet, STARPU_RW, data_handles[3][1], STARPU_R, data_handles[0][1], 0);
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_task_insert");
+	ret = starpu_mpi_task_insert(MPI_COMM_WORLD, &mycodelet, STARPU_RW, data_handles[0][1], STARPU_R, data_handles[0][0], 0);
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_task_insert");
+	ret = starpu_mpi_task_insert(MPI_COMM_WORLD, &mycodelet, STARPU_RW, data_handles[3][1], STARPU_R, data_handles[0][1], 0);
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_task_insert");
 
 
 	FPRINTF(stderr, "Waiting ...\n");
 	FPRINTF(stderr, "Waiting ...\n");
 	starpu_task_wait_for_all();
 	starpu_task_wait_for_all();

+ 3 - 3
mpi/tests/insert_task_block.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
  * it under the terms of the GNU Lesser General Public License as published by
@@ -125,10 +125,10 @@ int main(int argc, char **argv)
 	{
 	{
 		for (y = 0; y < BLOCKS; y++)
 		for (y = 0; y < BLOCKS; y++)
 		{
 		{
-			ret = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet,
+			ret = starpu_mpi_task_insert(MPI_COMM_WORLD, &mycodelet,
 						     STARPU_RW, data_handles[x][y],
 						     STARPU_RW, data_handles[x][y],
 						     0);
 						     0);
-			STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_insert_task");
+			STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_task_insert");
 		}
 		}
 	}
 	}
 
 

+ 4 - 4
mpi/tests/insert_task_cache.c

@@ -82,14 +82,14 @@ void test_cache(int rank, int size, int enabled, size_t *comm_amount)
 
 
 	for(i = 0; i < 5; i++)
 	for(i = 0; i < 5; i++)
 	{
 	{
-		ret = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet, STARPU_RW, data_handles[0], STARPU_R, data_handles[1], 0);
-		STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_insert_task");
+		ret = starpu_mpi_task_insert(MPI_COMM_WORLD, &mycodelet, STARPU_RW, data_handles[0], STARPU_R, data_handles[1], 0);
+		STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_task_insert");
 	}
 	}
 
 
 	for(i = 0; i < 5; i++)
 	for(i = 0; i < 5; i++)
 	{
 	{
-		ret = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet, STARPU_RW, data_handles[1], STARPU_R, data_handles[0], 0);
-		STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_insert_task");
+		ret = starpu_mpi_task_insert(MPI_COMM_WORLD, &mycodelet, STARPU_RW, data_handles[1], STARPU_R, data_handles[0], 0);
+		STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_task_insert");
 	}
 	}
 
 
 	starpu_task_wait_for_all();
 	starpu_task_wait_for_all();

+ 8 - 8
mpi/tests/insert_task_owner.c

@@ -101,41 +101,41 @@ int main(int argc, char **argv)
 	}
 	}
 
 
 	node = starpu_data_get_rank(data_handlesx1);
 	node = starpu_data_get_rank(data_handlesx1);
-	err = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet_r_w,
+	err = starpu_mpi_task_insert(MPI_COMM_WORLD, &mycodelet_r_w,
 				     STARPU_VALUE, &node, sizeof(node),
 				     STARPU_VALUE, &node, sizeof(node),
 				     STARPU_R, data_handlesx0, STARPU_W, data_handlesx1,
 				     STARPU_R, data_handlesx0, STARPU_W, data_handlesx1,
 				     0);
 				     0);
 	assert(err == 0);
 	assert(err == 0);
 
 
 	node = starpu_data_get_rank(data_handlesx0);
 	node = starpu_data_get_rank(data_handlesx0);
-	err = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet_rw_r,
+	err = starpu_mpi_task_insert(MPI_COMM_WORLD, &mycodelet_rw_r,
 				     STARPU_VALUE, &node, sizeof(node),
 				     STARPU_VALUE, &node, sizeof(node),
 				     STARPU_RW, data_handlesx0, STARPU_R, data_handlesx1,
 				     STARPU_RW, data_handlesx0, STARPU_R, data_handlesx1,
 				     0);
 				     0);
 	assert(err == 0);
 	assert(err == 0);
 
 
-	err = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet_rw_rw,
+	err = starpu_mpi_task_insert(MPI_COMM_WORLD, &mycodelet_rw_rw,
 				     STARPU_VALUE, &node, sizeof(node),
 				     STARPU_VALUE, &node, sizeof(node),
 				     STARPU_RW, data_handlesx0, STARPU_RW, data_handlesx1,
 				     STARPU_RW, data_handlesx0, STARPU_RW, data_handlesx1,
 				     0);
 				     0);
 	assert(err == -EINVAL);
 	assert(err == -EINVAL);
 
 
 	node = 1;
 	node = 1;
-	err = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet_rw_rw,
+	err = starpu_mpi_task_insert(MPI_COMM_WORLD, &mycodelet_rw_rw,
 				     STARPU_VALUE, &node, sizeof(node),
 				     STARPU_VALUE, &node, sizeof(node),
 				     STARPU_RW, data_handlesx0, STARPU_RW, data_handlesx1, STARPU_EXECUTE_ON_NODE, node,
 				     STARPU_RW, data_handlesx0, STARPU_RW, data_handlesx1, STARPU_EXECUTE_ON_NODE, node,
 				     0);
 				     0);
 	assert(err == 0);
 	assert(err == 0);
 
 
 	node = 0;
 	node = 0;
-	err = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet_rw_rw,
+	err = starpu_mpi_task_insert(MPI_COMM_WORLD, &mycodelet_rw_rw,
 				     STARPU_VALUE, &node, sizeof(node),
 				     STARPU_VALUE, &node, sizeof(node),
 				     STARPU_RW, data_handlesx0, STARPU_RW, data_handlesx1, STARPU_EXECUTE_ON_NODE, node,
 				     STARPU_RW, data_handlesx0, STARPU_RW, data_handlesx1, STARPU_EXECUTE_ON_NODE, node,
 				     0);
 				     0);
 	assert(err == 0);
 	assert(err == 0);
 
 
 	node = 0;
 	node = 0;
-	err = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet_r_r,
+	err = starpu_mpi_task_insert(MPI_COMM_WORLD, &mycodelet_r_r,
 				     STARPU_VALUE, &node, sizeof(node),
 				     STARPU_VALUE, &node, sizeof(node),
 				     STARPU_R, data_handlesx0, STARPU_R, data_handlesx1, STARPU_EXECUTE_ON_NODE, node,
 				     STARPU_R, data_handlesx0, STARPU_R, data_handlesx1, STARPU_EXECUTE_ON_NODE, node,
 				     0);
 				     0);
@@ -145,7 +145,7 @@ int main(int argc, char **argv)
 	   going to overwrite the node even though the data model clearly specifies
 	   going to overwrite the node even though the data model clearly specifies
 	   which node is going to execute the codelet */
 	   which node is going to execute the codelet */
 	node = 0;
 	node = 0;
-	err = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet_r_w,
+	err = starpu_mpi_task_insert(MPI_COMM_WORLD, &mycodelet_r_w,
 				     STARPU_VALUE, &node, sizeof(node),
 				     STARPU_VALUE, &node, sizeof(node),
 				     STARPU_R, data_handlesx0, STARPU_W, data_handlesx1, STARPU_EXECUTE_ON_NODE, node,
 				     STARPU_R, data_handlesx0, STARPU_W, data_handlesx1, STARPU_EXECUTE_ON_NODE, node,
 				     0);
 				     0);
@@ -155,7 +155,7 @@ int main(int argc, char **argv)
 	   going to overwrite the node even though the data model clearly specifies
 	   going to overwrite the node even though the data model clearly specifies
 	   which node is going to execute the codelet */
 	   which node is going to execute the codelet */
 	node = 0;
 	node = 0;
-	err = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet_w_r,
+	err = starpu_mpi_task_insert(MPI_COMM_WORLD, &mycodelet_w_r,
 				     STARPU_VALUE, &node, sizeof(node),
 				     STARPU_VALUE, &node, sizeof(node),
 				     STARPU_W, data_handlesx0, STARPU_R, data_handlesx1, STARPU_EXECUTE_ON_NODE, node,
 				     STARPU_W, data_handlesx0, STARPU_R, data_handlesx1, STARPU_EXECUTE_ON_NODE, node,
 				     0);
 				     0);

+ 2 - 2
mpi/tests/insert_task_owner2.c

@@ -93,12 +93,12 @@ int main(int argc, char **argv)
 	starpu_data_set_rank(data_handles[3], 1);
 	starpu_data_set_rank(data_handles[3], 1);
 	starpu_data_set_tag(data_handles[3], 3);
 	starpu_data_set_tag(data_handles[3], 3);
 
 
-	err = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet,
+	err = starpu_mpi_task_insert(MPI_COMM_WORLD, &mycodelet,
 				     STARPU_R, data_handles[0], STARPU_RW, data_handles[1],
 				     STARPU_R, data_handles[0], STARPU_RW, data_handles[1],
 				     STARPU_W, data_handles[2],
 				     STARPU_W, data_handles[2],
 				     STARPU_W, data_handles[3],
 				     STARPU_W, data_handles[3],
 				     STARPU_EXECUTE_ON_NODE, 1, 0);
 				     STARPU_EXECUTE_ON_NODE, 1, 0);
-	STARPU_CHECK_RETURN_VALUE(err, "starpu_mpi_insert_task");
+	STARPU_CHECK_RETURN_VALUE(err, "starpu_mpi_task_insert");
 	starpu_task_wait_for_all();
 	starpu_task_wait_for_all();
 
 
 	int *values = malloc(4 * sizeof(int *));
 	int *values = malloc(4 * sizeof(int *));

+ 2 - 2
mpi/tests/insert_task_owner_data.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
  * it under the terms of the GNU Lesser General Public License as published by
@@ -72,7 +72,7 @@ int main(int argc, char **argv)
 	starpu_data_set_rank(data_handles[1], 1);
 	starpu_data_set_rank(data_handles[1], 1);
 	starpu_data_set_tag(data_handles[1], 1);
 	starpu_data_set_tag(data_handles[1], 1);
 
 
-	err = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet,
+	err = starpu_mpi_task_insert(MPI_COMM_WORLD, &mycodelet,
 				     STARPU_RW, data_handles[0], STARPU_RW, data_handles[1],
 				     STARPU_RW, data_handles[0], STARPU_RW, data_handles[1],
 				     STARPU_EXECUTE_ON_DATA, data_handles[1],
 				     STARPU_EXECUTE_ON_DATA, data_handles[1],
 				     0);
 				     0);

+ 2 - 2
mpi/tests/mpi_reduction.c

@@ -138,14 +138,14 @@ int main(int argc, char **argv)
 	{
 	{
 		for (x = 0; x < nb_elements; x+=step)
 		for (x = 0; x < nb_elements; x+=step)
 		{
 		{
-			starpu_mpi_insert_task(MPI_COMM_WORLD,
+			starpu_mpi_task_insert(MPI_COMM_WORLD,
 					       &dot_codelet,
 					       &dot_codelet,
 					       STARPU_R, handles[x],
 					       STARPU_R, handles[x],
 					       STARPU_REDUX, dot_handle,
 					       STARPU_REDUX, dot_handle,
 					       0);
 					       0);
 		}
 		}
 		starpu_mpi_redux_data(MPI_COMM_WORLD, dot_handle);
 		starpu_mpi_redux_data(MPI_COMM_WORLD, dot_handle);
-		starpu_mpi_insert_task(MPI_COMM_WORLD, &display_codelet, STARPU_R, dot_handle, 0);
+		starpu_mpi_task_insert(MPI_COMM_WORLD, &display_codelet, STARPU_R, dot_handle, 0);
 	}
 	}
 
 
 	FPRINTF_MPI("Waiting ...\n");
 	FPRINTF_MPI("Waiting ...\n");

+ 1 - 1
mpi/tests/mpi_scatter_gather.c

@@ -178,7 +178,7 @@ int main(int argc, char **argv)
 			if (owner == rank)
 			if (owner == rank)
 			{
 			{
 				//fprintf(stderr,"[%d] Computing on data[%d]\n", rank, x);
 				//fprintf(stderr,"[%d] Computing on data[%d]\n", rank, x);
-				starpu_insert_task(&cl,
+				starpu_task_insert(&cl,
 						   STARPU_VALUE, &rank, sizeof(rank),
 						   STARPU_VALUE, &rank, sizeof(rank),
 						   STARPU_RW, data_handles[x],
 						   STARPU_RW, data_handles[x],
 						   0);
 						   0);

+ 14 - 14
sc_hypervisor/examples/cholesky/cholesky_implicit.c

@@ -91,17 +91,17 @@ static void _cholesky(starpu_data_handle_t dataA, unsigned nblocks)
                 starpu_data_handle_t sdatakk = starpu_data_get_sub_data(dataA, 2, k, k);
                 starpu_data_handle_t sdatakk = starpu_data_get_sub_data(dataA, 2, k, k);
 		if(k == 0 && with_ctxs)
 		if(k == 0 && with_ctxs)
 		{
 		{
-			 ret = starpu_insert_task(&cl11,
-					   STARPU_PRIORITY, prio_level,
-					   STARPU_RW, sdatakk,
-					   STARPU_CALLBACK, (k == 3*nblocks/4)?callback_turn_spmd_on:NULL,
-					   STARPU_HYPERVISOR_TAG, hypervisor_tag,
-					   0);
+			 ret = starpu_task_insert(&cl11,
+						  STARPU_PRIORITY, prio_level,
+						  STARPU_RW, sdatakk,
+						  STARPU_CALLBACK, (k == 3*nblocks/4)?callback_turn_spmd_on:NULL,
+						  STARPU_HYPERVISOR_TAG, hypervisor_tag,
+						  0);
 			set_hypervisor_conf(START_BENCH, hypervisor_tag++);
 			set_hypervisor_conf(START_BENCH, hypervisor_tag++);
-			STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+			STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 		}
 		}
 		else
 		else
-			starpu_insert_task(&cl11,
+			starpu_task_insert(&cl11,
 					   STARPU_PRIORITY, prio_level,
 					   STARPU_PRIORITY, prio_level,
 					   STARPU_RW, sdatakk,
 					   STARPU_RW, sdatakk,
 					   STARPU_CALLBACK, (k == 3*nblocks/4)?callback_turn_spmd_on:NULL,
 					   STARPU_CALLBACK, (k == 3*nblocks/4)?callback_turn_spmd_on:NULL,
@@ -111,12 +111,12 @@ static void _cholesky(starpu_data_handle_t dataA, unsigned nblocks)
 		{
 		{
                         starpu_data_handle_t sdatakj = starpu_data_get_sub_data(dataA, 2, k, j);
                         starpu_data_handle_t sdatakj = starpu_data_get_sub_data(dataA, 2, k, j);
 
 
-                        ret = starpu_insert_task(&cl21,
+                        ret = starpu_task_insert(&cl21,
 						 STARPU_PRIORITY, (j == k+1)?prio_level:STARPU_DEFAULT_PRIO,
 						 STARPU_PRIORITY, (j == k+1)?prio_level:STARPU_DEFAULT_PRIO,
 						 STARPU_R, sdatakk,
 						 STARPU_R, sdatakk,
 						 STARPU_RW, sdatakj,
 						 STARPU_RW, sdatakj,
 						 0);
 						 0);
-			STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+			STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
 			for (i = k+1; i<nblocks; i++)
 			for (i = k+1; i<nblocks; i++)
 			{
 			{
@@ -128,25 +128,25 @@ static void _cholesky(starpu_data_handle_t dataA, unsigned nblocks)
 					if(k == (nblocks-2) && j == (nblocks-1) &&
 					if(k == (nblocks-2) && j == (nblocks-1) &&
 					   i == (k + 1) && with_ctxs)
 					   i == (k + 1) && with_ctxs)
 					{
 					{
-						ret = starpu_insert_task(&cl22,
+						ret = starpu_task_insert(&cl22,
 								   STARPU_PRIORITY, ((i == k+1) && (j == k+1))?prio_level:STARPU_DEFAULT_PRIO,
 								   STARPU_PRIORITY, ((i == k+1) && (j == k+1))?prio_level:STARPU_DEFAULT_PRIO,
 								   STARPU_R, sdataki,
 								   STARPU_R, sdataki,
 								   STARPU_R, sdatakj,
 								   STARPU_R, sdatakj,
 								   STARPU_RW, sdataij,
 								   STARPU_RW, sdataij,
 								   STARPU_HYPERVISOR_TAG, hypervisor_tag,
 								   STARPU_HYPERVISOR_TAG, hypervisor_tag,
 								   0);
 								   0);
-						STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+						STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 						set_hypervisor_conf(END_BENCH, hypervisor_tag++);
 						set_hypervisor_conf(END_BENCH, hypervisor_tag++);
 					}
 					}
 					
 					
 					else
 					else
-						ret = starpu_insert_task(&cl22,
+						ret = starpu_task_insert(&cl22,
 								   STARPU_PRIORITY, ((i == k+1) && (j == k+1))?prio_level:STARPU_DEFAULT_PRIO,
 								   STARPU_PRIORITY, ((i == k+1) && (j == k+1))?prio_level:STARPU_DEFAULT_PRIO,
 								   STARPU_R, sdataki,
 								   STARPU_R, sdataki,
 								   STARPU_R, sdatakj,
 								   STARPU_R, sdatakj,
 								   STARPU_RW, sdataij,
 								   STARPU_RW, sdataij,
 								   0);
 								   0);
-						STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+						STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 					
 					
                    }
                    }
 			}
 			}

+ 3 - 3
src/Makefile.am

@@ -126,7 +126,7 @@ noinst_HEADERS = 						\
 	debug/traces/starpu_fxt.h				\
 	debug/traces/starpu_fxt.h				\
 	profiling/bound.h					\
 	profiling/bound.h					\
 	profiling/profiling.h					\
 	profiling/profiling.h					\
-	util/starpu_insert_task_utils.h				\
+	util/starpu_task_insert_utils.h				\
 	util/starpu_data_cpy.h					\
 	util/starpu_data_cpy.h					\
 	util/starpu_task_list_inline.h				\
 	util/starpu_task_list_inline.h				\
 	starpu_parameters.h					\
 	starpu_parameters.h					\
@@ -223,8 +223,8 @@ libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES = 						\
 	util/file.c						\
 	util/file.c						\
 	util/misc.c						\
 	util/misc.c						\
 	util/starpu_data_cpy.c					\
 	util/starpu_data_cpy.c					\
-	util/starpu_insert_task.c				\
-	util/starpu_insert_task_utils.c				\
+	util/starpu_task_insert.c				\
+	util/starpu_task_insert_utils.c				\
 	util/starpu_inlines.c					\
 	util/starpu_inlines.c					\
 	debug/traces/starpu_fxt.c				\
 	debug/traces/starpu_fxt.c				\
 	debug/traces/starpu_fxt_mpi.c				\
 	debug/traces/starpu_fxt_mpi.c				\

+ 7 - 7
src/util/starpu_insert_task.c

@@ -21,7 +21,7 @@
 #include <starpu.h>
 #include <starpu.h>
 #include <common/config.h>
 #include <common/config.h>
 #include <stdarg.h>
 #include <stdarg.h>
-#include <util/starpu_insert_task_utils.h>
+#include <util/starpu_task_insert_utils.h>
 
 
 void starpu_codelet_pack_args(void **arg_buffer, size_t *arg_buffer_size, ...)
 void starpu_codelet_pack_args(void **arg_buffer, size_t *arg_buffer_size, ...)
 {
 {
@@ -29,7 +29,7 @@ void starpu_codelet_pack_args(void **arg_buffer, size_t *arg_buffer_size, ...)
 
 
 	/* Compute the size */
 	/* Compute the size */
 	va_start(varg_list, arg_buffer_size);
 	va_start(varg_list, arg_buffer_size);
-	*arg_buffer_size = _starpu_insert_task_get_arg_size(varg_list);
+	*arg_buffer_size = _starpu_task_insert_get_arg_size(varg_list);
 
 
 	va_start(varg_list, arg_buffer_size);
 	va_start(varg_list, arg_buffer_size);
 	_starpu_codelet_pack_args(arg_buffer, *arg_buffer_size, varg_list);
 	_starpu_codelet_pack_args(arg_buffer, *arg_buffer_size, varg_list);
@@ -62,7 +62,7 @@ void starpu_codelet_unpack_args(void *_cl_arg, ...)
 	va_end(varg_list);
 	va_end(varg_list);
 }
 }
 
 
-int starpu_insert_task(struct starpu_codelet *cl, ...)
+int starpu_task_insert(struct starpu_codelet *cl, ...)
 {
 {
 	va_list varg_list;
 	va_list varg_list;
 	void *arg_buffer = NULL;
 	void *arg_buffer = NULL;
@@ -70,7 +70,7 @@ int starpu_insert_task(struct starpu_codelet *cl, ...)
 	/* Compute the size */
 	/* Compute the size */
 	size_t arg_buffer_size = 0;
 	size_t arg_buffer_size = 0;
 	va_start(varg_list, cl);
 	va_start(varg_list, cl);
-	arg_buffer_size = _starpu_insert_task_get_arg_size(varg_list);
+	arg_buffer_size = _starpu_task_insert_get_arg_size(varg_list);
 
 
 	if (arg_buffer_size)
 	if (arg_buffer_size)
 	{
 	{
@@ -87,7 +87,7 @@ int starpu_insert_task(struct starpu_codelet *cl, ...)
 	}
 	}
 
 
 	va_start(varg_list, cl);
 	va_start(varg_list, cl);
-	int ret = _starpu_insert_task_create_and_submit(arg_buffer, arg_buffer_size, cl, &task, varg_list);
+	int ret = _starpu_task_insert_create_and_submit(arg_buffer, arg_buffer_size, cl, &task, varg_list);
 
 
 	if (ret == -ENODEV)
 	if (ret == -ENODEV)
 	{
 	{
@@ -105,7 +105,7 @@ struct starpu_task *starpu_task_build(struct starpu_codelet *cl, ...)
 	/* Compute the size */
 	/* Compute the size */
 	size_t arg_buffer_size = 0;
 	size_t arg_buffer_size = 0;
 	va_start(varg_list, cl);
 	va_start(varg_list, cl);
-	arg_buffer_size = _starpu_insert_task_get_arg_size(varg_list);
+	arg_buffer_size = _starpu_task_insert_get_arg_size(varg_list);
 
 
 	if (arg_buffer_size)
 	if (arg_buffer_size)
 	{
 	{
@@ -121,6 +121,6 @@ struct starpu_task *starpu_task_build(struct starpu_codelet *cl, ...)
 	}
 	}
 
 
 	va_start(varg_list, cl);
 	va_start(varg_list, cl);
-	_starpu_insert_task_create(arg_buffer, arg_buffer_size, cl, &task, varg_list);
+	_starpu_task_insert_create(arg_buffer, arg_buffer_size, cl, &task, varg_list);
 	return task;
 	return task;
 }
 }

+ 10 - 10
src/util/starpu_insert_task_utils.c

@@ -15,7 +15,7 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
  */
 
 
-#include <util/starpu_insert_task_utils.h>
+#include <util/starpu_task_insert_utils.h>
 #include <common/config.h>
 #include <common/config.h>
 #include <common/utils.h>
 #include <common/utils.h>
 #include <core/task.h>
 #include <core/task.h>
@@ -25,7 +25,7 @@ typedef void (*_starpu_callback_func_t)(void *);
 /* Deal with callbacks. The unpack function may be called multiple times when
 /* Deal with callbacks. The unpack function may be called multiple times when
  * we have a parallel task, and we should not free the cl_arg parameter from
  * we have a parallel task, and we should not free the cl_arg parameter from
  * the callback function. */
  * the callback function. */
-struct insert_task_cb_wrapper
+struct task_insert_cb_wrapper
 {
 {
 	_starpu_callback_func_t callback_func;
 	_starpu_callback_func_t callback_func;
 	void *callback_arg;
 	void *callback_arg;
@@ -34,14 +34,14 @@ struct insert_task_cb_wrapper
 static
 static
 void starpu_task_insert_callback_wrapper(void *_cl_arg_wrapper)
 void starpu_task_insert_callback_wrapper(void *_cl_arg_wrapper)
 {
 {
-	struct insert_task_cb_wrapper *cl_arg_wrapper = (struct insert_task_cb_wrapper *) _cl_arg_wrapper;
+	struct task_insert_cb_wrapper *cl_arg_wrapper = (struct task_insert_cb_wrapper *) _cl_arg_wrapper;
 
 
 	/* Execute the callback specified by the application */
 	/* Execute the callback specified by the application */
 	if (cl_arg_wrapper->callback_func)
 	if (cl_arg_wrapper->callback_func)
 		cl_arg_wrapper->callback_func(cl_arg_wrapper->callback_arg);
 		cl_arg_wrapper->callback_func(cl_arg_wrapper->callback_arg);
 }
 }
 
 
-size_t _starpu_insert_task_get_arg_size(va_list varg_list)
+size_t _starpu_task_insert_get_arg_size(va_list varg_list)
 {
 {
 	int arg_type;
 	int arg_type;
 	size_t arg_buffer_size;
 	size_t arg_buffer_size;
@@ -234,17 +234,17 @@ int _starpu_codelet_pack_args(void **arg_buffer, size_t arg_buffer_size, va_list
 	return 0;
 	return 0;
 }
 }
 
 
-void _starpu_insert_task_create(void *arg_buffer, size_t arg_buffer_size, struct starpu_codelet *cl, struct starpu_task **task, va_list varg_list)
+void _starpu_task_insert_create(void *arg_buffer, size_t arg_buffer_size, struct starpu_codelet *cl, struct starpu_task **task, va_list varg_list)
 {
 {
 	int arg_type;
 	int arg_type;
 	unsigned current_buffer = 0;
 	unsigned current_buffer = 0;
 
 
-	struct insert_task_cb_wrapper *cl_arg_wrapper = (struct insert_task_cb_wrapper *) malloc(sizeof(struct insert_task_cb_wrapper));
+	struct task_insert_cb_wrapper *cl_arg_wrapper = (struct task_insert_cb_wrapper *) malloc(sizeof(struct task_insert_cb_wrapper));
 	STARPU_ASSERT(cl_arg_wrapper);
 	STARPU_ASSERT(cl_arg_wrapper);
 
 
 	cl_arg_wrapper->callback_func = NULL;
 	cl_arg_wrapper->callback_func = NULL;
 
 
-	struct insert_task_cb_wrapper *prologue_cl_arg_wrapper = (struct insert_task_cb_wrapper *) malloc(sizeof(struct insert_task_cb_wrapper));
+	struct task_insert_cb_wrapper *prologue_cl_arg_wrapper = (struct task_insert_cb_wrapper *) malloc(sizeof(struct task_insert_cb_wrapper));
 	STARPU_ASSERT(prologue_cl_arg_wrapper);
 	STARPU_ASSERT(prologue_cl_arg_wrapper);
 
 
 	prologue_cl_arg_wrapper->callback_func = NULL;
 	prologue_cl_arg_wrapper->callback_func = NULL;
@@ -264,7 +264,7 @@ void _starpu_insert_task_create(void *arg_buffer, size_t arg_buffer_size, struct
 			if (STARPU_CODELET_GET_MODE(cl, current_buffer))
 			if (STARPU_CODELET_GET_MODE(cl, current_buffer))
 			{
 			{
 				STARPU_ASSERT_MSG(STARPU_CODELET_GET_MODE(cl, current_buffer) == mode,
 				STARPU_ASSERT_MSG(STARPU_CODELET_GET_MODE(cl, current_buffer) == mode,
-						   "The codelet <%s> defines the access mode %d for the buffer %d which is different from the mode %d given to starpu_insert_task\n",
+						   "The codelet <%s> defines the access mode %d for the buffer %d which is different from the mode %d given to starpu_task_insert\n",
 						  cl->name, STARPU_CODELET_GET_MODE(cl, current_buffer),
 						  cl->name, STARPU_CODELET_GET_MODE(cl, current_buffer),
 						  current_buffer, mode);
 						  current_buffer, mode);
 			}
 			}
@@ -384,9 +384,9 @@ void _starpu_insert_task_create(void *arg_buffer, size_t arg_buffer_size, struct
 	(*task)->prologue_callback_arg_free = 1;
 	(*task)->prologue_callback_arg_free = 1;
 }
 }
 
 
-int _starpu_insert_task_create_and_submit(void *arg_buffer, size_t arg_buffer_size, struct starpu_codelet *cl, struct starpu_task **task, va_list varg_list)
+int _starpu_task_insert_create_and_submit(void *arg_buffer, size_t arg_buffer_size, struct starpu_codelet *cl, struct starpu_task **task, va_list varg_list)
 {
 {
-	_starpu_insert_task_create(arg_buffer, arg_buffer_size, cl, task, varg_list);
+	_starpu_task_insert_create(arg_buffer, arg_buffer_size, cl, task, varg_list);
 
 
 	int ret = starpu_task_submit(*task);
 	int ret = starpu_task_submit(*task);
 
 

+ 7 - 7
src/util/starpu_insert_task_utils.h

@@ -14,18 +14,18 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
  */
 
 
-#ifndef __STARPU_INSERT_TASK_UTILS_H__
-#define __STARPU_INSERT_TASK_UTILS_H__
+#ifndef __STARPU_TASK_INSERT_UTILS_H__
+#define __STARPU_TASK_INSERT_UTILS_H__
 
 
 #include <stdlib.h>
 #include <stdlib.h>
 #include <stdarg.h>
 #include <stdarg.h>
 #include <starpu.h>
 #include <starpu.h>
 
 
-size_t _starpu_insert_task_get_arg_size(va_list varg_list);
+size_t _starpu_task_insert_get_arg_size(va_list varg_list);
 int _starpu_codelet_pack_args(void **arg_buffer, size_t arg_buffer_size, va_list varg_list);
 int _starpu_codelet_pack_args(void **arg_buffer, size_t arg_buffer_size, va_list varg_list);
-void _starpu_insert_task_create(void *arg_buffer, size_t arg_buffer_size, struct starpu_codelet *cl, struct starpu_task **task, va_list varg_list);
-int _starpu_insert_task_create_and_submit(void *arg_buffer, size_t arg_buffer_size, struct starpu_codelet *cl, struct starpu_task **task, va_list varg_list);
-int _starpu_insert_task_create_and_submit_array(void *arg_buffer, size_t arg_buffer_size, struct starpu_codelet *cl, struct starpu_task **task, starpu_data_handle_t *handles, unsigned nb_handles, va_list varg_list);
+void _starpu_task_insert_create(void *arg_buffer, size_t arg_buffer_size, struct starpu_codelet *cl, struct starpu_task **task, va_list varg_list);
+int _starpu_task_insert_create_and_submit(void *arg_buffer, size_t arg_buffer_size, struct starpu_codelet *cl, struct starpu_task **task, va_list varg_list);
+int _starpu_task_insert_create_and_submit_array(void *arg_buffer, size_t arg_buffer_size, struct starpu_codelet *cl, struct starpu_task **task, starpu_data_handle_t *handles, unsigned nb_handles, va_list varg_list);
 
 
-#endif // __STARPU_INSERT_TASK_UTILS_H__
+#endif // __STARPU_TASK_INSERT_UTILS_H__
 
 

+ 4 - 4
tests/datawizard/acquire_cb_insert.c

@@ -64,7 +64,7 @@ static starpu_data_handle_t x_handle, f_handle;
 
 
 void callback(void *arg)
 void callback(void *arg)
 {
 {
-	starpu_insert_task(&work, STARPU_W, starpu_data_get_sub_data(f_handle, 1, x), 0);
+	starpu_task_insert(&work, STARPU_W, starpu_data_get_sub_data(f_handle, 1, x), 0);
 	starpu_data_release(x_handle);
 	starpu_data_release(x_handle);
 }
 }
 
 
@@ -97,16 +97,16 @@ int main(int argc, char **argv)
 	starpu_data_partition(f_handle, &filter);
 	starpu_data_partition(f_handle, &filter);
 
 
 	/* Compute which portion we will work on */
 	/* Compute which portion we will work on */
-        ret = starpu_insert_task(&which_index, STARPU_W, x_handle, 0);
+        ret = starpu_task_insert(&which_index, STARPU_W, x_handle, 0);
 	if (ret == -ENODEV) goto enodev;
 	if (ret == -ENODEV) goto enodev;
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
 	/* And submit the corresponding task */
 	/* And submit the corresponding task */
 #ifdef __GCC__
 #ifdef __GCC__
 	STARPU_DATA_ACQUIRE_CB(
 	STARPU_DATA_ACQUIRE_CB(
 			x_handle,
 			x_handle,
 			STARPU_R,
 			STARPU_R,
-			starpu_insert_task(&work, STARPU_W, starpu_data_get_sub_data(f_handle, 1, x), 0)
+			starpu_task_insert(&work, STARPU_W, starpu_data_get_sub_data(f_handle, 1, x), 0)
 			);
 			);
 #else
 #else
 	starpu_data_acquire_cb(x_handle, STARPU_W, callback, NULL);
 	starpu_data_acquire_cb(x_handle, STARPU_W, callback, NULL);

+ 1 - 1
tests/datawizard/commute.c

@@ -141,7 +141,7 @@ static void test(enum starpu_data_access_mode begin_mode, enum starpu_data_acces
 		exit(STARPU_TEST_SKIPPED);
 		exit(STARPU_TEST_SKIPPED);
 	if (starpu_task_submit(commute2_t) == -ENODEV)
 	if (starpu_task_submit(commute2_t) == -ENODEV)
 		exit(STARPU_TEST_SKIPPED);
 		exit(STARPU_TEST_SKIPPED);
-	starpu_insert_task(&codelet_commute3, STARPU_RW|STARPU_COMMUTE, x_handle, 0);
+	starpu_task_insert(&codelet_commute3, STARPU_RW|STARPU_COMMUTE, x_handle, 0);
 	if (starpu_task_submit(end_t) == -ENODEV)
 	if (starpu_task_submit(end_t) == -ENODEV)
 		exit(STARPU_TEST_SKIPPED);
 		exit(STARPU_TEST_SKIPPED);
 
 

+ 2 - 2
tests/datawizard/data_lookup.c

@@ -56,12 +56,12 @@ static int test_lazy_allocation(void)
 	starpu_vector_data_register(&handle, -1, 0 /* NULL */,
 	starpu_vector_data_register(&handle, -1, 0 /* NULL */,
 				    count, sizeof(float));
 				    count, sizeof(float));
 
 
-	ret = starpu_insert_task(&cl,
+	ret = starpu_task_insert(&cl,
 				 STARPU_W, handle,
 				 STARPU_W, handle,
 				 STARPU_VALUE, &count, sizeof(size_t),
 				 STARPU_VALUE, &count, sizeof(size_t),
 				 0);
 				 0);
 	if (ret == -ENODEV) return ret;
 	if (ret == -ENODEV) return ret;
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
 	/* yes, we do not perform the computation but we did detect that no one
 	/* yes, we do not perform the computation but we did detect that no one
 	 * could perform the kernel, so this is not an error from StarPU */
 	 * could perform the kernel, so this is not an error from StarPU */

+ 4 - 4
tests/datawizard/handle_to_pointer.c

@@ -134,10 +134,10 @@ int main(int argc, char *argv[])
 	STARPU_ASSERT(starpu_data_handle_to_pointer(handle, STARPU_MAIN_RAM) == NULL);
 	STARPU_ASSERT(starpu_data_handle_to_pointer(handle, STARPU_MAIN_RAM) == NULL);
 
 
 	/* Pass the handle to a task.  */
 	/* Pass the handle to a task.  */
-	err = starpu_insert_task(&cl,
-			   STARPU_W, handle,
-			   STARPU_VALUE, &count, sizeof(count),
-			   0);
+	err = starpu_task_insert(&cl,
+				 STARPU_W, handle,
+				 STARPU_VALUE, &count, sizeof(count),
+				 0);
 	if (err == -ENODEV)
 	if (err == -ENODEV)
 		return STARPU_TEST_SKIPPED;
 		return STARPU_TEST_SKIPPED;
 
 

+ 1 - 1
tests/datawizard/interfaces/test_interfaces.c

@@ -438,7 +438,7 @@ create_task(struct starpu_task **taskp, enum starpu_worker_archtype type, int id
  * <device1>_to_<device2> functions.
  * <device1>_to_<device2> functions.
  * They all create and submit a task that has to be executed on <device2>,
  * They all create and submit a task that has to be executed on <device2>,
  * forcing a copy between <device1> and <device2>.
  * forcing a copy between <device1> and <device2>.
- * XXX : could we sometimes use starp_insert_task() ? It seems hars because we
+ * XXX : could we sometimes use starpu_task_insert() ? It seems hars because we
  * need to set the execute_on_a_specific_worker field...
  * need to set the execute_on_a_specific_worker field...
  */
  */
 #ifdef STARPU_USE_CUDA
 #ifdef STARPU_USE_CUDA

+ 4 - 4
tests/datawizard/lazy_allocation.c

@@ -202,16 +202,16 @@ int main(int argc, char **argv)
 
 
 	starpu_vector_data_register(&v_handle, (uint32_t)-1, (uintptr_t)NULL, VECTORSIZE, sizeof(char));
 	starpu_vector_data_register(&v_handle, (uint32_t)-1, (uintptr_t)NULL, VECTORSIZE, sizeof(char));
 
 
-	ret = starpu_insert_task(&memset_cl, STARPU_W, v_handle, 0);
+	ret = starpu_task_insert(&memset_cl, STARPU_W, v_handle, 0);
 	if (ret == -ENODEV)
 	if (ret == -ENODEV)
 		return STARPU_TEST_SKIPPED;
 		return STARPU_TEST_SKIPPED;
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
         ret = starpu_task_wait_for_all();
         ret = starpu_task_wait_for_all();
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_wait_for_all");
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_wait_for_all");
 
 
-	ret = starpu_insert_task(&check_content_cl, STARPU_R, v_handle, 0);
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+	ret = starpu_task_insert(&check_content_cl, STARPU_R, v_handle, 0);
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
         ret = starpu_task_wait_for_all();
         ret = starpu_task_wait_for_all();
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_wait_for_all");
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_wait_for_all");

+ 1 - 1
tests/datawizard/partition_lazy.c

@@ -65,7 +65,7 @@ int main(int argc, char **argv)
 
 
 	for (i = 0; i < f.nchildren; i++)
 	for (i = 0; i < f.nchildren; i++)
 	{
 	{
-		ret = starpu_insert_task(&mycodelet,
+		ret = starpu_task_insert(&mycodelet,
 					 STARPU_W,
 					 STARPU_W,
 					 starpu_data_get_sub_data(handle, 1, i),
 					 starpu_data_get_sub_data(handle, 1, i),
 					 0);
 					 0);

+ 3 - 3
tests/datawizard/readonly.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
  * Copyright (C) 2010  Université de Bordeaux 1
  * Copyright (C) 2010  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
  * it under the terms of the GNU Lesser General Public License as published by
@@ -49,11 +49,11 @@ int main(int argc, char **argv)
 
 
      starpu_variable_data_register(&handle, STARPU_MAIN_RAM, (uintptr_t)&var, sizeof(var));
      starpu_variable_data_register(&handle, STARPU_MAIN_RAM, (uintptr_t)&var, sizeof(var));
 
 
-     ret = starpu_insert_task(&cl,
+     ret = starpu_task_insert(&cl,
 			      STARPU_R, handle,
 			      STARPU_R, handle,
 			      0);
 			      0);
      if (ret == -ENODEV) goto enodev;
      if (ret == -ENODEV) goto enodev;
-     STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+     STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
      starpu_task_wait_for_all();
      starpu_task_wait_for_all();
 
 

+ 2 - 2
tests/main/codelet_null_callback.c

@@ -33,10 +33,10 @@ int main(int argc, char **argv)
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 
 
-	ret = starpu_insert_task(NULL,
+	ret = starpu_task_insert(NULL,
 				 STARPU_CALLBACK_WITH_ARG, callback, &x,
 				 STARPU_CALLBACK_WITH_ARG, callback, &x,
 				 0);
 				 0);
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
 	starpu_task_wait_for_all();
 	starpu_task_wait_for_all();
 	starpu_shutdown();
 	starpu_shutdown();

+ 6 - 6
tests/main/deprecated_buffer.c

@@ -43,16 +43,16 @@ struct starpu_codelet cl_without_mode =
 	.nbuffers = 2
 	.nbuffers = 2
 };
 };
 
 
-int submit_codelet_insert_task(struct starpu_codelet cl, starpu_data_handle_t handles0, starpu_data_handle_t handles1)
+int submit_codelet_task_insert(struct starpu_codelet cl, starpu_data_handle_t handles0, starpu_data_handle_t handles1)
 {
 {
 	int ret;
 	int ret;
 
 
-	ret = starpu_insert_task(&cl,
+	ret = starpu_task_insert(&cl,
 				 STARPU_R, handles0,
 				 STARPU_R, handles0,
 				 STARPU_W, handles1,
 				 STARPU_W, handles1,
 				 0);
 				 0);
 	if (ret == -ENODEV) return ret;
 	if (ret == -ENODEV) return ret;
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
 	starpu_task_wait_for_all();
 	starpu_task_wait_for_all();
 	return 0;
 	return 0;
@@ -134,7 +134,7 @@ int submit_codelet(struct starpu_codelet cl, struct submit_task_func func)
 int main(int argc, char **argv)
 int main(int argc, char **argv)
 {
 {
 	int ret;
 	int ret;
-	struct submit_task_func insert_task = { .func = submit_codelet_insert_task, .name = "insert_task" };
+	struct submit_task_func task_insert = { .func = submit_codelet_task_insert, .name = "task_insert" };
 	struct submit_task_func with_buffers = { .func = submit_codelet_with_buffers, .name = "with_buffers" };
 	struct submit_task_func with_buffers = { .func = submit_codelet_with_buffers, .name = "with_buffers" };
 	struct submit_task_func with_handles = { .func = submit_codelet_with_handles, .name = "with_handles" };
 	struct submit_task_func with_handles = { .func = submit_codelet_with_handles, .name = "with_handles" };
 
 
@@ -142,7 +142,7 @@ int main(int argc, char **argv)
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 
 
-	ret = submit_codelet(cl_with_mode, insert_task);
+	ret = submit_codelet(cl_with_mode, task_insert);
 	if (ret == -ENODEV)
 	if (ret == -ENODEV)
 	{
 	{
 		starpu_shutdown();
 		starpu_shutdown();
@@ -160,7 +160,7 @@ int main(int argc, char **argv)
 	}
 	}
 	if (!ret)
 	if (!ret)
 	{
 	{
-		ret = submit_codelet(cl_without_mode, insert_task);
+		ret = submit_codelet(cl_without_mode, task_insert);
 	}
 	}
 	if (!ret)
 	if (!ret)
 	{
 	{

+ 1 - 1
tests/main/deprecated_func.c

@@ -78,7 +78,7 @@ int submit_codelet(struct starpu_codelet cl, int where)
 	starpu_variable_data_register(&handles[1], STARPU_MAIN_RAM, (uintptr_t)&y, sizeof(y));
 	starpu_variable_data_register(&handles[1], STARPU_MAIN_RAM, (uintptr_t)&y, sizeof(y));
 
 
 	cl.where = where;
 	cl.where = where;
-	ret = starpu_insert_task(&cl,
+	ret = starpu_task_insert(&cl,
 				 STARPU_R, handles[0],
 				 STARPU_R, handles[0],
 				 STARPU_W, handles[1],
 				 STARPU_W, handles[1],
 				 0);
 				 0);

+ 7 - 7
tests/main/insert_task.c

@@ -59,7 +59,7 @@ struct starpu_codelet mycodelet_noargs =
         .nbuffers = 2
         .nbuffers = 2
 };
 };
 
 
-int test_codelet(struct starpu_codelet *codelet, int insert_task, int args, int x, float f)
+int test_codelet(struct starpu_codelet *codelet, int task_insert, int args, int x, float f)
 {
 {
         starpu_data_handle_t data_handles[2];
         starpu_data_handle_t data_handles[2];
 	int xx = x;
 	int xx = x;
@@ -71,20 +71,20 @@ int test_codelet(struct starpu_codelet *codelet, int insert_task, int args, int
 
 
         FPRINTF(stderr, "values: %d (%d) %f (%f)\n", xx, _ifactor, ff, _ffactor);
         FPRINTF(stderr, "values: %d (%d) %f (%f)\n", xx, _ifactor, ff, _ffactor);
 
 
-	if (insert_task)
+	if (task_insert)
 	{
 	{
 		if (args)
 		if (args)
-			ret = starpu_insert_task(codelet,
+			ret = starpu_task_insert(codelet,
 						 STARPU_VALUE, &_ifactor, sizeof(_ifactor),
 						 STARPU_VALUE, &_ifactor, sizeof(_ifactor),
 						 STARPU_VALUE, &_ffactor, sizeof(_ffactor),
 						 STARPU_VALUE, &_ffactor, sizeof(_ffactor),
 						 STARPU_RW, data_handles[0], STARPU_RW, data_handles[1],
 						 STARPU_RW, data_handles[0], STARPU_RW, data_handles[1],
 						 0);
 						 0);
 		else
 		else
-			ret = starpu_insert_task(codelet,
+			ret = starpu_task_insert(codelet,
 						 STARPU_RW, data_handles[0], STARPU_RW, data_handles[1],
 						 STARPU_RW, data_handles[0], STARPU_RW, data_handles[1],
 						 0);
 						 0);
 		if (ret == -ENODEV) goto enodev;
 		if (ret == -ENODEV) goto enodev;
-		STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 	}
 	}
 	else
 	else
 	{
 	{
@@ -127,12 +127,12 @@ int main(int argc, char **argv)
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 
 
-	FPRINTF(stderr, "Testing codelet with insert task and with arguments\n");
+	FPRINTF(stderr, "Testing codelet with task_insert and with arguments\n");
 	ret = test_codelet(&mycodelet_args, 1, 1, 4, 2.0);
 	ret = test_codelet(&mycodelet_args, 1, 1, 4, 2.0);
 	if (ret == -ENODEV) goto enodev;
 	if (ret == -ENODEV) goto enodev;
 	if (ret)
 	if (ret)
 	{
 	{
-		FPRINTF(stderr, "Testing codelet with insert task and without arguments\n");
+		FPRINTF(stderr, "Testing codelet with task_insert and without arguments\n");
 		ret = test_codelet(&mycodelet_noargs, 1, 0, 9, 7.0);
 		ret = test_codelet(&mycodelet_noargs, 1, 0, 9, 7.0);
 	}
 	}
 	if (ret == -ENODEV) goto enodev;
 	if (ret == -ENODEV) goto enodev;

+ 2 - 2
tests/main/insert_task_array.c

@@ -54,13 +54,13 @@ int main(int argc, char **argv)
 	f = 2.0;
 	f = 2.0;
 	starpu_variable_data_register(&data_handles[1], STARPU_MAIN_RAM, (uintptr_t)&f, sizeof(f));
 	starpu_variable_data_register(&data_handles[1], STARPU_MAIN_RAM, (uintptr_t)&f, sizeof(f));
 
 
-        ret = starpu_insert_task(&mycodelet,
+        ret = starpu_task_insert(&mycodelet,
 				 STARPU_DATA_ARRAY, data_handles, 2,
 				 STARPU_DATA_ARRAY, data_handles, 2,
 				 STARPU_VALUE, &factor, sizeof(factor),
 				 STARPU_VALUE, &factor, sizeof(factor),
 				 STARPU_PRIORITY, 1,
 				 STARPU_PRIORITY, 1,
 				 0);
 				 0);
 	if (ret == -ENODEV) goto enodev;
 	if (ret == -ENODEV) goto enodev;
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
         ret = starpu_task_wait_for_all();
         ret = starpu_task_wait_for_all();
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_wait_for_all");
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_wait_for_all");

+ 3 - 3
tests/main/insert_task_nullcodelet.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
  * it under the terms of the GNU Lesser General Public License as published by
@@ -26,9 +26,9 @@ int main(int argc, char **argv)
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 
 
-        ret = starpu_insert_task(NULL, 0);
+        ret = starpu_task_insert(NULL, 0);
 	if (ret == -ENODEV) goto enodev;
 	if (ret == -ENODEV) goto enodev;
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_insert_task");
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 
 
         ret = starpu_task_wait_for_all();
         ret = starpu_task_wait_for_all();
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_wait_for_all");
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_wait_for_all");

+ 3 - 3
tests/microbenchs/matrix_as_vector.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2012, 2013  Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
  * it under the terms of the GNU Lesser General Public License as published by
@@ -106,7 +106,7 @@ int check_size(int nx, struct starpu_codelet *vector_codelet, struct starpu_code
 	{
 	{
 		for(i=0 ; i<nx ; i++) matrix[i] = i;
 		for(i=0 ; i<nx ; i++) matrix[i] = i;
 		starpu_vector_data_register(&vector_handle, STARPU_MAIN_RAM, (uintptr_t)matrix, nx, sizeof(matrix[0]));
 		starpu_vector_data_register(&vector_handle, STARPU_MAIN_RAM, (uintptr_t)matrix, nx, sizeof(matrix[0]));
-		ret = starpu_insert_task(vector_codelet, STARPU_RW, vector_handle, 0);
+		ret = starpu_task_insert(vector_codelet, STARPU_RW, vector_handle, 0);
 		starpu_data_unregister(vector_handle);
 		starpu_data_unregister(vector_handle);
 		if (ret == -ENODEV) goto end;
 		if (ret == -ENODEV) goto end;
 	}
 	}
@@ -121,7 +121,7 @@ int check_size(int nx, struct starpu_codelet *vector_codelet, struct starpu_code
 	{
 	{
 		for(i=0 ; i<nx ; i++) matrix[i] = i;
 		for(i=0 ; i<nx ; i++) matrix[i] = i;
 		starpu_matrix_data_register(&matrix_handle, STARPU_MAIN_RAM, (uintptr_t)matrix, nx/2, nx/2, 2, sizeof(matrix[0]));
 		starpu_matrix_data_register(&matrix_handle, STARPU_MAIN_RAM, (uintptr_t)matrix, nx/2, nx/2, 2, sizeof(matrix[0]));
-		ret = starpu_insert_task(matrix_codelet, STARPU_RW, matrix_handle, 0);
+		ret = starpu_task_insert(matrix_codelet, STARPU_RW, matrix_handle, 0);
 		starpu_data_unregister(matrix_handle);
 		starpu_data_unregister(matrix_handle);
 		if (ret == -ENODEV) goto end;
 		if (ret == -ENODEV) goto end;
 	}
 	}

+ 1 - 1
tests/perfmodels/valid_model.c

@@ -81,7 +81,7 @@ static int submit(struct starpu_codelet *codelet, struct starpu_perfmodel *model
         starpu_vector_data_register(&handle, -1, (uintptr_t)NULL, 100, sizeof(int));
         starpu_vector_data_register(&handle, -1, (uintptr_t)NULL, 100, sizeof(int));
 	for (loop = 0; loop < nloops; loop++)
 	for (loop = 0; loop < nloops; loop++)
 	{
 	{
-		ret = starpu_insert_task(codelet, STARPU_W, handle, 0);
+		ret = starpu_task_insert(codelet, STARPU_W, handle, 0);
 		if (ret == -ENODEV) return STARPU_TEST_SKIPPED;
 		if (ret == -ENODEV) return STARPU_TEST_SKIPPED;
 		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit");
 		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit");
 	}
 	}