-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.cc
executable file
·51 lines (39 loc) · 1.56 KB
/
model.cc
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
#include <data_rtm_3d.h>
#include <image_rtm_3d.h>
#include <ioModes.h>
#include <vel_fd_3d.h>
#include <iostream>
#include "cpu_prop.h"
#include "rtm_zero_op_3d.h"
#include "source_func_3d.h"
main(int argc, char **argv) {
SEP::ioModes modes(argc, argv);
std::shared_ptr<SEP::genericIO> io = modes.getDefaultIO();
std::shared_ptr<SEP::paramObj> pars = io->getParamObj();
std::shared_ptr<data_rtm_3d> data(new data_rtm_3d("data", io));
std::shared_ptr<wavelet_source_func> wavelet(
new wavelet_source_func(io, "wavelet"));
float src_depth = pars->getFloat("src_depth", 0.);
std::shared_ptr<vel_fd_3d> vel(new vel_fd_3d(io, "velocity"));
std::shared_ptr<image_rtm_3d> image(new image_rtm_3d(io, "image", vel));
SEP::axis asx = data->getAxis(4);
fprintf(stderr, "where id die\n");
SEP::axis asy = data->getAxis(5);
fprintf(stderr, "where id die\n");
wavelet->set_sources_axes(src_depth, asx, asy);
// image->zero();
// image->set_source_file(image);
// std::shared_ptr<oc_float> d2(new oc_float(io,"dtest.H",data));
// data->set_source_file(d2);
// int n_gpus=pars.get_int("n_gpus",1);
// setup_cuda(n_gpus,argc,argv);
float aper = pars->getFloat("aper", 8.);
std::vector<int> rand_vec(1.0);
bool encode = false;
std::shared_ptr<cpuProp> prop(new cpuProp(io));
std::shared_ptr<rtm_zero_op> op(new rtm_zero_op(pars, prop, vel, wavelet,
data, image, aper, true,
encode, rand_vec, true));
op->forward(false, image, data, 1);
return 0;
}