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_spotrf_tile.c
Go to the documentation of this file.
1 
6 #define _TYPE float
7 #define _PREC float
8 #define _LAMCH LAPACKE_slamch_work
9 
10 #define _NAME "PLASMA_spotrf_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, float *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, float, PlasmaRealFloat, LDA, N, N );
27  PASTE_CODE_ALLOCATE_MATRIX_TILE( descB, check, float, PlasmaRealFloat, LDB, N, NRHS );
28  PLASMA_splgsy_Tile( (float)N, descA, 51 );
29 
30  /* Save A for check */
31  PASTE_TILE_TO_LAPACK( descA, A, check, float, LDA, N );
32 
33  /* PLASMA SPOSV */
34  START_TIMING();
35  PLASMA_spotrf_Tile(uplo, descA);
36  STOP_TIMING();
37 
38  /* Check the solution */
39  if ( check )
40  {
41  PLASMA_splrnt_Tile( descB, 7672 );
42  PASTE_TILE_TO_LAPACK( descB, B, check, float, LDB, NRHS );
43 
44  PLASMA_spotrs_Tile( uplo, descA, descB );
45 
46  PASTE_TILE_TO_LAPACK( descB, X, check, float, LDB, NRHS );
47 
48  dparam[IPARAM_RES] = s_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 }