D | SkVxTest.cpp | 12 using float4 = skvx::Vec<4,float>; typedef 34 static_assert(sizeof(float4) == 16, ""); in DEF_TEST() 42 int4 mask = float4{1,2,3,4} < float4{1,2,4,8}; in DEF_TEST() 63 REPORTER_ASSERT(r, min(float4{1,2,3,4}) == 1); in DEF_TEST() 64 REPORTER_ASSERT(r, max(float4{1,2,3,4}) == 4); in DEF_TEST() 78 REPORTER_ASSERT(r, all(if_then_else(float4{1,2,3,2} <= float4{2,2,2,2}, float4(42), float4(47)) in DEF_TEST() 79 == float4{42,42,47,42})); in DEF_TEST() 81 REPORTER_ASSERT(r, all(floor(float4{-1.5f,1.5f,1.0f,-1.0f}) == float4{-2.0f,1.0f,1.0f,-1.0f})); in DEF_TEST() 82 REPORTER_ASSERT(r, all( ceil(float4{-1.5f,1.5f,1.0f,-1.0f}) == float4{-1.0f,2.0f,1.0f,-1.0f})); in DEF_TEST() 83 REPORTER_ASSERT(r, all(trunc(float4{-1.5f,1.5f,1.0f,-1.0f}) == float4{-1.0f,1.0f,1.0f,-1.0f})); in DEF_TEST() [all …]
|