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_cgesv_tile.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_cgesv_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,
float
*dparam,
real_Double_t
*t_)
19
{
20
PASTE_CODE_IPARAM_LOCALS
( iparam );
21
22
if
( M != N ) {
23
fprintf(stderr,
"This timing works only with M == N\n"
);
24
return
-1;
25
}
26
27
/* Allocate Data */
28
PASTE_CODE_ALLOCATE_MATRIX_TILE
( descA, 1,
PLASMA_Complex32_t
,
PlasmaComplexFloat
, LDA, N, N );
29
PASTE_CODE_ALLOCATE_MATRIX_TILE
( descB, 1,
PLASMA_Complex32_t
,
PlasmaComplexFloat
, LDB, N, NRHS );
30
PASTE_CODE_ALLOCATE_MATRIX
( piv, 1,
int
, N, 1 );
31
32
/* Initialize AT and bT for Symmetric Positif Matrix */
33
PLASMA_cplrnt_Tile
( descA, 8796 );
34
PLASMA_cplrnt_Tile
( descB, 7732 );
35
36
/* Save AT and bT in lapack layout for check */
37
PASTE_TILE_TO_LAPACK
( descA,
A
, check,
PLASMA_Complex32_t
, LDA, N );
38
PASTE_TILE_TO_LAPACK
( descB, b, check,
PLASMA_Complex32_t
, LDB, NRHS );
39
40
START_TIMING
();
41
PLASMA_cgesv_Tile
( descA, piv, descB );
42
STOP_TIMING
();
43
44
/* Check the solution */
45
if
( check )
46
{
47
PASTE_TILE_TO_LAPACK
( descB, x, check,
PLASMA_Complex32_t
, LDB, NRHS );
48
49
dparam[
IPARAM_RES
] =
c_check_solution
(N, N, NRHS,
A
, LDA, b, x, LDB,
50
&(dparam[
IPARAM_ANORM
]),
51
&(dparam[
IPARAM_BNORM
]),
52
&(dparam[
IPARAM_XNORM
]));
53
free(
A
); free(b); free(x);
54
}
55
56
PASTE_CODE_FREE_MATRIX
( descA );
57
PASTE_CODE_FREE_MATRIX
( descB );
58
free( piv );
59
60
return
0;
61
}
plasma_2.4.5
timing
time_cgesv_tile.c
Generated on Mon Jul 9 2012 12:45:07 for PLASMA by
1.8.1