ScaLAPACK 2.1
2.1
ScaLAPACK: Scalable Linear Algebra PACKage
tools.h
Go to the documentation of this file.
1
#include "
./pblas.h
"
2
3
#ifdef __STDC__
4
typedef
void (*
CPYPTR
)(int, int,
float
*, int,
float
*, int);
5
#define SLVOID void
6
#else
7
typedef
void (*
CPYPTR
)();
8
#define SLVOID char
9
#endif
10
11
#define ErrPrnt fprintf(stderr, "line %d of file %s\n",__LINE__, __FILE__);
12
13
#define Mdescset(desc, m, n, mb, nb, rsrc, csrc, ictxt, lld) \
14
{ \
15
(desc)[DT_] = BLOCK_CYCLIC_2D; \
16
(desc)[CTXT_] = (ictxt); \
17
(desc)[M_] = (m); \
18
(desc)[N_] = (n); \
19
(desc)[MB_] = (mb); \
20
(desc)[NB_] = (nb); \
21
(desc)[RSRC_] = (rsrc); \
22
(desc)[CSRC_] = (csrc); \
23
(desc)[LLD_] = (lld); \
24
}
25
26
#define MCindxg2p(IG, nb, srcproc, nprocs) \
27
( ((srcproc) + (IG)/(nb)) % nprocs )
28
29
typedef
struct
{
double
r, i;}
DCOMPLEX
;
30
typedef
struct
{
float
r, i;}
SCOMPLEX
;
31
32
#define Mmalloc(M_ptr, M_type, M_elt, M_i, M_ctxt) \
33
{ \
34
void pberror_(); \
35
(M_ptr) = ( M_type * ) malloc((M_elt)*(sizeof(M_type))); \
36
if (!(M_ptr)) \
37
{ \
38
if ((M_elt) > 0) \
39
{ \
40
(M_i) = 1; \
41
fprintf(stderr, "Not enough memory on line %d of file %s!!\n", \
42
__LINE__, __FILE__); \
43
pberror_(&(M_ctxt), __FILE__, &(M_i)); \
44
} \
45
} \
46
}
DCOMPLEX
Definition:
Bdef.h:37
CPYPTR
void(* CPYPTR)()
Definition:
tools.h:7
SCOMPLEX
Definition:
Bdef.h:38
pblas.h
SRC
tools.h
Generated by
1.8.16