forked from Srlive1201/LibRPA
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patharray_desc_device.h
More file actions
61 lines (59 loc) · 1.74 KB
/
array_desc_device.h
File metadata and controls
61 lines (59 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include "base_blacs.h"
class Array_Desc_Device{
private:
int ictxt_;
// int nprocs_;
// int myid_;
int nprows_;
int myprow_;
int npcols_;
int mypcol_;
// Array dimensions
int m_;
int n_;
int mb_;
int nb_;
int irsrc_;
int icsrc_;
int lld_;
int m_local_;
int n_local_;
__host__ __device__ static int indx_g2p(
const int &indxglob, const int &nb, const int &isrcproc, const int &nprocs);
__host__ __device__ static int indx_g2l(
const int &indxglob, const int &nb, const int &isrcproc, const int &nprocs);
public:
Array_Desc_Device(const LIBRPA::Array_Desc& array_desc);
__host__ __device__
int indx_g2l_r(int gindx) const;
__host__ __device__
int indx_g2l_c(int gindx) const;
__host__ __device__
const int& m() const{ return m_; }
__host__ __device__
const int& n() const{ return n_; }
__host__ __device__
const int& mb() const{ return mb_; }
__host__ __device__
const int& nb() const{ return nb_; }
__host__ __device__
const int& irsrc() const{ return irsrc_; }
__host__ __device__
const int& icsrc() const{ return icsrc_; }
__host__ __device__
const int& lld() const{ return lld_; }
__host__ __device__
const int& m_loc() const{ return m_local_; }
__host__ __device__
const int& n_loc() const{ return n_local_; }
__host__ __device__
const int& nprows() const{ return nprows_; }
__host__ __device__
const int& npcols() const{ return npcols_; }
__host__ __device__
const int& myprow() const{ return myprow_; }
__host__ __device__
const int& mypcol() const{ return mypcol_; }
__host__ __device__
const int& ictxt() const{ return ictxt_; }
};