Browse Source

times

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

6
mean_shift_cuda/meanshift.cu

@ -39,9 +39,9 @@ int main(int argc, char **argv){
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);
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);
printf("%f \n", 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);

20
mean_shift_cuda/meanshift_gpu_utils.cu

@ -91,9 +91,9 @@ int meanshift(double **original_points, double ***shifted_points, int deviation
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);
printf("%s wall clock time = %f\n","Device memory allocation", seq); // printf("%s wall clock time = %f\n","Device memory allocation", seq);
// to create output data file // to create output data file
// printf("%f ", seq); printf("%f ", seq);
} }
// finds pairwise distance matrix (inside radius) // finds pairwise distance matrix (inside radius)
@ -114,9 +114,9 @@ int meanshift(double **original_points, double ***shifted_points, int deviation
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);
printf("%s wall clock time = %f\n","Device memory allocation", seq); // printf("%s wall clock time = %f\n","Device memory allocation", seq);
// to create output data file // to create output data file
// printf("%f ", seq); printf("%f ", seq);
// creates new y vector // creates new y vector
@ -253,9 +253,9 @@ void calculate_kernel_matrix(Matrix d_shifted_points, Matrix d_original_points,
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);
printf("%s wall clock time = %f\n","Copying from device to host", seq); // printf("%s wall clock time = %f\n","Copying from device to host", seq);
// to create output data file // to create output data file
// printf("%f ", seq); printf("%f ", seq);
} }
void calculate_denominator(Matrix d_kernel_matrix, Matrix d_denominator, double **denominator){ void calculate_denominator(Matrix d_kernel_matrix, Matrix d_denominator, double **denominator){
@ -301,9 +301,9 @@ void calculate_denominator(Matrix d_kernel_matrix, Matrix d_denominator, double
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);
printf("%s wall clock time = %f\n","Copying from device to host", seq); // printf("%s wall clock time = %f\n","Copying from device to host", seq);
// to create output data file // to create output data file
// printf("%f ", seq); printf("%f ", seq);
} }
void shift_points(Matrix d_kernel_matrix, Matrix d_original_points, Matrix d_shifted_points, void shift_points(Matrix d_kernel_matrix, Matrix d_original_points, Matrix d_shifted_points,
@ -356,9 +356,9 @@ void shift_points(Matrix d_kernel_matrix, Matrix d_original_points, Matrix d_shi
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);
printf("%s wall clock time = %f\n","Copying from device to host", seq); // printf("%s wall clock time = %f\n","Copying from device to host", seq);
// to create output data file // to create output data file
// printf("%f ", seq); printf("%f ", seq);
} }

Loading…
Cancel
Save