From 7cd326d18a2d065dfdf91665bf11f044478130ac Mon Sep 17 00:00:00 2001 From: Mathieu Faverge <mathieu.faverge@inria.fr> Date: Tue, 30 Aug 2022 23:27:49 +0200 Subject: [PATCH] codelet_zgemm: coding style --- runtime/parsec/codelets/codelet_zgemm.c | 26 +++++++++++-------------- runtime/quark/codelets/codelet_zgemm.c | 15 +++++++------- runtime/starpu/codelets/codelet_zgemm.c | 8 -------- 3 files changed, 19 insertions(+), 30 deletions(-) diff --git a/runtime/parsec/codelets/codelet_zgemm.c b/runtime/parsec/codelets/codelet_zgemm.c index 5a0938ed9..b831ebd09 100644 --- a/runtime/parsec/codelets/codelet_zgemm.c +++ b/runtime/parsec/codelets/codelet_zgemm.c @@ -23,11 +23,6 @@ #include "chameleon/tasks_z.h" #include "coreblas/coreblas_z.h" -/** - * - * @ingroup INSERT_TASK_Complex64_t - * - */ static inline int CORE_zgemm_parsec( parsec_execution_stream_t *context, parsec_task_t *this_task ) @@ -50,20 +45,21 @@ CORE_zgemm_parsec( parsec_execution_stream_t *context, this_task, &transA, &transB, &m, &n, &k, &alpha, &A, &lda, &B, &ldb, &beta, &C, &ldc ); CORE_zgemm( transA, transB, m, n, k, - alpha, A, lda, - B, ldb, - beta, C, ldc); + alpha, A, lda, + B, ldb, + beta, C, ldc ); (void)context; return PARSEC_HOOK_RETURN_DONE; } -void INSERT_TASK_zgemm( const RUNTIME_option_t *options, - cham_trans_t transA, cham_trans_t transB, - int m, int n, int k, int nb, - CHAMELEON_Complex64_t alpha, const CHAM_desc_t *A, int Am, int An, +void +INSERT_TASK_zgemm( const RUNTIME_option_t *options, + cham_trans_t transA, cham_trans_t transB, + int m, int n, int k, int nb, + CHAMELEON_Complex64_t alpha, const CHAM_desc_t *A, int Am, int An, const CHAM_desc_t *B, int Bm, int Bn, - CHAMELEON_Complex64_t beta, const CHAM_desc_t *C, int Cm, int Cn ) + CHAMELEON_Complex64_t beta, const CHAM_desc_t *C, int Cm, int Cn ) { parsec_taskpool_t* PARSEC_dtd_taskpool = (parsec_taskpool_t *)(options->sequence->schedopt); CHAM_tile_t *tileA = A->get_blktile( A, Am, An ); @@ -71,7 +67,7 @@ void INSERT_TASK_zgemm( const RUNTIME_option_t *options, CHAM_tile_t *tileC = C->get_blktile( C, Cm, Cn ); parsec_dtd_taskpool_insert_task( - PARSEC_dtd_taskpool, CORE_zgemm_parsec, options->priority, "Gemm", + PARSEC_dtd_taskpool, CORE_zgemm_parsec, options->priority, "gemm", sizeof(cham_trans_t), &transA, VALUE, sizeof(cham_trans_t), &transB, VALUE, sizeof(int), &m, VALUE, @@ -95,7 +91,7 @@ INSERT_TASK_zgemm_Astat( const RUNTIME_option_t *options, cham_trans_t transA, cham_trans_t transB, int m, int n, int k, int nb, CHAMELEON_Complex64_t alpha, const CHAM_desc_t *A, int Am, int An, - const CHAM_desc_t *B, int Bm, int Bn, + const CHAM_desc_t *B, int Bm, int Bn, CHAMELEON_Complex64_t beta, const CHAM_desc_t *C, int Cm, int Cn ) { INSERT_TASK_zgemm( options, transA, transB, m, n, k, nb, diff --git a/runtime/quark/codelets/codelet_zgemm.c b/runtime/quark/codelets/codelet_zgemm.c index d854c638a..1eb63bb7b 100644 --- a/runtime/quark/codelets/codelet_zgemm.c +++ b/runtime/quark/codelets/codelet_zgemm.c @@ -46,12 +46,13 @@ void CORE_zgemm_quark(Quark *quark) beta, tileC ); } -void INSERT_TASK_zgemm(const RUNTIME_option_t *options, - cham_trans_t transA, cham_trans_t transB, - int m, int n, int k, int nb, - CHAMELEON_Complex64_t alpha, const CHAM_desc_t *A, int Am, int An, - const CHAM_desc_t *B, int Bm, int Bn, - CHAMELEON_Complex64_t beta, const CHAM_desc_t *C, int Cm, int Cn) +void +INSERT_TASK_zgemm( const RUNTIME_option_t *options, + cham_trans_t transA, cham_trans_t transB, + int m, int n, int k, int nb, + CHAMELEON_Complex64_t alpha, const CHAM_desc_t *A, int Am, int An, + const CHAM_desc_t *B, int Bm, int Bn, + CHAMELEON_Complex64_t beta, const CHAM_desc_t *C, int Cm, int Cn ) { if ( alpha == 0. ) { return INSERT_TASK_zlascal( options, ChamUpperLower, m, n, nb, @@ -81,7 +82,7 @@ INSERT_TASK_zgemm_Astat( const RUNTIME_option_t *options, cham_trans_t transA, cham_trans_t transB, int m, int n, int k, int nb, CHAMELEON_Complex64_t alpha, const CHAM_desc_t *A, int Am, int An, - const CHAM_desc_t *B, int Bm, int Bn, + const CHAM_desc_t *B, int Bm, int Bn, CHAMELEON_Complex64_t beta, const CHAM_desc_t *C, int Cm, int Cn ) { INSERT_TASK_zgemm( options, transA, transB, m, n, k, nb, diff --git a/runtime/starpu/codelets/codelet_zgemm.c b/runtime/starpu/codelets/codelet_zgemm.c index bf72c91c2..9e1574d7a 100644 --- a/runtime/starpu/codelets/codelet_zgemm.c +++ b/runtime/starpu/codelets/codelet_zgemm.c @@ -87,8 +87,6 @@ cl_zgemm_cuda_func( void *descr[], void *cl_arg ) (cuDoubleComplex*)&(clargs->beta), tileC->mat, tileC->ld, handle ); - - return; } #endif /* defined(CHAMELEON_USE_CUDA) */ #endif /* !defined(CHAMELEON_SIMULATION) */ @@ -182,10 +180,7 @@ void INSERT_TASK_zgemm_Astat( const RUNTIME_option_t *options, #if defined(CHAMELEON_CODELETS_HAVE_NAME) STARPU_NAME, cl_name, #endif - 0 ); - - (void)nb; } void INSERT_TASK_zgemm( const RUNTIME_option_t *options, @@ -260,8 +255,5 @@ void INSERT_TASK_zgemm( const RUNTIME_option_t *options, #if defined(CHAMELEON_CODELETS_HAVE_NAME) STARPU_NAME, cl_name, #endif - 0 ); - - (void)nb; } -- GitLab