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_sgels_tile.c
Go to the documentation of this file.
1
6
#define _TYPE float
7
#define _PREC float
8
#define _LAMCH LAPACKE_slamch_work
9
10
#define _NAME "PLASMA_sgels_Tile"
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,
float
*dparam,
real_Double_t
*t_)
19
{
20
PLASMA_desc
*descT;
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_TILE
( descA, 1,
float
,
PlasmaRealFloat
, LDA, M, N );
30
PASTE_CODE_ALLOCATE_MATRIX_TILE
( descB, 1,
float
,
PlasmaRealFloat
, LDB, M, NRHS );
31
32
PLASMA_splrnt_Tile
( descA, 5373 );
33
PLASMA_splrnt_Tile
( descB, 673 );
34
35
/* Allocate Workspace */
36
PLASMA_Alloc_Workspace_sgels_Tile
(M, N, &descT);
37
38
/* Save A and B for check */
39
PASTE_TILE_TO_LAPACK
( descA,
A
, check,
float
, LDA, N );
40
PASTE_TILE_TO_LAPACK
( descB,
B
, check,
float
, LDB, NRHS );
41
42
/* Do the computations */
43
START_TIMING
();
44
PLASMA_sgels_Tile
(
PlasmaNoTrans
, descA, descT, descB );
45
STOP_TIMING
();
46
47
/* Allocate Workspace */
48
PLASMA_Dealloc_Handle_Tile
(&descT);
49
50
/* Check the solution */
51
if
( check )
52
{
53
/* Copy solution to X */
54
PASTE_TILE_TO_LAPACK
( descB, X, 1,
float
, LDB, NRHS );
55
56
dparam[
IPARAM_RES
] =
s_check_solution
(M, 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
66
return
0;
67
}
plasma_2.4.5
timing
time_sgels_tile.c
Generated on Mon Jul 9 2012 12:45:07 for PLASMA by
1.8.1