MAGMA  1.2.0
MatrixAlgebraonGPUandMulticoreArchitectures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
time_zposv.c File Reference
#include "./timing.c"
Include dependency graph for time_zposv.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_zposv"
#define _FMULS   (n * (1.0 / 6.0 * n + nrhs + 0.5) * n)
#define _FADDS   (n * (1.0 / 6.0 * n + nrhs ) * n)

Functions

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

Macro Definition Documentation

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

Definition at line 13 of file time_zposv.c.

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

Definition at line 12 of file time_zposv.c.

#define _LAMCH   LAPACKE_dlamch_work

Definition at line 8 of file time_zposv.c.

#define _NAME   "PLASMA_zposv"

Definition at line 10 of file time_zposv.c.

#define _PREC   double

Definition at line 7 of file time_zposv.c.

#define _TYPE   PLASMA_Complex64_t

normal z -> c d s

Definition at line 6 of file time_zposv.c.


Function Documentation

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

Definition at line 18 of file time_zposv.c.

References A, cWtime(), ISEED, MAGMA_zplghe(), MAGMA_zposv(), TIMING_ANORM, TIMING_BNORM, TIMING_CHECK, TIMING_N, TIMING_NRHS, TIMING_RES, TIMING_XNORM, and zcheck_solution().

{
PLASMA_Complex64_t *A, *Acpy, *b, *x;
int n = iparam[TIMING_N];
int nrhs = iparam[TIMING_NRHS];
int check = iparam[TIMING_CHECK];
int lda = n;
int ldb = n;
/* Allocate Data */
A = (PLASMA_Complex64_t *)malloc(lda*n* sizeof(PLASMA_Complex64_t));
x = (PLASMA_Complex64_t *)malloc(ldb*nrhs*sizeof(PLASMA_Complex64_t));
/* Check if unable to allocate memory */
if ( (!A) || (!x) ) {
printf("Out of Memory \n ");
exit(0);
}
/* Initialiaze Data */
MAGMA_zplghe((double)n, n, A, lda, 51 );
LAPACKE_zlarnv_work(1, ISEED, n*nrhs, x);
/* Save A and b */
if (check) {
Acpy = (PLASMA_Complex64_t *)malloc(lda*n* sizeof(PLASMA_Complex64_t));
b = (PLASMA_Complex64_t *)malloc(ldb*nrhs*sizeof(PLASMA_Complex64_t));
LAPACKE_zlacpy_work(LAPACK_COL_MAJOR,' ', n, n, A, lda, Acpy, lda);
LAPACKE_zlacpy_work(LAPACK_COL_MAJOR,' ', n, nrhs, x, ldb, b, ldb);
}
/* PLASMA ZPOSV */
/* if (iparam[TIMING_BOUND]) */
/* starpu_bound_start(iparam[TIMING_BOUNDDEPS],iparam[TIMING_BOUNDDEPSPRIO]); */
t = -cWtime();
MAGMA_zposv(PlasmaUpper, n, nrhs, A, lda, x, ldb);
t += cWtime();
/* if (iparam[TIMING_BOUND]) */
/* starpu_bound_stop(); */
*t_ = t;
/* Check the solution */
if (check)
{
dparam[TIMING_RES] = zcheck_solution(n, n, nrhs, Acpy, lda, b, x, ldb,
&(dparam[TIMING_ANORM]), &(dparam[TIMING_BNORM]),
&(dparam[TIMING_XNORM]));
free(Acpy); free(b);
}
free(A); free(x);
return 0;
}

Here is the call graph for this function: