Commit 109806a0 authored by Cabaret Laurent's avatar Cabaret Laurent
Browse files

CHECK_VALUES is now a define

parent 329263d1
......@@ -149,8 +149,7 @@ void OutputResult(void)
fclose(fp);
// To uncomment when using the synthetic dataset specified in our paper
/*
#if CHECK_VALUES
NumError = 0.0;
for (int i = 0; i < NbClusters; i++) {
for (int j = 0; j < NbDims; j++) {
......@@ -162,7 +161,7 @@ void OutputResult(void)
}
}
NumError = NumError / (NbDims*NbClusters);
*/
#endif
// Free dynamic allocations
......@@ -351,8 +350,9 @@ void PrintResultsAndPerf(void)
// fprintf(stdout," Time of writing clustering results: %f s\n", (float) Ts_output);
// fprintf(stdout," Total elapsed time of the app.: %f s\n", (float) Ts_application);
// To uncomment the following code when using the synthetic dataset specified in our paper
// fprintf(stdout," Average numerical error of final calculated centroids: %lf\n", NumError);
#if CHECK_VALUES
fprintf(stdout," Average numerical error of final calculated centroids: %lf\n", NumError);
#endif
fflush(stdout);
}
......@@ -9,6 +9,10 @@
#define INPUT_DATA "./datasets/SyntheticDataset.txt"
#define INPUT_INITIAL_CENTROIDS "" // Optional
// Check values
#define CHECK_VALUES 1
// Adjustable block size
// - For ComputeAssign kernel
#define BSXN 128 // BLOCK_SIZE_X related to NbPoints (BSXN has to be in [32, 1024] & divisible by 32)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment