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_zgesv_incpiv_tile.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_zgesv_incpiv_Tile"
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
PLASMA_desc
*descL;
21
int
*piv;
22
PASTE_CODE_IPARAM_LOCALS
( iparam );
23
24
if
( M != N ) {
25
fprintf(stderr,
"This timing works only with M == N\n"
);
26
return
-1;
27
}
28
29
/* Allocate Data */
30
PASTE_CODE_ALLOCATE_MATRIX_TILE
( descA, 1,
PLASMA_Complex64_t
,
PlasmaComplexDouble
, LDA, N, N );
31
PASTE_CODE_ALLOCATE_MATRIX_TILE
( descB, 1,
PLASMA_Complex64_t
,
PlasmaComplexDouble
, LDB, N, NRHS );
32
33
/* Initialize A and b */
34
PLASMA_zplrnt_Tile
( descA, 8796 );
35
PLASMA_zplrnt_Tile
( descB, 7732 );
36
37
/* Save AT and bT in lapack layout for check */
38
PASTE_TILE_TO_LAPACK
( descA,
A
, check,
PLASMA_Complex64_t
, LDA, N );
39
PASTE_TILE_TO_LAPACK
( descB, b, check,
PLASMA_Complex64_t
, LDB, NRHS );
40
41
/* Allocate Workspace */
42
PLASMA_Alloc_Workspace_zgesv_incpiv_Tile
(N, &descL, &piv);
43
44
START_TIMING
();
45
PLASMA_zgesv_incpiv_Tile
( descA, descL, piv, descB );
46
STOP_TIMING
();
47
48
/* Allocate Workspace */
49
PLASMA_Dealloc_Handle_Tile
(&descL);
50
51
/* Check the solution */
52
if
( check )
53
{
54
PASTE_TILE_TO_LAPACK
( descB, x, check,
PLASMA_Complex64_t
, LDB, NRHS );
55
56
dparam[
IPARAM_RES
] =
z_check_solution
(N, N, NRHS,
A
, LDA, b, x, LDB,
57
&(dparam[
IPARAM_ANORM
]),
58
&(dparam[
IPARAM_BNORM
]),
59
&(dparam[
IPARAM_XNORM
]));
60
free(
A
); free(b); free(x);
61
}
62
63
PASTE_CODE_FREE_MATRIX
( descA );
64
PASTE_CODE_FREE_MATRIX
( descB );
65
free( piv );
66
67
return
0;
68
}
plasma_2.4.5
timing
time_zgesv_incpiv_tile.c
Generated on Mon Jul 9 2012 12:45:07 for PLASMA by
1.8.1