#ifndef _NEARESTNEIGHBOR #define _NEARESTNEIGHBOR #include #include #include #include #include #include // All OpenCL headers #if defined (__APPLE__) || defined(MACOSX) #include #else #include #endif #include "clutils.h" //#include "utils.h" #include #define REC_LENGTH 49 // size of a record in db typedef struct latLong { float lat; float lng; } LatLong; typedef struct record { char recString[REC_LENGTH]; float distance; } Record; float *OpenClFindNearestNeighbors( cl_context context, int numRecords, std::vector &locations,float lat,float lng, int timing); int loadData(char *filename,std::vector &records,std::vector &locations); void findLowest(std::vector &records,float *distances,int numRecords,int topN); void printUsage(); int parseCommandline(int argc, char *argv[], char* filename,int *r,float *lat,float *lng, int *q, int *t, int *p, int *d, int *g); #endif