PLASMA  2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
time_cposv.c
Go to the documentation of this file.
1 
6 #define _TYPE PLASMA_Complex32_t
7 #define _PREC float
8 #define _LAMCH LAPACKE_slamch_work
9 
10 #define _NAME "PLASMA_cposv"
11 /* See Lawn 41 page 120 */
12 #define _FMULS (FMULS_POTRF( N ) + FMULS_POTRS( N, NRHS ))
13 #define _FADDS (FADDS_POTRF( N ) + FADDS_POTRS( N, NRHS ))
14 
15 #include "./timing.c"
16 
17 static int
18 RunTest(int *iparam, float *dparam, real_Double_t *t_)
19 {
20  PASTE_CODE_IPARAM_LOCALS( iparam );
22 
23  LDA = max(LDA, N);
24 
25  /* Allocate Data */
28 
29  /* Initialiaze Data */
30  PLASMA_cplghe((float)N, N, A, LDA, 51 );
31  PLASMA_cplrnt( N, NRHS, X, LDB, 5673 );
32 
33  /* Save A and b */
34  PASTE_CODE_ALLOCATE_COPY( Acpy, check, PLASMA_Complex32_t, A, LDA, N );
35  PASTE_CODE_ALLOCATE_COPY( B, check, PLASMA_Complex32_t, X, LDB, NRHS );
36 
37  /* PLASMA CPOSV */
38  START_TIMING();
39  PLASMA_cposv(uplo, N, NRHS, A, LDA, X, LDB);
40  STOP_TIMING();
41 
42  /* Check the solution */
43  if (check)
44  {
45  dparam[IPARAM_RES] = c_check_solution(N, N, NRHS, Acpy, LDA, B, X, LDB,
46  &(dparam[IPARAM_ANORM]),
47  &(dparam[IPARAM_BNORM]),
48  &(dparam[IPARAM_XNORM]));
49  free(Acpy); free(B);
50  }
51 
52  free(A); free(X);
53 
54  return 0;
55 }