Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > SSR > SSR__KMeans__Bench
diff kmeans.h @ 0:0ce47c784647
Initial commit
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Tue, 27 Sep 2011 15:08:02 +0200 |
| parents | |
| children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/kmeans.h Tue Sep 27 15:08:02 2011 +0200 1.3 @@ -0,0 +1,35 @@ 1.4 +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 1.5 +/* File: kmeans.h (an OpenMP version) */ 1.6 +/* Description: header file for a simple k-means clustering program */ 1.7 +/* */ 1.8 +/* Author: Wei-keng Liao */ 1.9 +/* ECE Department Northwestern University */ 1.10 +/* email: wkliao@ece.northwestern.edu */ 1.11 +/* Copyright, 2005, Wei-keng Liao */ 1.12 +/* */ 1.13 +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 1.14 + 1.15 +#ifndef _H_KMEANS 1.16 +#define _H_KMEANS 1.17 + 1.18 +#include <assert.h> 1.19 +#include "SSR_lib/SSR.h" 1.20 + 1.21 +struct call_data{ 1.22 + int is_perform_atomic; /* in: */ 1.23 + double **objects; /* in: [numObjs][numCoords] */ 1.24 + int numCoords; /* no. coordinates */ 1.25 + int numObjs; /* no. objects */ 1.26 + int numClusters; /* no. clusters */ 1.27 + double threshold; /* % objects change membership */ 1.28 + int *membership; 1.29 + double **clusters; 1.30 +}; 1.31 + 1.32 +void kmeans(void *data, VirtProcr *VProc); 1.33 + 1.34 +double** file_read(int, char*, int*, int*); 1.35 + 1.36 +double wtime(void); 1.37 + 1.38 +#endif
