NVIDIAGameWorks/RayTracingDenoiser

Intrinsics like _mm_sincos_ps undeclared

vongkitt opened this issue · 4 comments

Hi,

Using Visual Studio 2019 Clang integration, I cannot seem to build the NRD library.
I keep getting this error

error : use of undeclared identifier '_mm_sincos_ps'; did you mean '_mm_min_ps'? 
error : use of undeclared identifier '_mm_tan_ps' 
error : use of undeclared identifier '_mm_tan_ps' 
error : use of undeclared identifier '_mm_asin_ps' 
error : use of undeclared identifier '_mm_asin_ps' 
 ...

Any extra architecture I should set via cmake ?

Hi! It should be related to PLATFORM_HAS_TRANSCENDENTAL_INTRINSICS. VS 2019 has them, but it looks like CLANG does not. I don't have CLANG on hands, but I believe that artificially setting PLATFORM_HAS_TRANSCENDENTAL_INTRINSICS to 0 should fix the issue (intrinsics will be emulated).

Thank you I had to edit mathlib/platform.h but that did the trick.

I will find a way to fix it properly. Thanks for sharing this!

That's the solution:

#define PLATFORM_HAS_TRANSCENDENTAL_INTRINSICS          (_MSC_VER >= 1920 && __clang__ == 0)

I will commit this fix soon.