Browse Source

field cl_arg_size of struct starpu_task is only used by the cell driver, remove it

Nathalie Furmento 12 years ago
parent
commit
9082a372c7

+ 0 - 1
examples/basic_examples/block.c

@@ -53,7 +53,6 @@ int execute_on(uint32_t where, device_func func, float *block, int pnx, int pny,
         task->callback_func = NULL;
         task->handles[0] = block_handle;
 	task->cl_arg = &multiplier;
-	task->cl_arg_size = sizeof(multiplier);
 
         int ret = starpu_task_submit(task);
         if (STARPU_UNLIKELY(ret == -ENODEV))

+ 0 - 1
examples/basic_examples/hello_world.c

@@ -100,7 +100,6 @@ int main(int argc, char **argv)
 	 * of the buffer.  For this reason, a buffer passed as a codelet
 	 * argument (cl_arg) is NOT a valid synchronization medium! */
 	task->cl_arg = &params;
-	task->cl_arg_size = sizeof(params);
 
 	/* once the task has been executed, callback_func(0x42)
 	 * will be called on a CPU */

+ 0 - 1
examples/basic_examples/multiformat.c

@@ -160,7 +160,6 @@ create_and_submit_task(unsigned int dev)
 	task->synchronous = 1;
 	task->handles[0] = array_of_structs_handle;
 	task->cl_arg = NULL;
-	task->cl_arg_size = 0;
 	return starpu_task_submit(task);
 }
 

+ 0 - 1
examples/basic_examples/vector_scal.c

@@ -154,7 +154,6 @@ int main(int argc, char **argv)
 	 * READ-ONLY buffer and that the codelet may be given a pointer to a
 	 * COPY of the argument */
 	task->cl_arg = &factor;
-	task->cl_arg_size = sizeof(factor);
 
 	/* execute the task on any eligible computational ressource */
 	ret = starpu_task_submit(task);

+ 0 - 1
examples/basic_examples/vector_scal_c.c

@@ -94,7 +94,6 @@ int compute_(int *F_NX, float *vector)
 	 * READ-ONLY buffer and that the codelet may be given a pointer to a
 	 * COPY of the argument */
 	task->cl_arg = &factor;
-	task->cl_arg_size = sizeof(factor);
 
 	/* execute the task on any eligible computational ressource */
 	ret = starpu_task_submit(task);

+ 0 - 1
examples/filters/fmatrix.c

@@ -93,7 +93,6 @@ int main(int argc, char **argv)
                 task->cl = &cl;
                 task->synchronous = 1;
                 task->cl_arg = &factor;
-                task->cl_arg_size = sizeof(factor);
 
 		ret = starpu_task_submit(task);
 		if (ret == -ENODEV) goto enodev;

+ 0 - 1
examples/filters/fvector.c

@@ -83,7 +83,6 @@ int main(int argc, char **argv)
                 task->cl = &cl;
                 task->synchronous = 1;
                 task->cl_arg = &factor;
-                task->cl_arg_size = sizeof(factor);
 
 		ret = starpu_task_submit(task);
 		if (ret == -ENODEV) goto enodev;

+ 0 - 1
examples/openmp/vector_scal.c

@@ -102,7 +102,6 @@ int main(int argc, char **argv)
 
 		task->handles[0] = vector_handle;
 		task->cl_arg = &factor;
-		task->cl_arg_size = sizeof(factor);
 
 		ret = starpu_task_submit(task);
 		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit");

+ 0 - 1
examples/spmd/vector_scal_spmd.c

@@ -125,7 +125,6 @@ int main(int argc, char **argv)
 
 		task->handles[0] = vector_handle;
 		task->cl_arg = &factor;
-		task->cl_arg_size = sizeof(factor);
 
 		ret = starpu_task_submit(task);
 		if (ret == -ENODEV) {

+ 0 - 1
examples/top/hello_world_top.c

@@ -197,7 +197,6 @@ int main(int argc, char **argv)
 		 * argument (cl_arg) is NOT a valid synchronization medium! */
 		struct params params = { i, 2.0f };
 		task[i]->cl_arg = &params;
-		task[i]->cl_arg_size = sizeof(params);
 
 		/* once the task has been executed, callback_func(0x42)
 		 * will be called on a CPU */

+ 0 - 3
include/starpu_task.h

@@ -127,8 +127,6 @@ struct starpu_task
 
 	/* arguments not managed by the DSM are given as a buffer */
 	void *cl_arg;
-	/* in case the argument buffer has to be uploaded explicitely */
-	size_t cl_arg_size;
 
 	/* when the task is done, callback_func(callback_arg) is called */
 	void (*callback_func)(void *);
@@ -209,7 +207,6 @@ struct starpu_task
 {							\
 	.cl = NULL,					\
 	.cl_arg = NULL,					\
-	.cl_arg_size = 0,				\
 	.callback_func = NULL,				\
 	.callback_arg = NULL,				\
 	.priority = STARPU_DEFAULT_PRIO,		\

+ 0 - 1
socl/src/cl_enqueuecopybuffer.c

@@ -71,7 +71,6 @@ cl_int command_copy_buffer_submit(command_copy_buffer cmd) {
 	}
 
 	task->cl_arg = cmd;
-	task->cl_arg_size = sizeof(*cmd);
 
 	cmd->dst_buffer->scratch = 0;
 

+ 0 - 1
socl/src/cl_enqueuendrangekernel.c

@@ -123,7 +123,6 @@ cl_int command_ndrange_kernel_submit(command_ndrange_kernel cmd) {
 	task->cl = &cmd->codelet;
 	task->cl->model = cmd->kernel->perfmodel;
 	task->cl_arg = cmd;
-	task->cl_arg_size = sizeof(cmd);
 
 	/* Execute the task on a specific worker? */
 	if (cmd->_command.cq->device != NULL) {

+ 0 - 1
socl/src/cl_enqueuereadbuffer.c

@@ -77,7 +77,6 @@ cl_int command_read_buffer_submit(command_read_buffer cmd) {
 	}
 
 	task->cl_arg = cmd;
-	task->cl_arg_size = sizeof(*cmd);
 
 	task_submit(task, cmd);
 

+ 0 - 1
socl/src/cl_enqueuewritebuffer.c

@@ -92,7 +92,6 @@ cl_int command_write_buffer_submit(command_write_buffer cmd) {
 		task->cl = &codelet_writebuffer;
 
 	task->cl_arg = cmd;
-	task->cl_arg_size = sizeof(*cmd);
 
 	/* Execute the task on a specific worker? */
 	if (cmd->_command.cq->device != NULL) {

+ 0 - 1
src/util/starpu_insert_task_utils.c

@@ -289,7 +289,6 @@ int _starpu_insert_task_create_and_submit(char *arg_buffer, size_t arg_buffer_si
 
 	(*task)->cl = cl;
 	(*task)->cl_arg = arg_buffer;
-	(*task)->cl_arg_size = arg_buffer_size;
 
 	/* The callback will free the argument stack and execute the
 	 * application's callback, if any. */

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

@@ -368,7 +368,6 @@ create_task(struct starpu_task **taskp, enum starpu_archtype type, int id)
 	}
 	factor = -factor;
 	task->cl_arg = &factor;
-	task->cl_arg_size = sizeof(&factor);
 
 	*taskp = task;
 	return 0;

+ 3 - 4
tests/main/insert_task.c

@@ -97,11 +97,10 @@ int main(int argc, char **argv)
 	char *arg_buffer;
 	size_t arg_buffer_size;
 	starpu_codelet_pack_args(&arg_buffer, &arg_buffer_size,
-			    STARPU_VALUE, &ifactor, sizeof(ifactor),
-			    STARPU_VALUE, &ffactor, sizeof(ffactor),
-			    0);
+				 STARPU_VALUE, &ifactor, sizeof(ifactor),
+				 STARPU_VALUE, &ffactor, sizeof(ffactor),
+				 0);
 	task->cl_arg = arg_buffer;
-	task->cl_arg_size = arg_buffer_size;
 
 	ret = starpu_task_submit(task);
 	if (ret == -ENODEV) goto enodev;

+ 0 - 1
tests/main/starpu_task_bundle.c

@@ -81,7 +81,6 @@ int main(int argc, char **argv)
 			task[j]->cl = &codelet;
 
 			task[j]->cl_arg = &factors[i];
-			task[j]->cl_arg_size = sizeof(float);
 
 			task[j]->handles[0] = handles[i];