- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sory, don't undestand much SSE, but why this constructor was commented:
__forceinline ssef ( float a ) : m128(_mm_set1_ps(a)) {}
and now this one is used:
__forceinline ssef ( const float& a ) : m128(_mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(_mm_load_ss(&a)), _MM_SHUFFLE(0, 0, 0, 0)))) {}
The other constructors are still using _mm_set_ps().
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think the commented out version should be the better choice, as it does not enforce reading the float from memory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, thanks for clearing that out. The actual problem I had is that I must be able to pass also doubles there. And since I'm a SSE noob, I really don't like such exotic code there :). Will restore the old constructor with clear conscious now :).

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page