Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix windows error #63

Merged
merged 2 commits into from
Feb 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tests/reflection/reflection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@

#include <fstream>

// #define VR_WRITE_TO_FILE

using namespace viennaray;

int main() {

using NumericType = double;
constexpr int N = 50000;
constexpr int N = 5000;
RNG rngState(12351263);
Timer timer;

Expand All @@ -28,11 +30,13 @@ int main() {
<< " diffuse reflections: " << timer.currentDuration * 1e-6
<< " ms" << std::endl;

#ifdef VR_WRITE_TO_FILE
std::ofstream file("diffuse_reflection.txt");
for (auto const &dir : directions) {
file << dir[0] << " " << dir[1] << " " << dir[2] << std::endl;
}
file.close();
#endif
}

Vec3D<NumericType> normal = {0.0, 0.0, 1.0};
Expand Down Expand Up @@ -61,11 +65,13 @@ int main() {
<< " coned specular reflections: " << timer.currentDuration * 1e-6
<< " ms" << std::endl;

#ifdef VR_WRITE_TO_FILE
std::ofstream file("coned_specular_reflection.txt");
for (auto const &dir : directions) {
file << dir[0] << " " << dir[1] << " " << dir[2] << std::endl;
}
file.close();
#endif
}

{
Expand All @@ -82,11 +88,13 @@ int main() {
std::cout << "Time for " << N << " coned specular reflections (old): "
<< timer.currentDuration * 1e-6 << " ms" << std::endl;

#ifdef VR_WRITE_TO_FILE
std::ofstream file("coned_specular_reflection_old.txt");
for (auto const &dir : directions) {
file << dir[0] << " " << dir[1] << " " << dir[2] << std::endl;
}
file.close();
#endif
}

return 0;
Expand Down
Loading