You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.0 KiB
39 lines
1.0 KiB
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <sys/time.h>
|
|
|
|
#include "serial_declarations.h"
|
|
|
|
int DEVIATION = 20;
|
|
int NUMBER_OF_POINTS = 1024;
|
|
int DIMENSIONS = 32;
|
|
char* POINTS_FILENAME = "../data/32";
|
|
char* LABELS_FILENAME = "../data/L.bin";
|
|
|
|
struct timeval startwtime, endwtime;
|
|
double seq_time;
|
|
|
|
int main(int argc, char **argv){
|
|
double **vectors, **shifted_points;
|
|
char *labels;
|
|
parameters params;
|
|
|
|
//get_args(argc, argv); commented out while in development
|
|
init(&vectors, &labels, ¶ms);
|
|
|
|
//save_matrix(vectors, 0);
|
|
|
|
// tic
|
|
gettimeofday (&startwtime, NULL);
|
|
|
|
int iterations = meanshift(vectors, &shifted_points, DEVIATION, ¶ms);
|
|
printf("Total iterations = %d\n", iterations);
|
|
|
|
// toc
|
|
gettimeofday (&endwtime, NULL);
|
|
seq_time = (double)((endwtime.tv_usec - startwtime.tv_usec)/1.0e6 + endwtime.tv_sec - startwtime.tv_sec);
|
|
printf("%s wall clock time = %f\n","Mean Shift", seq_time);
|
|
|
|
//TODO write output points to file -> plot later
|
|
//save_matrix(shifted_points, iterations);
|
|
}
|
|
|