|
@ -5,10 +5,10 @@ |
|
|
#include "meanshift_utils.h" |
|
|
#include "meanshift_utils.h" |
|
|
#include "meanshift_gpu_utils.h" |
|
|
#include "meanshift_gpu_utils.h" |
|
|
|
|
|
|
|
|
int DEVIATION = 1; |
|
|
int DEVIATION = 31000; |
|
|
int NUMBER_OF_POINTS = 600; |
|
|
int NUMBER_OF_POINTS = 5000; |
|
|
int DIMENSIONS = 2; |
|
|
int DIMENSIONS = 2; |
|
|
const char *POINTS_FILENAME = "../data/X.bin"; |
|
|
const char *POINTS_FILENAME = "../data/s4"; |
|
|
const char *LABELS_FILENAME = "../data/L.bin"; |
|
|
const char *LABELS_FILENAME = "../data/L.bin"; |
|
|
parameters params; |
|
|
parameters params; |
|
|
|
|
|
|
|
@ -21,9 +21,8 @@ int main(int argc, char **argv){ |
|
|
char *labels; |
|
|
char *labels; |
|
|
|
|
|
|
|
|
params.epsilon = 0.0001; |
|
|
params.epsilon = 0.0001; |
|
|
params.verbose = false; |
|
|
params.verbose = true; |
|
|
params.display = true; |
|
|
params.display = true; |
|
|
printf("here::"); |
|
|
|
|
|
//get_args(argc, argv, ¶ms); //commented out while in development |
|
|
//get_args(argc, argv, ¶ms); //commented out while in development |
|
|
init(&vectors, &labels); |
|
|
init(&vectors, &labels); |
|
|
|
|
|
|
|
@ -31,7 +30,6 @@ printf("here::"); |
|
|
|
|
|
|
|
|
// tic |
|
|
// tic |
|
|
gettimeofday (&startwtime, NULL); |
|
|
gettimeofday (&startwtime, NULL); |
|
|
printf("wtf"); |
|
|
|
|
|
iterations = meanshift(vectors, &shifted_points, DEVIATION, ¶ms); |
|
|
iterations = meanshift(vectors, &shifted_points, DEVIATION, ¶ms); |
|
|
|
|
|
|
|
|
// toc |
|
|
// toc |
|
@ -39,9 +37,9 @@ printf("here::"); |
|
|
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); |
|
|
// 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); |
|
|