-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmc.cpp
executable file
·47 lines (39 loc) · 1.03 KB
/
mc.cpp
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
#include <iostream>
using namespace std;
#include <ctime>
#include <time.h>
#include "mc_glue.h"
int main(int argc,char **argv)
{
int x_grid_num=atoi(argv[1]);
cout<<"x_grid_num = "<<x_grid_num<<endl;
int y_grid_num=atoi(argv[2]);
cout<<"y_grid_num = "<<y_grid_num<<endl;
int z_grid_num = atoi(argv[3]);
cout<<"z_grid_num = "<<z_grid_num<<endl;
string sdf_path_in = argv[4];
cout<<"sdf_path_in = "<<sdf_path_in<<endl;
string mesh_path_out = argv[5];
cout<<"mesh_path_out = "<<mesh_path_out<<endl;
int with_cuda = atoi(argv[6]);
if (with_cuda >0)
{
cout<<"with_cuda = Yes "<<endl;
}else
{
cout<<"with_cuda = No "<<endl;
}
mc_glue* mger=new mc_glue(x_grid_num,
y_grid_num,
z_grid_num, sdf_path_in, mesh_path_out);
if(with_cuda>0)
{
mger->mc_get_mesh_cuda();
}else
{
mger->mc_get_mesh();
}
delete mger;
mger=NULL;
return 0;
}