PLASMA
2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
Main Page
Modules
Namespaces
Data Structures
Files
File List
Globals
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 */
26
PASTE_CODE_ALLOCATE_MATRIX
(
A
, 1,
PLASMA_Complex32_t
, LDA, N );
27
PASTE_CODE_ALLOCATE_MATRIX
(
B
, 1,
PLASMA_Complex32_t
, LDB, NRHS);
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
();
42
PLASMA_ctrsm
(
PlasmaLeft
,
PlasmaUpper
,
PlasmaNoTrans
,
PlasmaUnit
,
43
N, NRHS, alpha,
A
, LDA,
B
, LDB );
44
STOP_TIMING
();
45
46
/* Check the solution */
47
if
(check)
48
{
49
dparam[
IPARAM_RES
] =
c_check_trsm
(
PlasmaLeft
,
PlasmaUpper
,
PlasmaNoTrans
,
PlasmaUnit
,
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
}
plasma_2.4.5
timing
time_ctrsm.c
Generated on Mon Jul 9 2012 12:45:07 for PLASMA by
1.8.1