MAGMA  1.2.0
MatrixAlgebraonGPUandMulticoreArchitectures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
time_zpotrf_tile.c File Reference
#include "./timing.c"
Include dependency graph for time_zpotrf_tile.c:

Go to the source code of this file.

Macros

#define _TYPE   PLASMA_Complex64_t
#define _PREC   double
#define _LAMCH   LAPACKE_dlamch_work
#define _NAME   "PLASMA_zpotrf_Tile"
#define _FMULS   (n * (1.0 / 6.0 * n + 0.5) * n)
#define _FADDS   (n * (1.0 / 6.0 * n ) * n)

Functions

static int RunTest (int *iparam, double *dparam, real_Double_t *t_)

Macro Definition Documentation

#define _FADDS   (n * (1.0 / 6.0 * n ) * n)

Definition at line 13 of file time_zpotrf_tile.c.

#define _FMULS   (n * (1.0 / 6.0 * n + 0.5) * n)

Definition at line 12 of file time_zpotrf_tile.c.

#define _LAMCH   LAPACKE_dlamch_work

Definition at line 8 of file time_zpotrf_tile.c.

#define _NAME   "PLASMA_zpotrf_Tile"

Definition at line 10 of file time_zpotrf_tile.c.

#define _PREC   double

Definition at line 7 of file time_zpotrf_tile.c.

#define _TYPE   PLASMA_Complex64_t

normal z -> c d s

Definition at line 6 of file time_zpotrf_tile.c.


Function Documentation

static int RunTest ( int *  iparam,
double *  dparam,
real_Double_t t_ 
)
static

Definition at line 18 of file time_zpotrf_tile.c.

References A, AT, cWtime(), ISEED, MAGMA_CUDA, MAGMA_Desc_Create(), MAGMA_Desc_Destroy(), MAGMA_Disable(), MAGMA_Enable(), MAGMA_PROFILING_MODE, MAGMA_zplghe_Tile(), MAGMA_zpotrf_Tile(), MAGMA_zpotrs_Tile(), MAGMA_zTile_to_Lapack(), morse_schedprofile_display(), morse_zdisplay_allprofile(), morse_zlocality_allrestore(), morse_zlocality_allrestrict(), TIMING_ANORM, TIMING_BNORM, TIMING_CHECK, TIMING_ESTIMATED_PEAK, TIMING_N, TIMING_NB, TIMING_NO_CPU, TIMING_NRHS, TIMING_PEAK, TIMING_PROFILE, TIMING_RES, TIMING_XNORM, uplo, and zcheck_solution().

{
PLASMA_Complex64_t *A, *AT, *b, *bT, *x;
magma_desc_t *descA = NULL;
magma_desc_t *descB = NULL;
int nb, nt;
int n = iparam[TIMING_N];
int nrhs = iparam[TIMING_NRHS];
int check = iparam[TIMING_CHECK];
int nocpu = iparam[TIMING_NO_CPU];
int lda = n;
int ldb = n;
PLASMA_enum uplo = PlasmaLower;
int peak_profiling = iparam[TIMING_PEAK];
int profiling = iparam[TIMING_PROFILE];
nb = iparam[TIMING_NB];
nt = n / nb + ((n % nb == 0) ? 0 : 1);
/* Allocate Data */
AT = (PLASMA_Complex64_t *)malloc(lda*n*sizeof(PLASMA_Complex64_t));
/* Check if unable to allocate memory */
if ( !AT ){
printf("Out of Memory \n ");
exit(0);
}
/* Initialiaze Data */
MAGMA_Desc_Create(&descA, AT, PlasmaComplexDouble, nb, nb, nb*nb, lda, n, 0, 0, n, n);
MAGMA_zplghe_Tile((double)n, descA, 51 );
/* Save AT in lapack layout for check */
if ( check ) {
A = (PLASMA_Complex64_t *)malloc(lda*n *sizeof(PLASMA_Complex64_t));
MAGMA_zTile_to_Lapack( descA, (void*)A, n);
}
if ( profiling | peak_profiling )
if (nocpu)
/* PLASMA ZPOSV */
/* if (iparam[TIMING_BOUND]) */
/* starpu_bound_start(iparam[TIMING_BOUNDDEPS],iparam[TIMING_BOUNDDEPSPRIO]); */
t = -cWtime();
t += cWtime();
/* if (iparam[TIMING_BOUND]) */
/* starpu_bound_stop(); */
*t_ = t;
if (nocpu)
if ( profiling | peak_profiling )
/* Check the solution */
if ( check )
{
b = (PLASMA_Complex64_t *)malloc(ldb*nrhs*sizeof(PLASMA_Complex64_t));
bT = (PLASMA_Complex64_t *)malloc(ldb*nrhs*sizeof(PLASMA_Complex64_t));
x = (PLASMA_Complex64_t *)malloc(ldb*nrhs*sizeof(PLASMA_Complex64_t));
LAPACKE_zlarnv_work(1, ISEED, ldb*nrhs, bT);
MAGMA_Desc_Create(&descB, bT, PlasmaComplexDouble, nb, nb, nb*nb, ldb, nrhs, 0, 0, n, nrhs);
MAGMA_zTile_to_Lapack(descB, (void*)b, n);
MAGMA_zpotrs_Tile( uplo, descA, descB);
MAGMA_zTile_to_Lapack(descB, (void*)x, n);
dparam[TIMING_RES] = zcheck_solution(n, n, nrhs, A, lda, b, x, ldb,
&(dparam[TIMING_ANORM]), &(dparam[TIMING_BNORM]),
&(dparam[TIMING_XNORM]));
free( A );
free( b );
free( bT );
free( x );
}
free(AT);
if (peak_profiling) {
real_Double_t peak = 0;
/*estimate_zgemm_sustained_peak(&peak);*/
dparam[TIMING_ESTIMATED_PEAK] = (double)peak;
}
if (profiling)
{
/* Profiling of the scheduler */
/* Profile of each kernel */
}
return 0;
}

Here is the call graph for this function: