Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 390cf7c8 authored by PRUVOST Florent's avatar PRUVOST Florent Committed by Mathieu Faverge
Browse files

Blas/Lapack API: add lapack routines for Cholesky family functions

parent 83e00175
No related branches found
No related tags found
No related merge requests found
...@@ -21,9 +21,11 @@ ...@@ -21,9 +21,11 @@
#include "testings.h" #include "testings.h"
#include "testing_zcheck.h" #include "testing_zcheck.h"
#include <chameleon/flops.h> #include <chameleon/flops.h>
#if !defined(CHAMELEON_SIMULATION)
#include <coreblas.h>
#if defined(CHAMELEON_TESTINGS_VENDOR) #if defined(CHAMELEON_TESTINGS_VENDOR)
#include <coreblas/lapacke.h> #include <coreblas/lapacke.h>
#include <coreblas.h> #endif
#endif #endif
#if !defined(CHAMELEON_TESTINGS_VENDOR) #if !defined(CHAMELEON_TESTINGS_VENDOR)
...@@ -92,6 +94,7 @@ testing_zpotrf_std( run_arg_list_t *args, int check ) ...@@ -92,6 +94,7 @@ testing_zpotrf_std( run_arg_list_t *args, int check )
int hres = 0; int hres = 0;
/* Read arguments */ /* Read arguments */
int api = parameters_getvalue_int( "api" );
int nb = run_arg_get_int( args, "nb", 320 ); int nb = run_arg_get_int( args, "nb", 320 );
cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper );
int N = run_arg_get_int( args, "N", 1000 ); int N = run_arg_get_int( args, "N", 1000 );
...@@ -117,7 +120,22 @@ testing_zpotrf_std( run_arg_list_t *args, int check ) ...@@ -117,7 +120,22 @@ testing_zpotrf_std( run_arg_list_t *args, int check )
testing_stop( &test_data, flops_zpotrf( N ) ); testing_stop( &test_data, flops_zpotrf( N ) );
#else #else
testing_start( &test_data ); testing_start( &test_data );
hres = CHAMELEON_zpotrf( uplo, N, A, LDA ); switch ( api ) {
case 1:
hres = CHAMELEON_zpotrf( uplo, N, A, LDA );
break;
#if !defined(CHAMELEON_SIMULATION)
case 2:
CHAMELEON_lapacke_zpotrf( CblasColMajor, chameleon_lapack_const(uplo), N, A, LDA );
break;
#endif
default:
if ( CHAMELEON_Comm_rank() == 0 ) {
fprintf( stderr,
"SKIPPED: This function can only be used with the option --api 1 or --api 2.\n" );
}
return -1;
}
test_data.hres = hres; test_data.hres = hres;
testing_stop( &test_data, flops_zpotrf( N ) ); testing_stop( &test_data, flops_zpotrf( N ) );
......
...@@ -23,9 +23,11 @@ ...@@ -23,9 +23,11 @@
#include "testings.h" #include "testings.h"
#include "testing_zcheck.h" #include "testing_zcheck.h"
#include <chameleon/flops.h> #include <chameleon/flops.h>
#if !defined(CHAMELEON_SIMULATION)
#include <coreblas.h>
#if defined(CHAMELEON_TESTINGS_VENDOR) #if defined(CHAMELEON_TESTINGS_VENDOR)
#include <coreblas/lapacke.h> #include <coreblas/lapacke.h>
#include <coreblas.h> #endif
#endif #endif
#if !defined(CHAMELEON_TESTINGS_VENDOR) #if !defined(CHAMELEON_TESTINGS_VENDOR)
...@@ -96,6 +98,7 @@ testing_zpotri_std( run_arg_list_t *args, int check ) ...@@ -96,6 +98,7 @@ testing_zpotri_std( run_arg_list_t *args, int check )
int hres = 0; int hres = 0;
/* Read arguments */ /* Read arguments */
int api = parameters_getvalue_int( "api" );
int nb = run_arg_get_int( args, "nb", 320 ); int nb = run_arg_get_int( args, "nb", 320 );
cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper );
int N = run_arg_get_int( args, "N", 1000 ); int N = run_arg_get_int( args, "N", 1000 );
...@@ -128,7 +131,22 @@ testing_zpotri_std( run_arg_list_t *args, int check ) ...@@ -128,7 +131,22 @@ testing_zpotri_std( run_arg_list_t *args, int check )
testing_stop( &test_data, flops_zpotri( N ) ); testing_stop( &test_data, flops_zpotri( N ) );
#else #else
testing_start( &test_data ); testing_start( &test_data );
hres += CHAMELEON_zpotri( uplo, N, A, LDA ); switch ( api ) {
case 1:
hres += CHAMELEON_zpotri( uplo, N, A, LDA );
break;
#if !defined(CHAMELEON_SIMULATION)
case 2:
CHAMELEON_lapacke_zpotri( CblasColMajor, chameleon_lapack_const(uplo), N, A, LDA );
break;
#endif
default:
if ( CHAMELEON_Comm_rank() == 0 ) {
fprintf( stderr,
"SKIPPED: This function can only be used with the option --api 1 or --api 2.\n" );
}
return -1;
}
test_data.hres = hres; test_data.hres = hres;
testing_stop( &test_data, flops_zpotri( N ) ); testing_stop( &test_data, flops_zpotri( N ) );
......
...@@ -22,9 +22,11 @@ ...@@ -22,9 +22,11 @@
#include "testings.h" #include "testings.h"
#include "testing_zcheck.h" #include "testing_zcheck.h"
#include <chameleon/flops.h> #include <chameleon/flops.h>
#if !defined(CHAMELEON_SIMULATION)
#include <coreblas.h>
#if defined(CHAMELEON_TESTINGS_VENDOR) #if defined(CHAMELEON_TESTINGS_VENDOR)
#include <coreblas/lapacke.h> #include <coreblas/lapacke.h>
#include <coreblas.h> #endif
#endif #endif
#if !defined(CHAMELEON_TESTINGS_VENDOR) #if !defined(CHAMELEON_TESTINGS_VENDOR)
...@@ -108,6 +110,7 @@ testing_zpotrs_std( run_arg_list_t *args, int check ) ...@@ -108,6 +110,7 @@ testing_zpotrs_std( run_arg_list_t *args, int check )
int hres = 0; int hres = 0;
/* Read arguments */ /* Read arguments */
int api = parameters_getvalue_int( "api" );
int nb = run_arg_get_int( args, "nb", 320 ); int nb = run_arg_get_int( args, "nb", 320 );
cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper );
int N = run_arg_get_int( args, "N", 1000 ); int N = run_arg_get_int( args, "N", 1000 );
...@@ -145,7 +148,22 @@ testing_zpotrs_std( run_arg_list_t *args, int check ) ...@@ -145,7 +148,22 @@ testing_zpotrs_std( run_arg_list_t *args, int check )
testing_stop( &test_data, flops_zpotrs( N, NRHS ) ); testing_stop( &test_data, flops_zpotrs( N, NRHS ) );
#else #else
testing_start( &test_data ); testing_start( &test_data );
hres += CHAMELEON_zpotrs( uplo, N, NRHS, A, LDA, X, LDB ); switch ( api ) {
case 1:
hres += CHAMELEON_zpotrs( uplo, N, NRHS, A, LDA, X, LDB );
break;
#if !defined(CHAMELEON_SIMULATION)
case 2:
CHAMELEON_lapacke_zpotrs( CblasColMajor, chameleon_lapack_const(uplo), N, NRHS, A, LDA, X, LDB );
break;
#endif
default:
if ( CHAMELEON_Comm_rank() == 0 ) {
fprintf( stderr,
"SKIPPED: This function can only be used with the option --api 1 or --api 2.\n" );
}
return -1;
}
test_data.hres = hres; test_data.hres = hres;
testing_stop( &test_data, flops_zpotrs( N, NRHS ) ); testing_stop( &test_data, flops_zpotrs( N, NRHS ) );
......
...@@ -21,6 +21,9 @@ ...@@ -21,6 +21,9 @@
#include "testings.h" #include "testings.h"
#include "testing_zcheck.h" #include "testing_zcheck.h"
#include <chameleon/flops.h> #include <chameleon/flops.h>
#if !defined(CHAMELEON_SIMULATION)
#include <coreblas.h>
#endif
int int
testing_ztrtri_desc( run_arg_list_t *args, int check ) testing_ztrtri_desc( run_arg_list_t *args, int check )
...@@ -87,6 +90,7 @@ testing_ztrtri_std( run_arg_list_t *args, int check ) ...@@ -87,6 +90,7 @@ testing_ztrtri_std( run_arg_list_t *args, int check )
int hres = 0; int hres = 0;
/* Read arguments */ /* Read arguments */
int api = parameters_getvalue_int( "api" );
int nb = run_arg_get_int( args, "nb", 320 ); int nb = run_arg_get_int( args, "nb", 320 );
cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper ); cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper );
cham_diag_t diag = run_arg_get_diag( args, "diag", ChamNonUnit ); cham_diag_t diag = run_arg_get_diag( args, "diag", ChamNonUnit );
...@@ -107,7 +111,22 @@ testing_ztrtri_std( run_arg_list_t *args, int check ) ...@@ -107,7 +111,22 @@ testing_ztrtri_std( run_arg_list_t *args, int check )
/* Calculates the inversed matrices */ /* Calculates the inversed matrices */
testing_start( &test_data ); testing_start( &test_data );
hres = CHAMELEON_ztrtri( uplo, diag, N, A, LDA ); switch ( api ) {
case 1:
hres = CHAMELEON_ztrtri( uplo, diag, N, A, LDA );
break;
#if !defined(CHAMELEON_SIMULATION)
case 2:
CHAMELEON_lapacke_ztrtri( CblasColMajor, chameleon_lapack_const(uplo), chameleon_lapack_const(diag), N, A, LDA );
break;
#endif
default:
if ( CHAMELEON_Comm_rank() == 0 ) {
fprintf( stderr,
"SKIPPED: This function can only be used with the option --api 1 or --api 2.\n" );
}
return -1;
}
test_data.hres = hres; test_data.hres = hres;
testing_stop( &test_data, flops_ztrtri( N ) ); testing_stop( &test_data, flops_ztrtri( N ) );
......
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