Lines Matching refs:float4
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()
84 REPORTER_ASSERT(r, all(round(float4{-1.5f,1.5f,1.0f,-1.0f}) == float4{-2.0f,2.0f,1.0f,-1.0f})); in DEF_TEST()
87 REPORTER_ASSERT(r, all(abs(float4{-2,-1,0,1}) == float4{2,1,0,1})); in DEF_TEST()
90 REPORTER_ASSERT(r, all( sqrt(float4{2,3,4,5}) < float4{2,2,3,3})); in DEF_TEST()
93 REPORTER_ASSERT(r, all(skvx::cast<int>(float4{-1.5f,0.5f,1.0f,1.5f}) == int4{-1,0,1,1})); in DEF_TEST()
96 REPORTER_ASSERT(r, all(float4::Load(buf) == float4{1,2,3,4})); in DEF_TEST()
97 float4{2,3,4,5}.store(buf); in DEF_TEST()
104 REPORTER_ASSERT(r, all(float4::Load(buf+0) == float4{2,3,4,5})); in DEF_TEST()
105 REPORTER_ASSERT(r, all(float4::Load(buf+2) == float4{4,5,5,6})); in DEF_TEST()
107 REPORTER_ASSERT(r, all(skvx::shuffle<2,1,0,3> (float4{1,2,3,4}) == float4{3,2,1,4})); in DEF_TEST()
108 REPORTER_ASSERT(r, all(skvx::shuffle<2,1> (float4{1,2,3,4}) == float2{3,2})); in DEF_TEST()
109 REPORTER_ASSERT(r, all(skvx::shuffle<3,3,3,3> (float4{1,2,3,4}) == float4{4,4,4,4})); in DEF_TEST()
110 REPORTER_ASSERT(r, all(skvx::shuffle<2,1,2,1,2,1,2,1>(float4{1,2,3,4}) in DEF_TEST()
114 REPORTER_ASSERT(r, all(float4{1,2,3,4} < 5)); in DEF_TEST()
117 float4 five = 5; in DEF_TEST()
121 REPORTER_ASSERT(r, all(max(2, min(float4{1,2,3,4}, 3)) == float4{2,2,3,3})); in DEF_TEST()