Swapping around vec128 to match AVX order.

Was really hoping all this would fix some bugs, but no luck :(
This commit is contained in:
Ben Vanik
2014-08-29 20:39:26 -07:00
parent 8ca7642226
commit f74aafeb8a
27 changed files with 2845 additions and 821 deletions

View File

@@ -12,6 +12,7 @@
#include <xmmintrin.h>
#include <algorithm>
#include <cstdint>
#include <cstring>
#include <type_traits>
@@ -38,6 +39,10 @@ T round_up(T value, V multiple) {
return value + multiple - 1 - (value - 1) % multiple;
}
inline float saturate(float value) {
return std::max(std::min(1.0f, value), -1.0f);
}
// Gets the next power of two value that is greater than or equal to the given
// value.
template <typename T>