29#ifndef BLACS_CONNECTOR_H
30#define BLACS_CONNECTOR_H
48 void Cigebs2d(
int ConTxt,
char *scope,
char *top,
int m,
int n,
int *A,
int lda);
49 void Cigebr2d(
int ConTxt,
char *scope,
char *top,
int m,
int n,
int *A,
int lda,
int rsrc,
int csrc);
51 void Csgebs2d(
int ConTxt,
char *scope,
char *top,
int m,
int n,
float *A,
int lda);
52 void Csgebr2d(
int ConTxt,
char *scope,
char *top,
int m,
int n,
float *A,
int lda,
int rsrc,
int csrc);
54 void Cdgebs2d(
int ConTxt,
char *scope,
char *top,
int m,
int n,
double *A,
int lda);
55 void Cdgebr2d(
int ConTxt,
char *scope,
char *top,
int m,
int n,
double *A,
int lda,
int rsrc,
int csrc);
57 void Ccgebs2d(
int ConTxt,
char *scope,
char *top,
int m,
int n, std::complex<float> *A,
int lda);
58 void Ccgebr2d(
int ConTxt,
char *scope,
char *top,
int m,
int n, std::complex<float> *A,
int lda,
int rsrc,
int csrc);
60 void Czgebs2d(
int ConTxt,
char *scope,
char *top,
int m,
int n, std::complex<double> *A,
int lda);
61 void Czgebr2d(
int ConTxt,
char *scope,
char *top,
int m,
int n, std::complex<double> *A,
int lda,
int rsrc,
int csrc);
64 void Cigsum2d(
int ConTxt,
char *scope,
char *top,
int m,
int n,
int *A,
int lda,
int rdest,
int cdest);
70 static inline void get(
int context,
int what,
int& value)
75 static inline void pinfo(
int& rank,
int& size)
94void Cxgebs2d(
int ConTxt,
char *scope,
char *top,
int m,
int n,
T *A,
int lda)
97 std::is_same<T, int>::value ||
98 std::is_same<T, float>::value ||
99 std::is_same<T, double>::value ||
100 std::is_same<T,std::complex<float>>::value ||
101 std::is_same<T,std::complex<double>>::value,
102 "Type not supported");
104 if (std::is_same<T, int>::value) {
105 Cigebs2d(ConTxt, scope, top, m, n,
reinterpret_cast<int*
>(A), lda);
107 if (std::is_same<T, float>::value) {
108 Csgebs2d(ConTxt, scope, top, m, n,
reinterpret_cast<float*
>(A), lda);
110 if (std::is_same<T, double>::value) {
111 Cdgebs2d(ConTxt, scope, top, m, n,
reinterpret_cast<double*
>(A), lda);
113 if (std::is_same<
T, std::complex<float>>::value) {
114 Ccgebs2d(ConTxt, scope, top, m, n,
reinterpret_cast<std::complex<float>*
>(A), lda);
116 if (std::is_same<
T, std::complex<double>>::value) {
117 Czgebs2d(ConTxt, scope, top, m, n,
reinterpret_cast<std::complex<double>*
>(A), lda);
122void Cxgebr2d(
int ConTxt,
char *scope,
char *top,
int m,
int n,
T *A,
int lda,
int rsrc,
int csrc)
125 std::is_same<T, int>::value ||
126 std::is_same<T, float>::value ||
127 std::is_same<T, double>::value ||
128 std::is_same<T,std::complex<float>>::value ||
129 std::is_same<T,std::complex<double>>::value,
130 "Type not supported");
132 if (std::is_same<T, int>::value) {
133 Cigebr2d(ConTxt, scope, top, m, n,
reinterpret_cast<int*
>(A), lda, rsrc, csrc);
135 if (std::is_same<T, float>::value) {
136 Csgebr2d(ConTxt, scope, top, m, n,
reinterpret_cast<float*
>(A), lda, rsrc, csrc);
138 if (std::is_same<T, double>::value) {
139 Cdgebr2d(ConTxt, scope, top, m, n,
reinterpret_cast<double*
>(A), lda, rsrc, csrc);
141 if (std::is_same<
T, std::complex<float>>::value) {
142 Ccgebr2d(ConTxt, scope, top, m, n,
reinterpret_cast<std::complex<float>*
>(A), lda, rsrc, csrc);
144 if (std::is_same<
T, std::complex<double>>::value) {
145 Czgebr2d(ConTxt, scope, top, m, n,
reinterpret_cast<std::complex<double>*
>(A), lda, rsrc, csrc);
void Czgebr2d(int ConTxt, char *scope, char *top, int m, int n, std::complex< double > *A, int lda, int rsrc, int csrc)
void Cblacs_pcoord(int icontxt, int pnum, int *prow, int *pcol)
void Csgebr2d(int ConTxt, char *scope, char *top, int m, int n, float *A, int lda, int rsrc, int csrc)
void Ccgebr2d(int ConTxt, char *scope, char *top, int m, int n, std::complex< float > *A, int lda, int rsrc, int csrc)
void Cblacs_gridexit(int icontxt)
void Cblacs_get(int icontxt, int what, int *val)
void Cblacs_exit(int icontxt)
void Cigsum2d(int ConTxt, char *scope, char *top, int m, int n, int *A, int lda, int rdest, int cdest)
void Ccgebs2d(int ConTxt, char *scope, char *top, int m, int n, std::complex< float > *A, int lda)
void Cxgebr2d(int ConTxt, char *scope, char *top, int m, int n, T *A, int lda, int rsrc, int csrc)
Definition blacs_connector.h:122
void Cblacs_pinfo(int *myid, int *nprocs)
void Cigebs2d(int ConTxt, char *scope, char *top, int m, int n, int *A, int lda)
void Cxgebs2d(int ConTxt, char *scope, char *top, int m, int n, T *A, int lda)
Definition blacs_connector.h:94
void Cblacs_gridmap(int *icontxt, int *usermap, int ldumap, int nprow, int npcol)
int Cblacs_pnum(int icontxt, int prow, int pcol)
int Csys2blacs_handle(MPI_Comm SysCtxt)
void Cdgebs2d(int ConTxt, char *scope, char *top, int m, int n, double *A, int lda)
void Cigebr2d(int ConTxt, char *scope, char *top, int m, int n, int *A, int lda, int rsrc, int csrc)
void Csgebs2d(int ConTxt, char *scope, char *top, int m, int n, float *A, int lda)
void Cblacs_gridinfo(int icontxt, int *nprow, int *npcol, int *myprow, int *mypcol)
void Czgebs2d(int ConTxt, char *scope, char *top, int m, int n, std::complex< double > *A, int lda)
MPI_Comm Cblacs2sys_handle(int BlacsCtxt)
void Cdgebr2d(int ConTxt, char *scope, char *top, int m, int n, double *A, int lda, int rsrc, int csrc)
void Cblacs_gridinit(int *icontxt, char *layout, int nprow, int npcol)
Definition blacs_connector.h:68
static void gridmap(int &context, int *usermap, int ldumap, int nprow, int npcol)
Definition blacs_connector.h:81
static void pinfo(int &rank, int &size)
Definition blacs_connector.h:75
static void get(int context, int what, int &value)
Definition blacs_connector.h:70
static void gridinfo(int context, int &nprow, int &npcol, int &myprow, int &mypcol)
Definition blacs_connector.h:86
#define T
Definition exp.cpp:237
int mypcol
Definition tddft_test.cpp:14
int nprow
Definition tddft_test.cpp:14
int myprow
Definition tddft_test.cpp:14
int npcol
Definition tddft_test.cpp:14