@@ -2993,8 +2993,8 @@ This partitions a 3D matrix along the X axis.
@subsection @code{struct starpu_codelet} -- StarPU codelet structure
@table @asis
@item @emph{Description}:
-The codelet structure describes a kernel that is possibly implemented on
-various targets.
+The codelet structure describes a kernel that is possibly implemented on various
+targets. For compatibility, make sure to initialize the whole structure to zero.
@item @emph{Fields}:
@item @code{where}:
@@ -32,7 +32,7 @@ typedef void (*device_func)(void **, void *);
int execute_on(uint32_t where, device_func func, float *block, int pnx, int pny, int pnz, float multiplier)
{
- starpu_codelet cl;
+ starpu_codelet cl = {};
starpu_data_handle block_handle;
int i;
@@ -36,7 +36,7 @@ int main(int argc, char **argv)
unsigned i;
float foo;
starpu_data_handle float_array_handle;
starpu_init(NULL);
if (argc == 2) niter = atoi(argv[1]);
@@ -22,8 +22,7 @@
static struct starpu_task *create_task(starpu_tag_t id)
- starpu_codelet *cl = malloc(sizeof(starpu_codelet));
- cl->model = NULL;
+ starpu_codelet *cl = calloc(sizeof(starpu_codelet));
struct starpu_task *task = starpu_task_create();
task->cl = cl;
@@ -112,7 +112,7 @@ int compareL2fe(const float* reference, const float* data, const unsigned int le
int main(int argc, char **argv)
struct starpu_conf conf = {
.ncpus = 0,
@@ -263,8 +263,7 @@ void call_spmv_codelet_filters(void)
}
#endif
- memset(&cl, 0, sizeof(starpu_codelet));
cl.where = STARPU_CPU|STARPU_CUDA|STARPU_OPENCL;
cl.cpu_func = cpu_spmv;