forked from HiPerCoRe/cuFFTAdvisor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadvisor.h
More file actions
53 lines (44 loc) · 1.85 KB
/
advisor.h
File metadata and controls
53 lines (44 loc) · 1.85 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
#ifndef CUFFTADVISOR_ADVISOR_H
#define CUFFTADVISOR_ADVISOR_H
#include "benchmarker.h"
#include "sizeOptimizer.h"
#include "validator.h"
namespace cuFFTAdvisor {
class Advisor {
public:
static std::vector<BenchmarkResult const *> *benchmark(
int device, int x, int y = 1, int z = 1, int n = 1,
Tristate::Tristate isBatched = Tristate::TRUE,
Tristate::Tristate isFloat = Tristate::TRUE,
Tristate::Tristate isForward = Tristate::TRUE,
Tristate::Tristate isInPlace = Tristate::TRUE,
Tristate::Tristate isReal = Tristate::TRUE);
static std::vector<Transform const *> *recommend(
int howMany, int device, int x, int y = 1, int z = 1, int n = 1,
Tristate::Tristate isBatched = Tristate::TRUE,
Tristate::Tristate isFloat = Tristate::TRUE,
Tristate::Tristate isForward = Tristate::TRUE,
Tristate::Tristate isInPlace = Tristate::TRUE,
Tristate::Tristate isReal = Tristate::TRUE, int maxSignalInc = INT_MAX,
int maxMemory = INT_MAX,
bool allowTransposition = false,
bool squareOnly = false,
bool crop = false);
static std::vector<BenchmarkResult const *> *find(
int howMany, int device, int x, int y = 1, int z = 1, int n = 1,
Tristate::Tristate isBatched = Tristate::TRUE,
Tristate::Tristate isFloat = Tristate::TRUE,
Tristate::Tristate isForward = Tristate::TRUE,
Tristate::Tristate isInPlace = Tristate::TRUE,
Tristate::Tristate isReal = Tristate::TRUE, int maxSignalInc = INT_MAX,
int maxMemory = INT_MAX,
bool allowTransposition = false,
bool squareOnly = false,
bool crop = false);
private:
static int getMaxMemory(int device, int size);
static inline std::vector<BenchmarkResult const *> *benchmark(
std::vector<Transform const *> &transforms);
};
} // namespace cuFFTAdvisor
#endif // CUFFTADVISOR_ADVISOR_H