Skip to content

Commit

Permalink
Update the parsec_apply because of the changes in PaRSEC PR#676
Browse files Browse the repository at this point in the history
  • Loading branch information
Qinglei Cao committed Oct 11, 2024
1 parent a461dd1 commit 1314a0e
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 50 deletions.
8 changes: 4 additions & 4 deletions src/include/dplasma/dplasma_z.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,11 @@ parsec_taskpool_t* dplasma_zlanm2_New( const parsec_tiled_matrix_t *A, double *n
parsec_taskpool_t* dplasma_zlansy_New( dplasma_enum_t ntype, dplasma_enum_t uplo, const parsec_tiled_matrix_t *A, double *result);
parsec_taskpool_t* dplasma_zlantr_New( dplasma_enum_t ntype, dplasma_enum_t uplo, dplasma_enum_t diag, const parsec_tiled_matrix_t *A, double *result);
parsec_taskpool_t* dplasma_zlascal_New( dplasma_enum_t type, dplasma_complex64_t alpha, parsec_tiled_matrix_t *A);
parsec_taskpool_t* dplasma_zlaset_New( dplasma_enum_t uplo, dplasma_complex64_t alpha, dplasma_complex64_t beta, parsec_tiled_matrix_t *A);
parsec_taskpool_t* dplasma_zlaset_New( dplasma_enum_t uplo, dplasma_complex64_t *params, parsec_tiled_matrix_t *A);
parsec_taskpool_t* dplasma_zlaswp_New( parsec_tiled_matrix_t *A, const parsec_tiled_matrix_t *IPIV, int inc);
parsec_taskpool_t* dplasma_zplghe_New( double bump, dplasma_enum_t uplo, parsec_tiled_matrix_t *A, unsigned long long int seed);
parsec_taskpool_t* dplasma_zplgsy_New( dplasma_complex64_t bump, dplasma_enum_t uplo, parsec_tiled_matrix_t *A, unsigned long long int seed);
parsec_taskpool_t* dplasma_zplrnt_New( int diagdom, parsec_tiled_matrix_t *A, unsigned long long int seed);
parsec_taskpool_t* dplasma_zplghe_New( dplasma_enum_t uplo, parsec_tiled_matrix_t *A, void *params);
parsec_taskpool_t* dplasma_zplgsy_New( dplasma_enum_t uplo, parsec_tiled_matrix_t *A, void *params);
parsec_taskpool_t* dplasma_zplrnt_New( parsec_tiled_matrix_t *A, void *params);

/* Sub-kernels to recursive DAGs */
parsec_taskpool_t* dplasma_zgeqrfr_geqrt_New(parsec_tiled_matrix_t *A, parsec_tiled_matrix_t *T, void *work);
Expand Down
5 changes: 1 addition & 4 deletions src/zlascal_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,7 @@ dplasma_zlascal_New( dplasma_enum_t uplo,
dplasma_complex64_t alpha,
parsec_tiled_matrix_t *A )
{
dplasma_complex64_t *a = (dplasma_complex64_t*)malloc(sizeof(dplasma_complex64_t));
*a = alpha;

return parsec_apply_New( uplo, A, dplasma_zlascal_operator, (void*)a );
return parsec_apply_New( uplo, A, dplasma_zlascal_operator, (void*)&alpha );
}

/**
Expand Down
12 changes: 4 additions & 8 deletions src/zlaset_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,9 @@ dplasma_zlaset_operator( parsec_execution_stream_t *es,
******************************************************************************/
parsec_taskpool_t*
dplasma_zlaset_New( dplasma_enum_t uplo,
dplasma_complex64_t alpha,
dplasma_complex64_t beta,
dplasma_complex64_t *params,
parsec_tiled_matrix_t *A )
{
dplasma_complex64_t *params = (dplasma_complex64_t*)malloc(2 * sizeof(dplasma_complex64_t));

params[0] = alpha;
params[1] = beta;

return parsec_apply_New( uplo, A, dplasma_zlaset_operator, params );
}

Expand Down Expand Up @@ -193,7 +187,9 @@ dplasma_zlaset( parsec_context_t *parsec,
return -1;
}

parsec_zlaset = dplasma_zlaset_New(uplo, alpha, beta, A);
dplasma_complex64_t params[2] = {alpha, beta};

parsec_zlaset = dplasma_zlaset_New(uplo, params, A);

if ( parsec_zlaset != NULL ) {
parsec_context_add_taskpool(parsec, (parsec_taskpool_t*)parsec_zlaset);
Expand Down
4 changes: 1 addition & 3 deletions src/zlatms_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ dplasma_zlatms( parsec_context_t *parsec,
/* Init the diagonal of A */
{
parsec_taskpool_t *tp;
double *condptr = malloc(sizeof( double ));
*condptr = cond;
tp = parsec_apply_New( dplasmaUpperLower, A, dplasma_zlatms_operator, condptr );
tp = parsec_apply_New( dplasmaUpperLower, A, dplasma_zlatms_operator, (void *)&cond );
if ( tp != NULL ) {
parsec_context_add_taskpool(parsec, tp);
parsec_context_start( parsec );
Expand Down
13 changes: 5 additions & 8 deletions src/zplghe_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,10 @@ dplasma_zplghe_operator( parsec_execution_stream_t *es,
*
******************************************************************************/
parsec_taskpool_t*
dplasma_zplghe_New( double bump, dplasma_enum_t uplo,
dplasma_zplghe_New( dplasma_enum_t uplo,
parsec_tiled_matrix_t *A,
unsigned long long int seed)
void *params)
{
zplghe_args_t *params = (zplghe_args_t*)malloc(sizeof(zplghe_args_t));

params->bump = bump;
params->seed = seed;

return parsec_apply_New( uplo, A, dplasma_zplghe_operator, params );
}

Expand Down Expand Up @@ -191,7 +186,9 @@ dplasma_zplghe( parsec_context_t *parsec,
return -3;
}

parsec_zplghe = dplasma_zplghe_New( bump, uplo, A, seed );
zplghe_args_t params = {.bump = bump, .seed = seed};

parsec_zplghe = dplasma_zplghe_New( uplo, A, (void *)&params );

if ( parsec_zplghe != NULL ) {
parsec_context_add_taskpool(parsec, (parsec_taskpool_t*)parsec_zplghe);
Expand Down
13 changes: 5 additions & 8 deletions src/zplgsy_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,10 @@ dplasma_zplgsy_operator( parsec_execution_stream_t *es,
*
******************************************************************************/
parsec_taskpool_t*
dplasma_zplgsy_New( dplasma_complex64_t bump, dplasma_enum_t uplo,
dplasma_zplgsy_New( dplasma_enum_t uplo,
parsec_tiled_matrix_t *A,
unsigned long long int seed)
void *params)
{
zplgsy_args_t *params = (zplgsy_args_t*)malloc(sizeof(zplgsy_args_t));

params->bump = bump;
params->seed = seed;

return parsec_apply_New( uplo, A, dplasma_zplgsy_operator, params );
}

Expand Down Expand Up @@ -195,7 +190,9 @@ dplasma_zplgsy( parsec_context_t *parsec,
return -3;
}

parsec_zplgsy = dplasma_zplgsy_New( bump, uplo, A, seed );
zplgsy_args_t params = {.bump = bump, .seed = seed};

parsec_zplgsy = dplasma_zplgsy_New( uplo, A, (void *)&params );

if ( parsec_zplgsy != NULL ) {
parsec_context_add_taskpool(parsec, (parsec_taskpool_t*)parsec_zplgsy);
Expand Down
15 changes: 5 additions & 10 deletions src/zplrnt_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,10 @@ dplasma_zplrnt_operator( parsec_execution_stream_t *es,
*
******************************************************************************/
parsec_taskpool_t*
dplasma_zplrnt_New( int diagdom,
parsec_tiled_matrix_t *A,
unsigned long long int seed)
dplasma_zplrnt_New( parsec_tiled_matrix_t *A,
void *params)
{
zplrnt_args_t *params = (zplrnt_args_t*)malloc(sizeof(zplrnt_args_t));

params->diagdom = diagdom;
params->seed = seed;

return parsec_apply_New( dplasmaUpperLower, A, dplasma_zplrnt_operator, params );
return parsec_apply_New( dplasmaUpperLower, A, dplasma_zplrnt_operator, (void *)params );
}

/**
Expand Down Expand Up @@ -193,8 +187,9 @@ dplasma_zplrnt( parsec_context_t *parsec,
unsigned long long int seed)
{
parsec_taskpool_t *parsec_zplrnt = NULL;
zplrnt_args_t params = {.diagdom = diagdom, .seed = seed};

parsec_zplrnt = dplasma_zplrnt_New(diagdom, A, seed);
parsec_zplrnt = dplasma_zplrnt_New(A, (void *)&params);

parsec_context_add_taskpool(parsec, (parsec_taskpool_t*)parsec_zplrnt);
dplasma_wait_until_completion(parsec);
Expand Down
10 changes: 5 additions & 5 deletions src/zpltmg_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ dplasma_zpltmg_generic( parsec_context_t *parsec,
unsigned long long int seed)
{
parsec_taskpool_t *parsec_zpltmg = NULL;
zpltmg_args_t *params = (zpltmg_args_t*)malloc(sizeof(zpltmg_args_t));
zpltmg_args_t params;

params->mtxtype = mtxtype;
params->seed = seed;
params->W = W;
params.mtxtype = mtxtype;
params.seed = seed;
params.W = W;

parsec_zpltmg = parsec_apply_New( dplasmaUpperLower, A, dplasma_zpltmg_generic_operator, params );
parsec_zpltmg = parsec_apply_New( dplasmaUpperLower, A, dplasma_zpltmg_generic_operator, (void *)&params );
if ( parsec_zpltmg != NULL )
{
parsec_context_add_taskpool(parsec, (parsec_taskpool_t*)parsec_zpltmg);
Expand Down

0 comments on commit 1314a0e

Please sign in to comment.