#include #include #include "knnSerialDeclarations.h" /* Structs */ struct timeval startwtime, endwtime; double seq_time; /* Global variable */ int numberOfPoints = 0, numberOfDimensions = 0, numberOfNeighbors = 0, direction = 0; char *pointsFilename, *testFilename; /* Main */ int main(int argc, char **argv){ double **pointsArray; neighbor **sortedNeighborsArray; getArguments(argc, argv); init(&pointsArray, &sortedNeighborsArray); gettimeofday(&startwtime, NULL); calculateDistances(&pointsArray, &pointsArray, &sortedNeighborsArray); gettimeofday(&endwtime, NULL); seq_time = (double)((endwtime.tv_usec - startwtime.tv_usec)/1.0e6 + endwtime.tv_sec - startwtime.tv_sec); printf("Wall clock time = %f\n\n", seq_time); if (test(&sortedNeighborsArray, testFilename)){ printf("Validity check failed!\n"); } else { printf("Validity check success!\n"); } /* Uncomment to print the results */ /*for (int x=0; x