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_zgetrf.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_zgetrf_Tile"
11
/* See Lawn 41 page 120 */
12
#define _FMULS FMULS_GETRF(M, N)
13
#define _FADDS FADDS_GETRF(M, 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
22
if
( M != N && check ) {
23
fprintf(stderr,
"Check cannot be perfomed with M != N\n"
);
24
check = 0;
25
}
26
27
/* Allocate Data */
28
PASTE_CODE_ALLOCATE_MATRIX
(
A
, 1,
PLASMA_Complex64_t
, LDA, N );
29
PASTE_CODE_ALLOCATE_MATRIX
( piv, 1,
int
,
min
(M,N), 1 );
30
31
/* Initialize Data */
32
PLASMA_zplrnt
(M, N,
A
, LDA, 3456);
33
34
/* Save AT in lapack layout for check */
35
PASTE_CODE_ALLOCATE_COPY
( Acpy, check,
PLASMA_Complex64_t
,
A
, LDA, N );
36
37
START_TIMING
();
38
PLASMA_zgetrf
( M, N,
A
, LDA, piv );
39
STOP_TIMING
();
40
41
/* Check the solution */
42
if
( check )
43
{
44
PASTE_CODE_ALLOCATE_MATRIX
( X, 1,
PLASMA_Complex64_t
, LDB, NRHS );
45
PLASMA_zplrnt
( N, NRHS, X, LDB, 5673 );
46
PASTE_CODE_ALLOCATE_COPY
(
B
, 1,
PLASMA_Complex64_t
, X, LDB, NRHS );
47
48
PLASMA_zgetrs
(
PlasmaNoTrans
, N, NRHS,
A
, LDA, piv, X, LDB );
49
50
dparam[
IPARAM_RES
] =
z_check_solution
(M, N, NRHS, Acpy, LDA,
B
, X, LDB,
51
&(dparam[
IPARAM_ANORM
]),
52
&(dparam[
IPARAM_BNORM
]),
53
&(dparam[
IPARAM_XNORM
]));
54
55
free( Acpy ); free(
B
); free( X );
56
}
57
58
free(
A
);
59
free( piv );
60
61
return
0;
62
}
plasma_2.4.5
timing
time_zgetrf.c
Generated on Mon Jul 9 2012 12:45:08 for PLASMA by
1.8.1