Mentions légales du service

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

testing: add standard api to lanhe

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