Skip to content

Commit

Permalink
removed print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
dkorytov committed Mar 6, 2020
1 parent b44ed91 commit 26fc447
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/n2_merger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void n2_merger3d_write_out(int size,
float merg_len,
const char* file_loc){

std::cout<<"starting with size:"<<size<<std::endl;
// std::cout<<"starting with size:"<<size<<std::endl;
float merger_len;
if(merg_len > 0)
merger_len = merg_len*merg_len;
Expand All @@ -55,7 +55,7 @@ void n2_merger3d_write_out(int size,
colors[i] =i;
}
if(size<=400000){
std::cout<<"n2 method"<<std::endl;
// std::cout<<"n2 method"<<std::endl;
for(int i =1;i<size;++i){
for(int j =0;j<i;++j){
float dist_x = x[i]-x[j];
Expand All @@ -70,7 +70,7 @@ void n2_merger3d_write_out(int size,
else{
//if we have too many points a naive n2 would take too long.
//so we use a chaining mesh.
std::cout<<"cm method"<<std::endl;
// std::cout<<"cm method"<<std::endl;
ChainingMesh<float> cmesh(256.0,256.0,256.0,16,16,16);
cmesh.set_data(x,y,z,size);
size_t cell_num = cmesh.get_num_cells();
Expand Down
16 changes: 8 additions & 8 deletions src/n2_merger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ void n2_merger3d(T* x,T* y, T* z, int* w, int* size, T merger_len, int64_t* colo
for(int i =0;i<size[0];++i){
colors[i] =i;
}
std::cout<<"\tpre work: "<<t1<<std::endl;
// std::cout<<"\tpre work: "<<t1<<std::endl;
t1.start();
if(size[0]<=n2_limit){
std::cout<<"n2 method"<<std::endl;
// std::cout<<"n2 method"<<std::endl;
for(int i =1;i<size[0];++i){
for(int j =0;j<i;++j){
float dist_x = x[i]-x[j];
Expand All @@ -132,15 +132,15 @@ void n2_merger3d(T* x,T* y, T* z, int* w, int* size, T merger_len, int64_t* colo
}
}
else if(true){
std::cout<<"n2 sorted method"<<std::endl;
// std::cout<<"n2 sorted method"<<std::endl;
dtk::Timer t1;t1.start();
int* srt = dtk::arg_sort(x, size[0]);
dtk::reorder(x,size[0],srt);
dtk::reorder(y,size[0],srt);
dtk::reorder(z,size[0],srt);
dtk::reorder(w,size[0],srt);
delete [] srt;
std::cout<<"\t\t resort: "<<t1.stop()<<std::endl;
// std::cout<<"\t\t resort: "<<t1.stop()<<std::endl;

for(int i =1;i<size[0];++i){
for(int j =0;j<i;++j){
Expand All @@ -162,7 +162,7 @@ void n2_merger3d(T* x,T* y, T* z, int* w, int* size, T merger_len, int64_t* colo
else{
//if we have too many points a naive n2 would take too long.
//so we use a chaining mesh.
std::cout<<"cm method"<<std::endl;
// std::cout<<"cm method"<<std::endl;
ChainingMesh<T> cmesh(256.0,256.0,256.0,16,16,16);
cmesh.set_data(x,y,z,size[0]);
size_t cell_num = cmesh.get_num_cells();
Expand Down Expand Up @@ -193,7 +193,7 @@ void n2_merger3d(T* x,T* y, T* z, int* w, int* size, T merger_len, int64_t* colo
colors_out[i]=colors[i];
}
}
std::cout<<"\tpost merger: "<<t1<<std::endl;
// std::cout<<"\tpost merger: "<<t1<<std::endl;
t1.start();
std::vector<float> avg_x;
std::vector<float> avg_y;
Expand Down Expand Up @@ -225,7 +225,7 @@ void n2_merger3d(T* x,T* y, T* z, int* w, int* size, T merger_len, int64_t* colo
avg_z.push_back(average(clr_z));
avg_weight.push_back(clr_x.size());
}
std::cout<<"\tpost work1: "<<t1<<std::endl;
// std::cout<<"\tpost work1: "<<t1<<std::endl;
t1.start();
//overwrite the result to x,y,z,w& size
// std::cout<<"getting pos"<<std::endl;
Expand All @@ -248,7 +248,7 @@ void n2_merger3d(T* x,T* y, T* z, int* w, int* size, T merger_len, int64_t* colo
w[i]=0.0;
}
size[0] = avg_x.size();
std::cout<<"\tpost work2: "<<t1<<std::endl;
// std::cout<<"\tpost work2: "<<t1<<std::endl;
return;
}

Expand Down

0 comments on commit 26fc447

Please sign in to comment.