Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 8aa15654 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Fix coverity issue on risky function by factorizing it to a single place

parent 2974e009
No related branches found
No related tags found
1 merge request!338Fix a bunch of warning reported by coverity on the recents MR
Showing
with 57 additions and 57 deletions
......@@ -52,7 +52,7 @@ testing_zcesca_desc( run_arg_list_t *args, int check )
int N = run_arg_get_int( args, "N", 1000 );
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......@@ -106,7 +106,7 @@ testing_zcesca_std( run_arg_list_t *args, int check )
int N = run_arg_get_int( args, "N", 1000 );
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
/* Descriptors */
CHAMELEON_Complex64_t *A;
......
......@@ -55,8 +55,8 @@ testing_zgeadd_desc( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? M : N ) );
int LDB = run_arg_get_int( args, "LDB", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int Q = parameters_compute_q( P );
CHAMELEON_Complex64_t alpha = testing_zalea();
CHAMELEON_Complex64_t beta = testing_zalea();
......@@ -132,8 +132,8 @@ testing_zgeadd_std( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? M : N ) );
int LDB = run_arg_get_int( args, "LDB", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
CHAMELEON_Complex64_t alpha = testing_zalea();
CHAMELEON_Complex64_t beta = testing_zalea();
......
......@@ -38,7 +38,7 @@ testing_zgelqf_desc( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int RH = run_arg_get_int( args, "qra", 4 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......@@ -114,7 +114,7 @@ testing_zgelqf_std( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int RH = run_arg_get_int( args, "qra", 4 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
int K = chameleon_min( M, N );
......
......@@ -42,7 +42,7 @@ testing_zgelqf_hqr_desc( run_arg_list_t *args, int check )
int llvl = run_arg_get_int( args, "llvl", -1 );
int hlvl = run_arg_get_int( args, "hlvl", -1 );
int domino = run_arg_get_int( args, "domino", -1 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......@@ -129,7 +129,7 @@ testing_zgelqf_hqr_std( run_arg_list_t *args, int check )
int llvl = run_arg_get_int( args, "llvl", -1 );
int hlvl = run_arg_get_int( args, "hlvl", -1 );
int domino = run_arg_get_int( args, "domino", -1 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
int K = chameleon_min( M, N );
......
......@@ -48,8 +48,8 @@ testing_zgelqs_desc( run_arg_list_t *args, int check )
int LDA = run_arg_get_int( args, "LDA", M );
int LDB = run_arg_get_int( args, "LDB", M );
int RH = run_arg_get_int( args, "qra", 0 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......
......@@ -55,8 +55,8 @@ testing_zgels_desc( run_arg_list_t *args, int check )
int LDA = run_arg_get_int( args, "LDA", M );
int LDB = run_arg_get_int( args, "LDB", maxMN );
int RH = run_arg_get_int( args, "qra", 4 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......@@ -158,8 +158,8 @@ testing_zgels_std( run_arg_list_t *args, int check )
int LDA = run_arg_get_int( args, "LDA", M );
int LDB = run_arg_get_int( args, "LDB", maxMN );
int RH = run_arg_get_int( args, "qra", 4 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......
......@@ -59,8 +59,8 @@ testing_zgels_hqr_desc( run_arg_list_t *args, int check )
int llvl = run_arg_get_int( args, "llvl", -1 );
int hlvl = run_arg_get_int( args, "hlvl", -1 );
int domino = run_arg_get_int( args, "domino", -1 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......@@ -170,8 +170,8 @@ testing_zgels_hqr_std( run_arg_list_t *args, int check )
int llvl = run_arg_get_int( args, "llvl", -1 );
int hlvl = run_arg_get_int( args, "hlvl", -1 );
int domino = run_arg_get_int( args, "domino", -1 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......
......@@ -49,9 +49,9 @@ testing_zgemm_desc( run_arg_list_t *args, int check )
int LDC = run_arg_get_int( args, "LDC", M );
CHAMELEON_Complex64_t alpha = testing_zalea();
CHAMELEON_Complex64_t beta = testing_zalea();
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedC = run_arg_get_int( args, "seedC", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int seedC = run_arg_get_int( args, "seedC", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......@@ -156,9 +156,9 @@ testing_zgemm_std( run_arg_list_t *args, int check )
int LDC = run_arg_get_int( args, "LDC", M );
CHAMELEON_Complex64_t alpha = testing_zalea();
CHAMELEON_Complex64_t beta = testing_zalea();
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedC = run_arg_get_int( args, "seedC", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int seedC = run_arg_get_int( args, "seedC", testing_ialea() );
/* Descriptors */
int Am, An, Bm, Bn;
......
......@@ -52,7 +52,7 @@ testing_zgenm2_desc( run_arg_list_t *args, int check )
int N = run_arg_get_int( args, "N", 1000 );
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
int minMN = chameleon_min( M, N );
double cond = run_arg_get_double( args, "cond", 1.e16 );
......@@ -136,7 +136,7 @@ testing_zgenm2_std( run_arg_list_t *args, int check )
int N = run_arg_get_int( args, "N", 1000 );
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int minMN = chameleon_min( M, N );
double cond = run_arg_get_double( args, "cond", 1.e16 );
int mode = run_arg_get_int( args, "mode", 4 );
......
......@@ -44,7 +44,7 @@ testing_zgepdf_qdwh_desc( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int LDB = run_arg_get_int( args, "LDB", N );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
double cond = run_arg_get_double( args, "cond", 1.e16 );
int mode = run_arg_get_int( args, "mode", 4 );
......@@ -137,7 +137,7 @@ testing_zgepdf_qdwh_std( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int LDB = run_arg_get_int( args, "LDB", N );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
double cond = run_arg_get_double( args, "cond", 1.e16 );
int mode = run_arg_get_int( args, "mode", 4 );
int runtime;
......
......@@ -51,7 +51,7 @@ testing_zgepdf_qr_desc( run_arg_list_t *args, int check )
int N = run_arg_get_int( args, "N", 1000 );
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......
......@@ -38,7 +38,7 @@ testing_zgeqrf_desc( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int RH = run_arg_get_int( args, "qra", 4 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......@@ -114,7 +114,7 @@ testing_zgeqrf_std( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int RH = run_arg_get_int( args, "qra", 4 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
int K = chameleon_min( M, N );
......
......@@ -42,7 +42,7 @@ testing_zgeqrf_hqr_desc( run_arg_list_t *args, int check )
int llvl = run_arg_get_int( args, "llvl", -1 );
int hlvl = run_arg_get_int( args, "hlvl", -1 );
int domino = run_arg_get_int( args, "domino", -1 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......@@ -129,7 +129,7 @@ testing_zgeqrf_hqr_std( run_arg_list_t *args, int check )
int llvl = run_arg_get_int( args, "llvl", -1 );
int hlvl = run_arg_get_int( args, "hlvl", -1 );
int domino = run_arg_get_int( args, "domino", -1 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
int K = chameleon_min( M, N );
......
......@@ -41,8 +41,8 @@ testing_zgeqrs_desc( run_arg_list_t *args, int check )
int LDA = run_arg_get_int( args, "LDA", M );
int LDB = run_arg_get_int( args, "LDB", M );
int RH = run_arg_get_int( args, "qra", 0 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......
......@@ -44,8 +44,8 @@ testing_zgesv_nopiv_desc( run_arg_list_t *args, int check )
int NRHS = run_arg_get_int( args, "NRHS", 1 );
int LDA = run_arg_get_int( args, "LDA", N );
int LDB = run_arg_get_int( args, "LDB", N );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
double bump = run_arg_get_double( args, "bump", (double)N );
int Q = parameters_compute_q( P );
......@@ -118,8 +118,8 @@ testing_zgesv_nopiv_std( run_arg_list_t *args, int check )
int NRHS = run_arg_get_int( args, "NRHS", 1 );
int LDA = run_arg_get_int( args, "LDA", N );
int LDB = run_arg_get_int( args, "LDB", N );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
double bump = run_arg_get_double( args, "bump", (double)N );
/* Descriptors */
......
......@@ -71,7 +71,7 @@ testing_zgesvd_desc( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int K = chameleon_min( M, N );
int LDA = run_arg_get_int( args, "LDA", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
double cond = run_arg_get_double( args, "cond", 1.e16 );
int mode = run_arg_get_int( args, "mode", 4 );
int Q = parameters_compute_q( P );
......@@ -183,7 +183,7 @@ testing_zgesvd_std( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int K = chameleon_min( M, N );
int LDA = run_arg_get_int( args, "LDA", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
double cond = run_arg_get_double( args, "cond", 1.e16 );
int mode = run_arg_get_int( args, "mode", 4 );
cham_job_t jobu = run_arg_get_job( args, "jobu", ChamNoVec );
......
......@@ -36,7 +36,7 @@ testing_zgetrf_nopiv_desc( run_arg_list_t *args, int check )
int N = run_arg_get_int( args, "N", 1000 );
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
double bump = run_arg_get_double( args, "bump", (double)N );
int Q = parameters_compute_q( P );
......@@ -92,7 +92,7 @@ testing_zgetrf_nopiv_std( run_arg_list_t *args, int check )
int N = run_arg_get_int( args, "N", 1000 );
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
double bump = run_arg_get_double( args, "bump", (double)N );
/* Descriptors */
......
......@@ -38,8 +38,8 @@ testing_zgetrs_nopiv_desc( run_arg_list_t *args, int check )
int NRHS = run_arg_get_int( args, "NRHS", 1 );
int LDA = run_arg_get_int( args, "LDA", N );
int LDB = run_arg_get_int( args, "LDB", N );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
double bump = run_arg_get_double( args, "bump", (double)N );
int Q = parameters_compute_q( P );
......@@ -110,8 +110,8 @@ testing_zgetrs_nopiv_std( run_arg_list_t *args, int check )
int NRHS = run_arg_get_int( args, "NRHS", 1 );
int LDA = run_arg_get_int( args, "LDA", N );
int LDB = run_arg_get_int( args, "LDB", N );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
double bump = run_arg_get_double( args, "bump", (double)N );
/* Descriptors */
......
......@@ -51,7 +51,7 @@ testing_zgram_desc( run_arg_list_t *args, int check )
int P = parameters_getvalue_int( "P" );
int N = run_arg_get_int( args, "N", 1000 );
int LDA = run_arg_get_int( args, "LDA", N );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......@@ -105,7 +105,7 @@ testing_zgram_std( run_arg_list_t *args, int check )
cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper );
int N = run_arg_get_int( args, "N", 1000 );
int LDA = run_arg_get_int( args, "LDA", N );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
/* Descriptors */
CHAMELEON_Complex64_t *A;
......
......@@ -48,9 +48,9 @@ testing_zhemm_desc( run_arg_list_t *args, int check )
int LDC = run_arg_get_int( args, "LDC", M );
CHAMELEON_Complex64_t alpha = testing_zalea();
CHAMELEON_Complex64_t beta = testing_zalea();
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedC = run_arg_get_int( args, "seedC", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int seedC = run_arg_get_int( args, "seedC", testing_ialea() );
double bump = testing_dalea();
int Q = parameters_compute_q( P );
......@@ -138,9 +138,9 @@ testing_zhemm_std( run_arg_list_t *args, int check )
int LDC = run_arg_get_int( args, "LDC", M );
CHAMELEON_Complex64_t alpha = testing_zalea();
CHAMELEON_Complex64_t beta = testing_zalea();
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedC = run_arg_get_int( args, "seedC", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int seedC = run_arg_get_int( args, "seedC", testing_ialea() );
double bump = testing_dalea();
/* Descriptors */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment