forked from HiPerCoRe/cuFFTAdvisor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgeneralTransform.cpp
More file actions
69 lines (62 loc) · 1.71 KB
/
generalTransform.cpp
File metadata and controls
69 lines (62 loc) · 1.71 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
62
63
64
65
66
67
68
69
#include "generalTransform.h"
namespace cuFFTAdvisor {
GeneralTransform::GeneralTransform(int device, int X, int Y, int Z, int N,
Tristate::Tristate isBatched,
Tristate::Tristate isFloat,
Tristate::Tristate isForward,
Tristate::Tristate isInPlace,
Tristate::Tristate isReal)
: device(device),
X(X),
Y(Y),
Z(Z),
N(N),
isBatched(isBatched),
isFloat(isFloat),
isForward(isForward),
isInPlace(isInPlace),
isReal(isReal) {
setRankInfo();
}
GeneralTransform::GeneralTransform(int X, int Y, int Z,
const GeneralTransform &tr)
: device(tr.device),
X(X),
Y(Y),
Z(Z),
N(tr.N),
isBatched(tr.isBatched),
isFloat(tr.isFloat),
isForward(tr.isForward),
isInPlace(tr.isInPlace),
isReal(tr.isReal) {
setRankInfo();
}
GeneralTransform::GeneralTransform(const GeneralTransform &tr) { *this = tr; }
GeneralTransform &GeneralTransform::operator=(const GeneralTransform &tr) {
if (this != &tr) {
this->device = tr.device;
this->X = tr.X;
this->Y = tr.Y;
this->Z = tr.Z;
this->N = tr.N;
this->isBatched = tr.isBatched;
this->isFloat = tr.isFloat;
this->isForward = tr.isForward;
this->isInPlace = tr.isInPlace;
this->isReal = tr.isReal;
setRankInfo();
}
return *this;
}
void GeneralTransform::setRankInfo() {
rank = RANK_3D;
if (1 == Z) {
if (1 == Y) {
rank = RANK_1D;
} else {
rank = RANK_2D;
}
}
}
} // namespace cuFFTAdvisor