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_zgeqrf_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_zgeqrf_Tile"
11
/* See Lawn 41 page 120 */
12
#define _FMULS FMULS_GEQRF( M, N )
13
#define _FADDS FADDS_GEQRF( M, N )
14
15
#include "
./timing.c
"
16
17
static
int
18
RunTest(
int
*iparam,
double
*dparam,
real_Double_t
*t_)
19
{
20
PLASMA_desc
*descT;
21
PASTE_CODE_IPARAM_LOCALS
( iparam );
22
23
/* Allocate Data */
24
PASTE_CODE_ALLOCATE_MATRIX_TILE
( descA, 1,
PLASMA_Complex64_t
,
PlasmaComplexDouble
, LDA, M, N );
25
PLASMA_zplrnt_Tile
( descA, 5373 );
26
27
/* Save A for check */
28
PASTE_TILE_TO_LAPACK
( descA,
A
, ( check && M == N ),
PLASMA_Complex64_t
, LDA, N );
29
30
/* Allocate B for check */
31
PASTE_CODE_ALLOCATE_MATRIX_TILE
( descB, (check && M == N),
PLASMA_Complex64_t
,
PlasmaComplexDouble
, LDB, M, NRHS );
32
33
/* Allocate Workspace */
34
PLASMA_Alloc_Workspace_zgels_Tile
(M, N, &descT);
35
36
/* Do the computations */
37
START_TIMING
();
38
PLASMA_zgeqrf_Tile
( descA, descT );
39
STOP_TIMING
();
40
41
/* Check the solution */
42
if
( check && M == N )
43
{
44
/* Initialize and save B */
45
PLASMA_zplrnt_Tile
( descB, 2264 );
46
PASTE_TILE_TO_LAPACK
( descB,
B
, 1,
PLASMA_Complex64_t
, LDB, NRHS );
47
48
/* Compute the solution */
49
PLASMA_zgeqrs_Tile
( descA, descT, descB );
50
51
/* Copy solution to X */
52
PASTE_TILE_TO_LAPACK
( descB, X, 1,
PLASMA_Complex64_t
, LDB, NRHS );
53
54
dparam[
IPARAM_RES
] =
z_check_solution
(M, N, NRHS,
A
, LDA,
B
, X, LDB,
55
&(dparam[
IPARAM_ANORM
]),
56
&(dparam[
IPARAM_BNORM
]),
57
&(dparam[
IPARAM_XNORM
]));
58
59
/* Free checking structures */
60
PASTE_CODE_FREE_MATRIX
( descB );
61
free(
A
);
62
free(
B
);
63
free( X );
64
}
65
66
/* Free data */
67
PLASMA_Dealloc_Handle_Tile
(&descT);
68
PASTE_CODE_FREE_MATRIX
( descA );
69
70
return
0;
71
}
plasma_2.4.5
timing
time_zgeqrf_tile.c
Generated on Mon Jul 9 2012 12:45:07 for PLASMA by
1.8.1