-
Notifications
You must be signed in to change notification settings - Fork 4
/
PlatformData.h
66 lines (60 loc) · 2.18 KB
/
PlatformData.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
56
57
58
59
60
61
62
63
64
65
66
#ifndef PLATFORM_DATA_H
#define PLATFORM_DATA_H
#include <optional>
#include <string>
#include <Halide.h>
struct PlatformData {
PlatformData(std::optional<double> B,
std::optional<float> B_IF,
double delta_r,
std::optional<double> delta_t,
std::optional<double> chirprate,
std::optional<double> f_0,
int nsamples,
int npulses,
std::optional<double> vp,
std::optional<Halide::Runtime::Buffer<float, 1>> freq,
Halide::Runtime::Buffer<float, 1> k_r,
std::optional<Halide::Runtime::Buffer<double, 1>> k_y,
std::optional<Halide::Runtime::Buffer<float, 1>> n_hat,
Halide::Runtime::Buffer<float, 1> R_c,
std::optional<Halide::Runtime::Buffer<double, 1>> t,
Halide::Runtime::Buffer<float, 2> pos,
Halide::Runtime::Buffer<float, 3> phs):
B(B),
B_IF(B_IF),
delta_r(delta_r),
delta_t(delta_t),
chirprate(chirprate),
f_0(f_0),
nsamples(nsamples),
npulses(npulses),
vp(vp),
freq(freq),
k_r(k_r),
k_y(k_y),
n_hat(n_hat),
R_c(R_c),
t(t),
pos(pos),
phs(phs) {}
std::optional<double> B;
std::optional<float> B_IF;
double delta_r;
std::optional<double> delta_t;
std::optional<double> chirprate;
std::optional<double> f_0;
int nsamples;
int npulses;
std::optional<double> vp;
std::optional<Halide::Runtime::Buffer<float, 1>> freq;
Halide::Runtime::Buffer<float, 1> k_r;
std::optional<Halide::Runtime::Buffer<double, 1>> k_y;
std::optional<Halide::Runtime::Buffer<float, 1>> n_hat;
Halide::Runtime::Buffer<float, 1> R_c;
std::optional<Halide::Runtime::Buffer<double, 1>> t;
Halide::Runtime::Buffer<float, 2> pos;
Halide::Runtime::Buffer<float, 3> phs;
};
PlatformData platform_load(std::string platform_dir);
#endif