SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
tools.h
Go to the documentation of this file.
1#include "./pblas.h"
2
3#ifdef __STDC__
4typedef void (*CPYPTR)(Int, Int, float *, Int, float *, Int);
5#define SLVOID void
6#else
7typedef 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
29typedef struct {double r, i;} DCOMPLEX;
30typedef 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}
#define Int
Definition Bconfig.h:22
void(* CPYPTR)()
Definition tools.h:7