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

error: C-style cast from 'double' to '__m128d' #98

Open
yurivict opened this issue Sep 5, 2019 · 0 comments
Open

error: C-style cast from 'double' to '__m128d' #98

yurivict opened this issue Sep 5, 2019 · 0 comments

Comments

@yurivict
Copy link

yurivict commented Sep 5, 2019

clang8 on FreeBSD complains:

/usr/ports/math/seexpr/work/SeExpr-3.0.0/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/math/seexpr/work/SeExpr-3.0.0/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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant