Browse Source

rename starpu_init_task to starpu_task_build:
- to be more consistent with the naming scheme
- but the function starpu_task_init() already exists, and the new
function is doing more than just initialising a task object

Nathalie Furmento 11 years ago
parent
commit
dba764e29e

+ 1 - 1
ChangeLog

@@ -65,7 +65,7 @@ Small features:
   * Add cl_arg_free, callback_arg_free, prologue_callback_arg_free fields to
     enable automatic free(cl_arg); free(callback_arg);
     free(prologue_callback_arg) on task destroy.
-  * New function starpu_init_task
+  * New function starpu_task_build
 
 Changes:
   * Fix of the livelock issue discovered while executing applications

+ 2 - 2
doc/doxygen/chapters/api/insert_task.doxy

@@ -95,11 +95,11 @@ starpu_codelet_unpack_args().
 Retrieve the arguments of type ::STARPU_VALUE associated to a
 task automatically created using the function starpu_insert_task().
 
-\fn struct starpu_task *starpu_init_task(struct starpu_codelet *cl, ...)
+\fn struct starpu_task *starpu_task_build(struct starpu_codelet *cl, ...)
 \ingroup API_Insert_Task
 Create a task corresponding to \p cl with the following arguments.
 The argument list must be zero-terminated. The arguments
 following the codelet are the same as the ones for the function
-starpu_insert_task().
+starpu_task_insert().
 
 */

+ 1 - 1
include/starpu_task_util.h

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

+ 1 - 1
src/util/starpu_insert_task.c

@@ -97,7 +97,7 @@ int starpu_insert_task(struct starpu_codelet *cl, ...)
 	return ret;
 }
 
-struct starpu_task *starpu_init_task(struct starpu_codelet *cl, ...)
+struct starpu_task *starpu_task_build(struct starpu_codelet *cl, ...)
 {
 	va_list varg_list;
 	void *arg_buffer = NULL;

+ 10 - 10
tests/main/insert_task.c

@@ -90,15 +90,15 @@ int test_codelet(struct starpu_codelet *codelet, int insert_task, int args, int
 	{
 		struct starpu_task *task;
 		if (args)
-			task = starpu_init_task(codelet,
-						STARPU_VALUE, &_ifactor, sizeof(_ifactor),
-						STARPU_VALUE, &_ffactor, sizeof(_ffactor),
-						STARPU_RW, data_handles[0], STARPU_RW, data_handles[1],
-						0);
+			task = starpu_task_build(codelet,
+						 STARPU_VALUE, &_ifactor, sizeof(_ifactor),
+						 STARPU_VALUE, &_ffactor, sizeof(_ffactor),
+						 STARPU_RW, data_handles[0], STARPU_RW, data_handles[1],
+						 0);
 		else
-			task = starpu_init_task(codelet,
-						STARPU_RW, data_handles[0], STARPU_RW, data_handles[1],
-						0);
+			task = starpu_task_build(codelet,
+						 STARPU_RW, data_handles[0], STARPU_RW, data_handles[1],
+						 0);
 		task->cl_arg_free = 1;
 		ret = starpu_task_submit(task);
 		if (ret == -ENODEV) goto enodev;
@@ -138,13 +138,13 @@ int main(int argc, char **argv)
 	if (ret == -ENODEV) goto enodev;
 	if (ret)
 	{
-		FPRINTF(stderr, "Testing codelet with init_task and with arguments\n");
+		FPRINTF(stderr, "Testing codelet with task_build and with arguments\n");
 		ret = test_codelet(&mycodelet_args, 0, 1, 5, 3.0);
 	}
 	if (ret == -ENODEV) goto enodev;
 	if (ret)
 	{
-		FPRINTF(stderr, "Testing codelet with init_task and without arguments\n");
+		FPRINTF(stderr, "Testing codelet with task_build and without arguments\n");
 		ret = test_codelet(&mycodelet_noargs, 0, 0, 7, 5.0);
 	}
 	if (ret == -ENODEV) goto enodev;