int main() { //__m128 DataA = swizzle<X, Y, Z, W>(glm::vec4(1.0f, 2.0f, 3.0f, 4.0f)); //__m128 DataB = swizzle<W, Z, Y, X>(glm::vec4(1.0f, 2.0f, 3.0f, 4.0f)); int Error = 0; Error += test_vec4_ctor(); Error += test_vec4_size(); Error += test_vec4_operators(); Error += test_hvec4(); Error += test_vec4_swizzle_partial(); return Error; }
int main() { int Error(0); std::size_t const Size(1000000); # ifdef NDEBUG Error += test_vec4_perf_AoS(Size); Error += test_vec4_perf_SoA(Size); # endif//NDEBUG Error += test_vec4_ctor(); Error += test_vec4_size(); Error += test_vec4_operators(); Error += test_vec4_swizzle_partial(); Error += test_operator_increment(); return Error; }
int main() { int Error(0); /* { glm::ivec4 const a1(2); glm::ivec4 const b1 = a1 >> 1; __m128i const e1 = _mm_set1_epi32(2); __m128i const f1 = _mm_srli_epi32(e1, 1); glm::ivec4 const g1 = *reinterpret_cast<glm::ivec4 const* const>(&f1); glm::ivec4 const a2(-2); glm::ivec4 const b2 = a2 >> 1; __m128i const e2 = _mm_set1_epi32(-1); __m128i const f2 = _mm_srli_epi32(e2, 1); glm::ivec4 const g2 = *reinterpret_cast<glm::ivec4 const* const>(&f2); printf("GNI\n"); } { glm::uvec4 const a1(2); glm::uvec4 const b1 = a1 >> 1u; __m128i const e1 = _mm_set1_epi32(2); __m128i const f1 = _mm_srli_epi32(e1, 1); glm::uvec4 const g1 = *reinterpret_cast<glm::uvec4 const* const>(&f1); glm::uvec4 const a2(-1); glm::uvec4 const b2 = a2 >> 1u; __m128i const e2 = _mm_set1_epi32(-1); __m128i const f2 = _mm_srli_epi32(e2, 1); glm::uvec4 const g2 = *reinterpret_cast<glm::uvec4 const* const>(&f2); printf("GNI\n"); } */ glm::vec4 v; assert(v.length() == 4); # ifdef NDEBUG std::size_t const Size(1000000); Error += test_vec4_perf_AoS(Size); Error += test_vec4_perf_SoA(Size); # endif//NDEBUG Error += test_vec4_ctor(); Error += test_bvec4_ctor(); Error += test_vec4_size(); Error += test_vec4_operators(); Error += test_vec4_swizzle_partial(); Error += test_vec4_simd(); Error += test_operator_increment(); Error += heap::test(); return Error; }