Browse Source

verbose

master
anapt 7 years ago
parent
commit
ea8c3aa370
  1. 6
      mean_shift_cuda/meanshift.cu
  2. 3
      mean_shift_cuda/meanshift_gpu_utils.cu

6
mean_shift_cuda/meanshift.cu

@ -21,7 +21,7 @@ int main(int argc, char **argv){
char *labels; char *labels;
params.epsilon = 0.0001; params.epsilon = 0.0001;
params.verbose = true; params.verbose = false;
params.display = true; params.display = true;
//get_args(argc, argv, &params); //commented out while in development //get_args(argc, argv, &params); //commented out while in development
@ -38,10 +38,10 @@ int main(int argc, char **argv){
gettimeofday (&endwtime, NULL); gettimeofday (&endwtime, NULL);
seq_time = (double)((endwtime.tv_usec - startwtime.tv_usec)/1.0e6 + endwtime.tv_sec - startwtime.tv_sec); seq_time = (double)((endwtime.tv_usec - startwtime.tv_usec)/1.0e6 + endwtime.tv_sec - startwtime.tv_sec);
if (params.verbose){
printf("\nTotal number of iterations = %d\n", iterations); printf("\nTotal number of iterations = %d\n", iterations);
printf("%s wall clock time = %f\n","Mean Shift", seq_time); printf("%s wall clock time = %f\n","Mean Shift", seq_time);
}
//TODO write output points to file -> plot later //TODO write output points to file -> plot later
//save_matrix(shifted_points, iterations); //save_matrix(shifted_points, iterations);

3
mean_shift_cuda/meanshift_gpu_utils.cu

@ -90,10 +90,9 @@ int meanshift(double **original_points, double ***shifted_points, int deviation
gettimeofday (&end, NULL); gettimeofday (&end, NULL);
seq = (double)((end.tv_usec - start.tv_usec)/1.0e6 + end.tv_sec - start.tv_sec); seq = (double)((end.tv_usec - start.tv_usec)/1.0e6 + end.tv_sec - start.tv_sec);
if (params.verbose){
printf("%s wall clock time = %f\n","Device memory allocation", seq); printf("%s wall clock time = %f\n","Device memory allocation", seq);
} }
}
// finds pairwise distance matrix (inside radius) // finds pairwise distance matrix (inside radius)
// [I, D] = rangesearch(x,y,h); // [I, D] = rangesearch(x,y,h);

Loading…
Cancel
Save