Mentions légales du service

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

testing: add standard api to poinv

parent 82962caf
No related branches found
No related tags found
1 merge request!276Add standard api to the cholesky testings
......@@ -14,7 +14,7 @@
* @author Florent Pruvost
* @author Mathieu Faverge
* @author Alycia Lisito
* @date 2022-02-02
* @date 2022-02-07
* @precisions normal z -> c d s
*
*/
......@@ -87,6 +87,51 @@ testing_zpoinv_desc( run_arg_list_t *args, int check )
return hres;
}
int
testing_zpoinv_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_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() );
/* Descriptors */
CHAMELEON_Complex64_t *A;
CHAMELEON_Set( CHAMELEON_TILE_SIZE, nb );
/* Create the matrices */
A = malloc( LDA*N*sizeof(CHAMELEON_Complex64_t) );
/* Initialise the matrix with the random values */
CHAMELEON_zplghe( (double)N, uplo, N, A, LDA, seedA );
/* Calculates the inversed matrix */
testing_start( &test_data );
hres = CHAMELEON_zpoinv( uplo, N, A, LDA );
test_data.hres = hres;
testing_stop( &test_data, flops_zpoinv( N ) );
/* Check the inverse */
if ( check ) {
CHAMELEON_Complex64_t *A0 = malloc( LDA * N * sizeof(CHAMELEON_Complex64_t) );
CHAMELEON_zplghe( (double)N, uplo, N, A0, LDA, seedA );
// hres += check_ztrtri( args, ChamHermitian, uplo, ChamNonUnit, descA0, descA );
free( A0 );
}
free( A );
return hres;
}
testing_t test_zpoinv;
const char *zpoinv_params[] = { "mtxfmt", "nb", "uplo", "n", "lda", "seedA", NULL };
const char *zpoinv_output[] = { NULL };
......@@ -105,7 +150,7 @@ testing_zpoinv_init( void )
test_zpoinv.output = zpoinv_output;
test_zpoinv.outchk = zpoinv_outchk;
test_zpoinv.fptr_desc = testing_zpoinv_desc;
test_zpoinv.fptr_std = NULL;
test_zpoinv.fptr_std = testing_zpoinv_std;
test_zpoinv.next = NULL;
testing_register( &test_zpoinv );
......
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