mitsuba-renderer / enoki

Enoki: structured vectorization and differentiation on modern processor architectures
Other
1.26k stars 94 forks source link

Missing algorithm header in autodiff.cpp #100

Closed dasmysh closed 4 years ago

dasmysh commented 4 years ago

There seems to be a missing header file in https://github.com/mitsuba-renderer/enoki/blob/master/src/autodiff/autodiff.cpp

In the current version I get the compiler error telling me that std::sort is not known. I fixed this locally by adding #include <algorithm> after line 23.

I use Visual Studio 16.7.0 Preview 3.1 and compile enoki as part of mitsuba 2.

Speierers commented 4 years ago

Interseting, I do not have this issue on my end. Is this on latest master? We added #include <algorithm> to horiz.cu and jit.cu a while ago. Please let me know if this is still and issue.

dasmysh commented 4 years ago

I did not test enoki without mitsuba 2. I was on the latest master of mitsuba 2 back then, updated again now (enoki did not change). The issue is still the same. I also updated enoki to the latest master, had the same problem.

The issue is only with compiling autodiff.cpp, so the changes to horiz.cu and jit.cu will not have an effect I think.

I am not sure if this is connected but I think I read in some patch notes that VS removed some incorrect cross references in the STL headers. Maybe this is due to the very recent VS Preview version I am using and it will only become a problem in non-preview in the next stable.

Speierers commented 4 years ago

Ok, this should be fixed now: e90d58c