Commented out some debug code
This commit is contained in:
parent
2c6594244e
commit
98055642bd
36
src/main.cu
36
src/main.cu
|
|
@ -79,25 +79,25 @@ int main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store the half-way up slice data into a file TODO: Remove this debug
|
// // Store the half-way up slice data into a file TODO: Remove this debug
|
||||||
std::ofstream myfile;
|
// std::ofstream myfile;
|
||||||
myfile.open("halfwayup.txt");
|
// myfile.open("halfwayup.txt");
|
||||||
for (int i = 0; i < VOLUME_WIDTH; i++) {
|
// for (int i = 0; i < VOLUME_WIDTH; i++) {
|
||||||
for (int j = 0; j < VOLUME_HEIGHT; j++) {
|
// for (int j = 0; j < VOLUME_HEIGHT; j++) {
|
||||||
myfile << hostVolume[i + j*VOLUME_WIDTH + VOLUME_DEPTH/2*VOLUME_WIDTH*VOLUME_HEIGHT] << " ";
|
// myfile << hostVolume[i + j*VOLUME_WIDTH + VOLUME_DEPTH/2*VOLUME_WIDTH*VOLUME_HEIGHT] << " ";
|
||||||
}
|
// }
|
||||||
myfile << std::endl;
|
// myfile << std::endl;
|
||||||
}
|
// }
|
||||||
myfile.close();
|
// myfile.close();
|
||||||
|
|
||||||
// Print min, max, avg., and median values TODO: Remove this debug
|
// // Print min, max, avg., and median values TODO: Remove this debug
|
||||||
float minVal = *std::min_element(hostVolume, hostVolume + VOLUME_WIDTH * VOLUME_HEIGHT * VOLUME_DEPTH, [](float a, float b) {
|
// float minVal = *std::min_element(hostVolume, hostVolume + VOLUME_WIDTH * VOLUME_HEIGHT * VOLUME_DEPTH, [](float a, float b) {
|
||||||
if (a <= epsilon) return false;
|
// if (a <= epsilon) return false;
|
||||||
if (b <= epsilon) return true;
|
// if (b <= epsilon) return true;
|
||||||
return a < b;
|
// return a < b;
|
||||||
});
|
// });
|
||||||
float maxVal = *std::max_element(hostVolume, hostVolume + VOLUME_WIDTH * VOLUME_HEIGHT * VOLUME_DEPTH);
|
// float maxVal = *std::max_element(hostVolume, hostVolume + VOLUME_WIDTH * VOLUME_HEIGHT * VOLUME_DEPTH);
|
||||||
std::cout << "minVal: " << minVal << " maxVal: " << maxVal << std::endl;
|
// std::cout << "minVal: " << minVal << " maxVal: " << maxVal << std::endl;
|
||||||
// // print min, max, avg., and median values <--- the code actually does not work when this snippet is enabled so probably TODO: Delete this later
|
// // print min, max, avg., and median values <--- the code actually does not work when this snippet is enabled so probably TODO: Delete this later
|
||||||
// std::sort(hostVolume, hostVolume + VOLUME_WIDTH * VOLUME_HEIGHT * VOLUME_DEPTH);
|
// std::sort(hostVolume, hostVolume + VOLUME_WIDTH * VOLUME_HEIGHT * VOLUME_DEPTH);
|
||||||
// float sum = std::accumulate(hostVolume, hostVolume + VOLUME_WIDTH * VOLUME_HEIGHT * VOLUME_DEPTH, 0.0f);
|
// float sum = std::accumulate(hostVolume, hostVolume + VOLUME_WIDTH * VOLUME_HEIGHT * VOLUME_DEPTH, 0.0f);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue