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_ctrsm.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_ctrsm"
11 /* See Lawn 41 page 120 */
12 #define _FMULS FMULS_TRSM( PlasmaLeft, N, NRHS )
13 #define _FADDS FADDS_TRSM( PlasmaLeft, N, NRHS )
14 
15 #include "./timing.c"
16 
17 static int
18 RunTest(int *iparam, float *dparam, real_Double_t *t_)
19 {
20  PLASMA_Complex32_t alpha;
21  PASTE_CODE_IPARAM_LOCALS( iparam );
22 
23  LDA = max( LDA, N );
24 
25  /* Allocate Data */
28  PASTE_CODE_ALLOCATE_MATRIX( B2, check, PLASMA_Complex32_t, LDB, NRHS);
29 
30  /* Initialiaze Data */
31  PLASMA_cplgsy( (PLASMA_Complex32_t)N, N, A, LDA, 453 );
32  PLASMA_cplrnt( N, NRHS, B, LDB, 5673 );
33  LAPACKE_clarnv_work(1, ISEED, 1, &alpha);
34  alpha = 10.; /*alpha * N / 2.;*/
35 
36  if (check)
37  {
38  memcpy(B2, B, LDB*NRHS*sizeof(PLASMA_Complex32_t));
39  }
40 
41  START_TIMING();
43  N, NRHS, alpha, A, LDA, B, LDB );
44  STOP_TIMING();
45 
46  /* Check the solution */
47  if (check)
48  {
50  N, NRHS,
51  alpha, A, LDA, B, B2, LDB,
52  &(dparam[IPARAM_ANORM]),
53  &(dparam[IPARAM_BNORM]),
54  &(dparam[IPARAM_XNORM]));
55  free(B2);
56  }
57 
58  free( A );
59  free( B );
60 
61  return 0;
62 }