-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtransformGenerator.h
55 lines (44 loc) · 2.13 KB
/
transformGenerator.h
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
#ifndef CUFFTADVISOR_TRANSFORMGENERATOR_H_
#define CUFFTADVISOR_TRANSFORMGENERATOR_H_
#include <set>
#include "generalTransform.h"
#include "transform.h"
#include "utils.h"
namespace cuFFTAdvisor {
class TransformGenerator {
public:
static void generate(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,
std::vector<Transform const *> &result);
static void generate(int device, int x, int y, int z, int n, bool isBatched,
bool isFloat, bool isForward, bool isInPlace,
Tristate::Tristate isReal,
std::vector<Transform const *> &result);
static void generate(int device, int x, int y, int z, int n, bool isBatched,
bool isFloat, bool isForward,
Tristate::Tristate isInPlace, Tristate::Tristate isReal,
std::vector<Transform const *> &result);
static void generate(int device, int x, int y, int z, int n, bool isBatched,
bool isFloat, Tristate::Tristate isForward,
Tristate::Tristate isInPlace, Tristate::Tristate isReal,
std::vector<Transform const *> &result);
static void generate(int device, int x, int y, int z, int n, bool isBatched,
Tristate::Tristate isFloat, Tristate::Tristate isForward,
Tristate::Tristate isInPlace, Tristate::Tristate isReal,
std::vector<Transform const *> &result);
static void transpose(GeneralTransform &tr,
std::vector<GeneralTransform> &result);
private:
struct TransposeComp {
bool operator()(const Triplet<int> &l,
const Triplet<int> &r) { // FIXME move
if (l.fst != r.fst) return l.fst < r.fst;
if (l.snd != r.snd) return l.snd < r.snd;
return l.rd < r.rd;
}
};
};
} // namespace cuFFTAdvisor
#endif // CUFFTADVISOR_TRANSFORMGENERATOR_H_