msach@0: /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ msach@0: /* File: kmeans.h (an OpenMP version) */ msach@0: /* Description: header file for a simple k-means clustering program */ msach@0: /* */ msach@0: /* Author: Wei-keng Liao */ msach@0: /* ECE Department Northwestern University */ msach@0: /* email: wkliao@ece.northwestern.edu */ msach@0: /* Copyright, 2005, Wei-keng Liao */ msach@0: /* */ msach@0: /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ msach@0: msach@0: #ifndef _H_KMEANS msach@0: #define _H_KMEANS msach@0: msach@0: #include msach@1: #include "VPThread_lib/VPThread.h" msach@0: msach@1: struct call_data{ msach@1: int is_perform_atomic; /* in: */ msach@1: double **objects; /* in: [numObjs][numCoords] */ msach@1: int numCoords; /* no. coordinates */ msach@1: int numObjs; /* no. objects */ msach@1: int numClusters; /* no. clusters */ msach@1: double threshold; /* % objects change membership */ msach@1: int *membership; msach@1: double **clusters; msach@1: }; msach@1: msach@1: void pthreads_kmeans(void *data, VirtProcr *VProc); msach@0: msach@0: double** file_read(int, char*, int*, int*); msach@0: msach@0: double wtime(void); msach@0: msach@0: #endif