Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 05de680f authored by LISITO Alycia's avatar LISITO Alycia
Browse files

testing: add standard api to lansy

parent e78c579f
Branches
Tags
1 merge request!277Add standard api to the norm testings
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* *
* @file testing_zlansy.c * @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. * Univ. Bordeaux. All rights reserved.
* *
*** ***
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
* @version 1.1.0 * @version 1.1.0
* @author Lucas Barros de Assis * @author Lucas Barros de Assis
* @author Mathieu Faverge * @author Mathieu Faverge
* @date 2020-11-19 * @author Alycia Lisito
* @date 2022-02-07
* @precisions normal z -> c d s * @precisions normal z -> c d s
* *
*/ */
...@@ -106,6 +107,50 @@ testing_zlansy_desc( run_arg_list_t *args, int check ) ...@@ -106,6 +107,50 @@ testing_zlansy_desc( run_arg_list_t *args, int check )
return hres; 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; testing_t test_zlansy;
const char *zlansy_params[] = { "mtxfmt", "nb", "norm", "uplo", "n", "lda", "seedA", "bump", NULL }; const char *zlansy_params[] = { "mtxfmt", "nb", "norm", "uplo", "n", "lda", "seedA", "bump", NULL };
const char *zlansy_output[] = { NULL }; const char *zlansy_output[] = { NULL };
...@@ -124,7 +169,7 @@ testing_zlansy_init( void ) ...@@ -124,7 +169,7 @@ testing_zlansy_init( void )
test_zlansy.output = zlansy_output; test_zlansy.output = zlansy_output;
test_zlansy.outchk = zlansy_outchk; test_zlansy.outchk = zlansy_outchk;
test_zlansy.fptr_desc = testing_zlansy_desc; test_zlansy.fptr_desc = testing_zlansy_desc;
test_zlansy.fptr_std = NULL; test_zlansy.fptr_std = testing_zlansy_std;
test_zlansy.next = NULL; test_zlansy.next = NULL;
testing_register( &test_zlansy ); testing_register( &test_zlansy );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment