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_zcgesv.c
Go to the documentation of this file.
1
6
#define _TYPE PLASMA_Complex64_t
7
#define _PREC double
8
#define _LAMCH LAPACKE_dlamch_work
9
10
#define _NAME "PLASMA_zcgesv"
11
/* See Lawn 41 page 120 */
12
#define _FMULS (FMULS_GETRF( N, N ) + FMULS_GETRS( N, NRHS ))
13
#define _FADDS (FADDS_GETRF( N, N ) + FADDS_GETRS( N, NRHS ))
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
iter = 0;
22
23
if
( M != N ) {
24
fprintf(stderr,
"This timing works only with M == N\n"
);
25
return
-1;
26
}
27
28
/* Allocate Data */
29
PASTE_CODE_ALLOCATE_MATRIX
(
A
, 1,
PLASMA_Complex64_t
, LDA, N );
30
PASTE_CODE_ALLOCATE_MATRIX
(
B
, 1,
PLASMA_Complex64_t
, LDB, NRHS );
31
PASTE_CODE_ALLOCATE_MATRIX
( X, 1,
PLASMA_Complex64_t
, LDB, NRHS );
32
PASTE_CODE_ALLOCATE_MATRIX
( piv, 1,
int
, N, 1 );
33
34
/* Initialiaze Data */
35
PLASMA_zplrnt
( N, N,
A
, LDA, 51 );
36
PLASMA_zplrnt
( N, NRHS,
B
, LDB, 5673 );
37
38
/* Save A and b */
39
PASTE_CODE_ALLOCATE_COPY
( Acpy, check,
PLASMA_Complex64_t
,
A
, LDA, N );
40
PASTE_CODE_ALLOCATE_COPY
( Bcpy, check,
PLASMA_Complex64_t
,
B
, LDB, NRHS );
41
42
START_TIMING
();
43
PLASMA_zcgesv
( N, NRHS,
A
, LDA, piv,
B
, LDB, X, LDB, &iter );
44
STOP_TIMING
();
45
46
/* Check the solution */
47
if
(check)
48
{
49
dparam[
IPARAM_RES
] =
z_check_solution
(N, N, NRHS, Acpy, LDA, Bcpy, X, LDB,
50
&(dparam[
IPARAM_ANORM
]),
51
&(dparam[
IPARAM_BNORM
]),
52
&(dparam[
IPARAM_XNORM
]));
53
free(Acpy); free(Bcpy);
54
}
55
56
free( piv );
57
free( X );
58
free(
B
);
59
free(
A
);
60
61
62
return
0;
63
}
plasma_2.4.5
timing
time_zcgesv.c
Generated on Mon Jul 9 2012 12:45:07 for PLASMA by
1.8.1