/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*   File:         kmeans.h   (an OpenMP version)                            */
/*   Description:  header file for a simple k-means clustering program       */
/*                                                                           */
/*   Author:  Wei-keng Liao                                                  */
/*            ECE Department Northwestern University                         */
/*            email: wkliao@ece.northwestern.edu                             */
/*   Copyright, 2005, Wei-keng Liao                                          */
/*                                                                           */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#ifndef _H_KMEANS
#define _H_KMEANS

#include <assert.h>
#include "VPThread_lib/VPThread.h"

struct call_data{
    int is_perform_atomic; 	/* in: */
    double **objects;          	/* in: [numObjs][numCoords] */
    int     numCoords;         	/* no. coordinates */
    int     numObjs;           	/* no. objects */
    int     numClusters;       	/* no. clusters */
    double   threshold;         	/* % objects change membership */
    int    *membership;
    double **clusters;
};

void pthreads_kmeans(void *data, VirtProcr *VProc);

double** file_read(int, char*, int*, int*);

double  wtime(void);

#endif
