Mentions légales du service

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

Merge branch 'norm_std_version' into 'master'

Add standard api to the norm testings

See merge request !277
parents c7a533a4 be8d9732
No related branches found
No related tags found
1 merge request!277Add standard api to the norm testings
......@@ -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 );
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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 );
......
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