wdas / SeExpr

SeExpr is an embeddable, arithmetic expression language that enables flexible artistic control and customization in creating computer graphics images. Example uses include procedural geometry synthesis, image synthesis, simulation control, crowd animation, and geometry deformation. https://wdas.github.io/SeExpr
https://www.disneyanimation.com/open-source/seexpr/
Other
405 stars 86 forks source link

Build breaks on FreeBSD: error: C-style cast from 'double' to '__m128d' (vector of 2 'double' values) is not allowed #97

Closed yurivict closed 5 years ago

yurivict commented 5 years ago

clang-8 complains:

/usr/ports/graphics/seexpr/work/SeExpr-3.0.0-2-g75f3934/src/SeExpr2/Noise.cpp:31:45: error: C-style cast from 'double' to '__m128d' (vector of 2 'double' values) is not allowed
inline double floorSSE(double val) { return _mm_floor_sd(_mm_set_sd(0.0), _mm_set_sd(val))[0]; }
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/clang/8.0.0/include/smmintrin.h:215:30: note: expanded from macro '_mm_floor_sd'
#define _mm_floor_sd(X, Y)   _mm_round_sd((X), (Y), _MM_FROUND_FLOOR)
                             ^
/usr/lib/clang/8.0.0/include/smmintrin.h:364:3: note: expanded from macro '_mm_round_sd'
  (__m128d)__builtin_ia32_roundsd((__v2df)(__m128d)(X), \
  ^
/usr/ports/graphics/seexpr/work/SeExpr-3.0.0-2-g75f3934/src/SeExpr2/Noise.cpp:34:12: error: C-style cast from 'double' to '__m128d' (vector of 2 'double' values) is not allowed
    return _mm_round_sd(_mm_set_sd(0.0), _mm_set_sd(val), _MM_FROUND_TO_NEAREST_INT)[0];
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/clang/8.0.0/include/smmintrin.h:364:3: note: expanded from macro '_mm_round_sd'
  (__m128d)__builtin_ia32_roundsd((__v2df)(__m128d)(X), \
  ^
2 errors generated.