diff --git a/testing/testing_zlange.c b/testing/testing_zlange.c index 7b5f2810d94697c6be6fe908e508eefe940576b8..e4a9195e0a3e625eee9a8ca70f222baf9f1facbd 100644 --- a/testing/testing_zlange.c +++ b/testing/testing_zlange.c @@ -2,7 +2,7 @@ * * @file testing_zlange.c * - * @copyright 2019-2021 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * @copyright 2019-2022 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, * Univ. Bordeaux. All rights reserved. * *** @@ -13,7 +13,8 @@ * @author Lucas Barros de Assis * @author Florent Pruvost * @author Mathieu Faverge - * @date 2020-11-19 + * @author Alycia Lisito + * @date 2022-02-07 * @precisions normal z -> c d s * */ @@ -107,6 +108,48 @@ testing_zlange_desc( run_arg_list_t *args, int check ) return hres; } +int +testing_zlange_std( run_arg_list_t *args, int check ) +{ + testdata_t test_data = { .args = args }; + int hres = 0; + + /* Read arguments */ + int nb = run_arg_get_int( args, "nb", 320 ); + cham_normtype_t norm_type = run_arg_get_ntype( args, "norm", ChamMaxNorm ); + 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() ); + + /* Descriptors */ + CHAMELEON_Complex64_t *A; + + CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); + + /* Creates the matrix */ + A = malloc( LDA*N*sizeof(CHAMELEON_Complex64_t) ); + + /* Fills the matrix with random values */ + CHAMELEON_zplrnt( M, N, A, LDA, seedA ); + + /* Calculates the norm */ + testing_start( &test_data ); + CHAMELEON_zlange( norm_type, M, N, A, LDA ); + test_data.hres = hres; + testing_stop( &test_data, flops_zlange( norm_type, M, N ) ); + + /* Checks the solution */ + if ( check ) { + // hres = check_znorm( args, ChamGeneral, norm_type, ChamUpperLower, + // ChamNonUnit, norm, descA ); + } + + free( A ); + + return hres; +} + testing_t test_zlange; const char *zlange_params[] = { "mtxfmt", "nb", "norm", "m", "n", "lda", "seedA", NULL }; const char *zlange_output[] = { NULL }; @@ -125,7 +168,7 @@ testing_zlange_init( void ) test_zlange.output = zlange_output; test_zlange.outchk = zlange_outchk; test_zlange.fptr_desc = testing_zlange_desc; - test_zlange.fptr_std = NULL; + test_zlange.fptr_std = testing_zlange_std; test_zlange.next = NULL; testing_register( &test_zlange ); diff --git a/testing/testing_zlanhe.c b/testing/testing_zlanhe.c index 371afc260837a8594a62cb9c00f86dc29d41519b..0af08b67b93ae8fb4fc73a96d3c2c1b4dfc18272 100644 --- a/testing/testing_zlanhe.c +++ b/testing/testing_zlanhe.c @@ -2,7 +2,7 @@ * * @file testing_zlanhe.c * - * @copyright 2019-2021 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * @copyright 2019-2022 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, * Univ. Bordeaux. All rights reserved. * *** @@ -12,7 +12,8 @@ * @version 1.1.0 * @author Lucas Barros de Assis * @author Mathieu Faverge - * @date 2020-11-19 + * @author Alycia Lisito + * @date 2022-02-07 * @precisions normal z -> c * */ @@ -106,6 +107,50 @@ testing_zlanhe_desc( run_arg_list_t *args, int check ) return hres; } +int +testing_zlanhe_std( run_arg_list_t *args, int check ) +{ + testdata_t test_data = { .args = args }; + int hres = 0; + + /* Read arguments */ + int nb = run_arg_get_int( args, "nb", 320 ); + cham_normtype_t norm_type = run_arg_get_ntype( args, "norm", ChamMaxNorm ); + 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() ); + double bump = testing_dalea(); + + /* Descriptors */ + CHAMELEON_Complex64_t *A; + + bump = run_arg_get_complex64( args, "bump", bump ); + + CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); + + /* Creates the matrix */ + A = malloc( LDA*N*sizeof(CHAMELEON_Complex64_t) ); + + /* Fills the matrix with random values */ + CHAMELEON_zplghe( bump, uplo, N, A, LDA, seedA ); + + /* Calculates the norm */ + testing_start( &test_data ); + CHAMELEON_zlanhe( norm_type, uplo, N, A, LDA ); + test_data.hres = hres; + testing_stop( &test_data, flops_zlanhe( norm_type, N ) ); + + /* Checks the solution */ + if ( check ) { + // hres = check_znorm( args, ChamHermitian, norm_type, uplo, ChamNonUnit, norm, descA ); + } + + free( A ); + + return hres; +} + testing_t test_zlanhe; const char *zlanhe_params[] = { "mtxfmt", "nb", "norm", "uplo", "n", "lda", "seedA", "bump", NULL }; const char *zlanhe_output[] = { NULL }; @@ -124,7 +169,7 @@ testing_zlanhe_init( void ) test_zlanhe.output = zlanhe_output; test_zlanhe.outchk = zlanhe_outchk; test_zlanhe.fptr_desc = testing_zlanhe_desc; - test_zlanhe.fptr_std = NULL; + test_zlanhe.fptr_std = testing_zlanhe_std; test_zlanhe.next = NULL; testing_register( &test_zlanhe ); diff --git a/testing/testing_zlansy.c b/testing/testing_zlansy.c index 3d9aa0593f138c40a6802024d51fdffc20270520..03f6255e0af81b199a0ce9aa7a7c58de52d5cbd8 100644 --- a/testing/testing_zlansy.c +++ b/testing/testing_zlansy.c @@ -2,7 +2,7 @@ * * @file testing_zlansy.c * - * @copyright 2019-2021 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * @copyright 2019-2022 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, * Univ. Bordeaux. All rights reserved. * *** @@ -12,7 +12,8 @@ * @version 1.1.0 * @author Lucas Barros de Assis * @author Mathieu Faverge - * @date 2020-11-19 + * @author Alycia Lisito + * @date 2022-02-07 * @precisions normal z -> c d s * */ @@ -106,6 +107,50 @@ testing_zlansy_desc( run_arg_list_t *args, int check ) return hres; } +int +testing_zlansy_std( run_arg_list_t *args, int check ) +{ + testdata_t test_data = { .args = args }; + int hres = 0; + + /* Read arguments */ + int nb = run_arg_get_int( args, "nb", 320 ); + cham_normtype_t norm_type = run_arg_get_ntype( args, "norm", ChamMaxNorm ); + 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() ); + CHAMELEON_Complex64_t bump = testing_zalea(); + + /* Descriptors */ + CHAMELEON_Complex64_t *A; + + bump = run_arg_get_complex64( args, "bump", bump ); + + CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); + + /* Creates the matrix */ + A = malloc( LDA*N*sizeof(CHAMELEON_Complex64_t) ); + + /* Fills the matrix with random values */ + CHAMELEON_zplgsy( bump, uplo, N, A, LDA, seedA ); + + /* Calculates the norm */ + testing_start( &test_data ); + CHAMELEON_zlansy( norm_type, uplo, N, A, LDA ); + test_data.hres = hres; + testing_stop( &test_data, flops_zlansy( norm_type, N ) ); + + /* Checks the solution */ + if ( check ) { + // hres = check_znorm( args, ChamSymmetric, norm_type, uplo, ChamNonUnit, norm, descA ); + } + + free( A ); + + return hres; +} + testing_t test_zlansy; const char *zlansy_params[] = { "mtxfmt", "nb", "norm", "uplo", "n", "lda", "seedA", "bump", NULL }; const char *zlansy_output[] = { NULL }; @@ -124,7 +169,7 @@ testing_zlansy_init( void ) test_zlansy.output = zlansy_output; test_zlansy.outchk = zlansy_outchk; test_zlansy.fptr_desc = testing_zlansy_desc; - test_zlansy.fptr_std = NULL; + test_zlansy.fptr_std = testing_zlansy_std; test_zlansy.next = NULL; testing_register( &test_zlansy ); diff --git a/testing/testing_zlantr.c b/testing/testing_zlantr.c index 251a73cb308113862f3a00cf84136663ceb8aaa7..2d8d297627a7f539c26d36c8b7cecd69dc63ed68 100644 --- a/testing/testing_zlantr.c +++ b/testing/testing_zlantr.c @@ -2,7 +2,7 @@ * * @file testing_zlantr.c * - * @copyright 2019-2021 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * @copyright 2019-2022 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, * Univ. Bordeaux. All rights reserved. * *** @@ -12,7 +12,8 @@ * @version 1.1.0 * @author Lucas Barros de Assis * @author Mathieu Faverge - * @date 2020-11-19 + * @author Alycia Lisito + * @date 2022-02-07 * @precisions normal z -> c d s * */ @@ -128,6 +129,49 @@ testing_zlantr_desc( run_arg_list_t *args, int check ) return hres; } +int +testing_zlantr_std( run_arg_list_t *args, int check ) +{ + testdata_t test_data = { .args = args }; + int hres = 0; + + /* Read arguments */ + int nb = run_arg_get_int( args, "nb", 320 ); + cham_normtype_t norm_type = run_arg_get_ntype( args, "norm", ChamMaxNorm ); + cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); + cham_diag_t diag = run_arg_get_diag( args, "diag", ChamNonUnit ); + 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() ); + + /* Descriptors */ + CHAMELEON_Complex64_t *A; + + CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb ); + + /* Creates the matrix */ + A = malloc( LDA*N*sizeof(CHAMELEON_Complex64_t) ); + + /* Fills the matrix with random values */ + CHAMELEON_zplrnt( M, N, A, LDA, seedA ); + + /* Calculates the norm */ + testing_start( &test_data ); + CHAMELEON_zlantr( norm_type, uplo, diag, M, N, A, LDA ); + test_data.hres = hres; + testing_stop( &test_data, flops_zlantr( norm_type, uplo, M, N ) ); + + /* Checks the solution */ + if ( check ) { + // hres = check_znorm( args, ChamTriangular, norm_type, uplo, diag, norm, descA ); + } + + free( A ); + + return hres; +} + testing_t test_zlantr; const char *zlantr_params[] = { "mtxfmt", "nb", "norm", "uplo", "diag", "m", "n", "lda", "seedA", NULL }; @@ -147,7 +191,7 @@ testing_zlantr_init( void ) test_zlantr.output = zlantr_output; test_zlantr.outchk = zlantr_outchk; test_zlantr.fptr_desc = testing_zlantr_desc; - test_zlantr.fptr_std = NULL; + test_zlantr.fptr_std = testing_zlantr_std; test_zlantr.next = NULL; testing_register( &test_zlantr );