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_dpotrf_tile.c
Go to the documentation of this file.
1 
6 #define _TYPE double
7 #define _PREC double
8 #define _LAMCH LAPACKE_dlamch_work
9 
10 #define _NAME "PLASMA_dpotrf_Tile"
11 /* See Lawn 41 page 120 */
12 #define _FMULS FMULS_POTRF( N )
13 #define _FADDS FADDS_POTRF( N )
14 
15 #include "./timing.c"
16 
17 static int
18 RunTest(int *iparam, double *dparam, real_Double_t *t_)
19 {
20  PASTE_CODE_IPARAM_LOCALS( iparam );
21  int uplo = PlasmaUpper;
22 
23  LDA = max(LDA, N);
24 
25  /* Allocate Data */
26  PASTE_CODE_ALLOCATE_MATRIX_TILE( descA, 1, double, PlasmaRealDouble, LDA, N, N );
27  PASTE_CODE_ALLOCATE_MATRIX_TILE( descB, check, double, PlasmaRealDouble, LDB, N, NRHS );
28  PLASMA_dplgsy_Tile( (double)N, descA, 51 );
29 
30  /* Save A for check */
31  PASTE_TILE_TO_LAPACK( descA, A, check, double, LDA, N );
32 
33  /* PLASMA DPOSV */
34  START_TIMING();
35  PLASMA_dpotrf_Tile(uplo, descA);
36  STOP_TIMING();
37 
38  /* Check the solution */
39  if ( check )
40  {
41  PLASMA_dplrnt_Tile( descB, 7672 );
42  PASTE_TILE_TO_LAPACK( descB, B, check, double, LDB, NRHS );
43 
44  PLASMA_dpotrs_Tile( uplo, descA, descB );
45 
46  PASTE_TILE_TO_LAPACK( descB, X, check, double, LDB, NRHS );
47 
48  dparam[IPARAM_RES] = d_check_solution(N, N, NRHS, A, LDA, B, X, LDB,
49  &(dparam[IPARAM_ANORM]),
50  &(dparam[IPARAM_BNORM]),
51  &(dparam[IPARAM_XNORM]));
52 
53  PASTE_CODE_FREE_MATRIX( descB );
54  free( A );
55  free( B );
56  free( X );
57  }
58 
59  PASTE_CODE_FREE_MATRIX( descA );
60 
61  return 0;
62 }