More workarounds for __m128.

This commit is contained in:
sephiroth99 2015-09-22 03:00:37 -04:00 committed by Ben Vanik
parent 7e58ad2800
commit 7fb4fd2790
1 changed files with 4 additions and 2 deletions

View File

@ -71,8 +71,10 @@ inline std::string to_hex_string(const __m128& value) {
inline std::string to_string(const __m128& value) { inline std::string to_string(const __m128& value) {
char buffer[128]; char buffer[128];
std::snprintf(buffer, sizeof(buffer), "(%F, %F, %F, %F)", value.m128_f32[0], float f[4];
value.m128_f32[1], value.m128_f32[2], value.m128_f32[3]); _mm_storeu_ps(f, value);
std::snprintf(buffer, sizeof(buffer), "(%F, %F, %F, %F)", f[0], f[1], f[2],
f[3]);
return std::string(buffer); return std::string(buffer);
} }