Skip to content

Commit

Permalink
lu: avoid uninitialized data
Browse files Browse the repository at this point in the history
  • Loading branch information
sthibaul committed Oct 28, 2024
1 parent 2eb3fc5 commit 17d1b47
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions examples/heat/dw_factolu.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void dw_callback_v2_codelet_update_gemm(void *argcb)
if ((i == j) && (i == k+1))
{
/* we now reduce the LU22 part (recursion appears there) */
cl_args *ugetrfarg = malloc(sizeof(cl_args));
cl_args *ugetrfarg = calloc(1, sizeof(cl_args));

struct starpu_task *task = starpu_task_create();
task->callback_func = dw_callback_v2_codelet_update_getrf;
Expand Down Expand Up @@ -169,7 +169,7 @@ void dw_callback_v2_codelet_update_gemm(void *argcb)
if ((u & STARTED) == 0)
{
/* we are the only one that should launch that task */
cl_args *utrsmrua = malloc(sizeof(cl_args));
cl_args *utrsmrua = calloc(1, sizeof(cl_args));

struct starpu_task *task_trsm_ru = starpu_task_create();
task_trsm_ru->callback_func = dw_callback_v2_codelet_update_trsm_ru;
Expand Down Expand Up @@ -206,7 +206,7 @@ void dw_callback_v2_codelet_update_gemm(void *argcb)
if ((u & STARTED) == 0)
{
/* we are the only one that should launch that task */
cl_args *utrsmlla = malloc(sizeof(cl_args));
cl_args *utrsmlla = calloc(1, sizeof(cl_args));

struct starpu_task *task_trsm_ll = starpu_task_create();
task_trsm_ll->callback_func = dw_callback_v2_codelet_update_trsm_ll;
Expand Down Expand Up @@ -262,7 +262,7 @@ void dw_callback_v2_codelet_update_trsm_ll(void *argcb)
if ((u & STARTED) == 0)
{
/* update that square matrix */
cl_args *ugemma = malloc(sizeof(cl_args));
cl_args *ugemma = calloc(1, sizeof(cl_args));

struct starpu_task *task_gemm = starpu_task_create();
task_gemm->callback_func = dw_callback_v2_codelet_update_gemm;
Expand Down Expand Up @@ -323,7 +323,7 @@ void dw_callback_v2_codelet_update_trsm_ru(void *argcb)
if ((u & STARTED) == 0)
{
/* update that square matrix */
cl_args *ugemma = malloc(sizeof(cl_args));
cl_args *ugemma = calloc(1, sizeof(cl_args));

struct starpu_task *task_gemm = starpu_task_create();
task_gemm->callback_func = dw_callback_v2_codelet_update_gemm;
Expand Down Expand Up @@ -400,7 +400,7 @@ void dw_callback_v2_codelet_update_getrf(void *argcb)
int ret;

/* we are the only one that should launch that task */
cl_args *utrsmlla = malloc(sizeof(cl_args));
cl_args *utrsmlla = calloc(1, sizeof(cl_args));

struct starpu_task *task_trsm_ll = starpu_task_create();
task_trsm_ll->callback_func = dw_callback_v2_codelet_update_trsm_ll;
Expand Down Expand Up @@ -444,7 +444,7 @@ void dw_callback_v2_codelet_update_getrf(void *argcb)
int ret;

/* we are the only one that should launch that task */
cl_args *utrsmrua = malloc(sizeof(cl_args));
cl_args *utrsmrua = calloc(1, sizeof(cl_args));

struct starpu_task *task_trsm_ru = starpu_task_create();
task_trsm_ru->callback_func = dw_callback_v2_codelet_update_trsm_ru;
Expand Down Expand Up @@ -507,10 +507,10 @@ void dw_callback_codelet_update_getrf(void *argcb)
int ret;

/* update slice from utrsmll */
cl_args *utrsmlla = malloc(sizeof(cl_args));
cl_args *utrsmlla = calloc(1, sizeof(cl_args));

/* update slice from utrsmru */
cl_args *utrsmrua = malloc(sizeof(cl_args));
cl_args *utrsmrua = calloc(1, sizeof(cl_args));

struct starpu_task *task_trsm_ll = starpu_task_create();
task_trsm_ll->callback_func = dw_callback_codelet_update_trsm_ll_21;
Expand Down Expand Up @@ -570,7 +570,7 @@ void dw_callback_codelet_update_gemm(void *argcb)
free(args->remaining);

/* we now reduce the LU22 part (recursion appears there) */
cl_args *ugetrfarg = malloc(sizeof(cl_args));
cl_args *ugetrfarg = calloc(1, sizeof(cl_args));

struct starpu_task *task = starpu_task_create();
task->callback_func = dw_callback_codelet_update_getrf;
Expand Down Expand Up @@ -618,7 +618,7 @@ void dw_callback_codelet_update_trsm_ll_21(void *argcb)
int ret;

/* update that square matrix */
cl_args *ugemma = malloc(sizeof(cl_args));
cl_args *ugemma = calloc(1, sizeof(cl_args));

struct starpu_task *task_gemm = starpu_task_create();
task_gemm->callback_func = dw_callback_codelet_update_gemm;
Expand Down Expand Up @@ -657,7 +657,7 @@ void dw_callback_codelet_update_trsm_ll_21(void *argcb)
void dw_codelet_facto(starpu_data_handle_t dataA, unsigned nblocks)
{
int ret;
cl_args *args = malloc(sizeof(cl_args));
cl_args *args = calloc(1, sizeof(cl_args));

args->i = 0;
args->nblocks = nblocks;
Expand Down

0 comments on commit 17d1b47

Please sign in to comment.