Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > Vthread > Vthread__KMeans__Bench
annotate kmeans.h @ 2:467746c73fd0
DataSet print
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Wed, 28 Sep 2011 15:07:32 +0200 |
| parents | e69e4c2d612a |
| children |
| rev | line source |
|---|---|
| msach@0 | 1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
| msach@0 | 2 /* File: kmeans.h (an OpenMP version) */ |
| msach@0 | 3 /* Description: header file for a simple k-means clustering program */ |
| msach@0 | 4 /* */ |
| msach@0 | 5 /* Author: Wei-keng Liao */ |
| msach@0 | 6 /* ECE Department Northwestern University */ |
| msach@0 | 7 /* email: wkliao@ece.northwestern.edu */ |
| msach@0 | 8 /* Copyright, 2005, Wei-keng Liao */ |
| msach@0 | 9 /* */ |
| msach@0 | 10 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
| msach@0 | 11 |
| msach@0 | 12 #ifndef _H_KMEANS |
| msach@0 | 13 #define _H_KMEANS |
| msach@0 | 14 |
| msach@0 | 15 #include <assert.h> |
| msach@1 | 16 #include "VPThread_lib/VPThread.h" |
| msach@0 | 17 |
| msach@1 | 18 struct call_data{ |
| msach@1 | 19 int is_perform_atomic; /* in: */ |
| msach@1 | 20 double **objects; /* in: [numObjs][numCoords] */ |
| msach@1 | 21 int numCoords; /* no. coordinates */ |
| msach@1 | 22 int numObjs; /* no. objects */ |
| msach@1 | 23 int numClusters; /* no. clusters */ |
| msach@1 | 24 double threshold; /* % objects change membership */ |
| msach@1 | 25 int *membership; |
| msach@1 | 26 double **clusters; |
| msach@1 | 27 }; |
| msach@1 | 28 |
| msach@1 | 29 void pthreads_kmeans(void *data, VirtProcr *VProc); |
| msach@0 | 30 |
| msach@0 | 31 double** file_read(int, char*, int*, int*); |
| msach@0 | 32 |
| msach@0 | 33 double wtime(void); |
| msach@0 | 34 |
| msach@0 | 35 #endif |
