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_zgecfi.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_zgecfi"
11
/* See Lawn 41 page 120 */
12
#define _FMULS (0.0)
13
#define _FADDS (M * N * sizeof(_TYPE))
14
15
#include "
./timing.c
"
16
17
int
z_check_conversion
(
int
m,
int
n,
int
mba,
int
nba,
int
mbb,
int
nbb,
18
PLASMA_Complex64_t
*
A
,
PLASMA_Complex64_t
*
B
,
19
int
(*mapA)(
int
,
int
,
int
,
int
,
int
,
int
),
int
(*mapB)(
int
,
int
,
int
,
int
,
int
,
int
)) {
20
int
i, j;
21
22
for
( j=0; j<n; j++) {
23
for
(i=0; i<m; i++) {
24
if
(A[ mapA(m, n, mba, nba, i, j) ] != B[ mapB(m, n, mbb, nbb, i, j) ] ) {
25
return
-1;
26
}
27
}
28
}
29
return
0;
30
}
31
32
static
int
33
RunTest(
int
*iparam,
_PREC
*dparam,
real_Double_t
*t_)
34
{
35
PASTE_CODE_IPARAM_LOCALS
( iparam );
36
37
LDA = M;
38
39
dparam[
IPARAM_ANORM
] = (
_PREC
)M;
40
dparam[
IPARAM_BNORM
] = (
_PREC
)
_FADDS
;
41
42
/* Allocate Data */
43
PASTE_CODE_ALLOCATE_MATRIX
( A, 1,
PLASMA_Complex64_t
, LDA, N );
44
45
/* Initialize Data */
46
PLASMA_zplrnt
(M, N, A, LDA, 3456);
47
48
/* Save AT in lapack layout for check */
49
PASTE_CODE_ALLOCATE_COPY
( Acpy, check,
PLASMA_Complex64_t
, A, LDA, N );
50
51
START_TIMING
();
52
PLASMA_zgecfi
( M, N, A,
PlasmaCM
, M, 1,
PlasmaCCRB
, MB, NB);
53
STOP_TIMING
();
54
55
/* Check the solution */
56
if
(check)
57
{
58
dparam[
IPARAM_RES
] = (
_PREC
)
z_check_conversion
(M, N, M, 1, MB, NB, Acpy, A,
map_CM
,
map_CCRB
);
59
free(Acpy);
60
}
61
62
free( A );
63
return
0;
64
}
plasma_2.4.5
timing
time_zgecfi.c
Generated on Mon Jul 9 2012 12:45:07 for PLASMA by
1.8.1