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_zgels.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_zgels"
11
/* See Lawn 41 page 120 */
12
#define _FMULS (FMULS_GEQRF( M, N ) + FMULS_GEQRS( M, N, NRHS ))
13
#define _FADDS (FADDS_GEQRF( M, N ) + FADDS_GEQRS( M, N, NRHS ))
14
15
#include "
./timing.c
"
16
17
static
int
18
RunTest(
int
*iparam,
double
*dparam,
real_Double_t
*t_)
19
{
20
PLASMA_Complex64_t
*
T
;
21
PASTE_CODE_IPARAM_LOCALS
( iparam );
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
( x, 1,
PLASMA_Complex64_t
, LDB, NRHS);
31
PASTE_CODE_ALLOCATE_MATRIX
( Acpy, check,
PLASMA_Complex64_t
, LDA, N );
32
PASTE_CODE_ALLOCATE_MATRIX
( b, check,
PLASMA_Complex64_t
, LDB, NRHS);
33
34
/* Initialiaze Data */
35
PLASMA_zplrnt
( M, N,
A
, LDA, 453 );
36
PLASMA_zplrnt
( M, NRHS, x, LDB, 5673 );
37
38
PLASMA_Alloc_Workspace_zgels
(M, N, &T);
39
40
/* Save A and b */
41
if
(check) {
42
LAPACKE_zlacpy_work(LAPACK_COL_MAJOR,
'A'
, M, N,
A
, LDA, Acpy, LDA);
43
LAPACKE_zlacpy_work(LAPACK_COL_MAJOR,
'A'
, M, NRHS, x, LDB, b, LDB);
44
}
45
46
START_TIMING
();
47
PLASMA_zgels
(
PlasmaNoTrans
, M, N, NRHS,
A
, LDA, T, x, LDB );
48
STOP_TIMING
();
49
50
/* Check the solution */
51
if
(check)
52
{
53
dparam[
IPARAM_RES
] =
z_check_solution
(M, N, NRHS, Acpy, LDA, b, x, LDB,
54
&(dparam[
IPARAM_ANORM
]),
55
&(dparam[
IPARAM_BNORM
]),
56
&(dparam[
IPARAM_XNORM
]));
57
free(Acpy); free(b);
58
}
59
60
free( T );
61
free(
A
);
62
free( x );
63
64
return
0;
65
}
plasma_2.4.5
timing
time_zgels.c
Generated on Mon Jul 9 2012 12:45:07 for PLASMA by
1.8.1