Lines Matching refs:float4
12 using float4 = skvx::Vec<4,float>; typedef
34 float4 Sqrt(float4 x) { return sqrt(x); } in Sqrt()
37 float4 RSqrt(float4 x) { return rsqrt(x); } in RSqrt()
38 float4 Rcp(float4 x) { return rcp(x); } in Rcp()
39 float4 Ceil(float4 x) { return ceil(x); } in Ceil()
40 float4 Floor(float4 x) { return floor(x); } in Floor()
41 float4 Trunc(float4 x) { return trunc(x); } in Trunc()
42 float4 Round(float4 x) { return round(x); } in Round()
43 float4 Abs(float4 x) { return abs(x); } in Abs()
45 float4 Min(float4 x, float4 y) { return min(x,y); } in Min()
46 float4 Max(float4 x, float4 y) { return max(x,y); } in Max()
48 float4 IfThenElse(int4 c, float4 t, float4 e) { return if_then_else(c,t,e); } in IfThenElse()
52 static_assert(sizeof(float4) == 16, ""); in DEF_TEST()
60 int4 mask = float4{1,2,3,4} < float4{1,2,4,8}; in DEF_TEST()
81 REPORTER_ASSERT(r, min(float4{1,2,3,4}) == 1); in DEF_TEST()
82 REPORTER_ASSERT(r, max(float4{1,2,3,4}) == 4); in DEF_TEST()
96 REPORTER_ASSERT(r, all(if_then_else(float4{1,2,3,2} <= float4{2,2,2,2}, float4(42), float4(47)) in DEF_TEST()
97 == float4{42,42,47,42})); in DEF_TEST()
99 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()
100 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()
101 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()
102 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()
105 REPORTER_ASSERT(r, all(abs(float4{-2,-1,0,1}) == float4{2,1,0,1})); in DEF_TEST()
108 REPORTER_ASSERT(r, all( sqrt(float4{2,3,4,5}) < float4{2,2,3,3})); in DEF_TEST()
109 REPORTER_ASSERT(r, all( rcp(float4{2,3,4,5}) < float4{1.0f,0.5f,0.5f,0.3f})); in DEF_TEST()
110 REPORTER_ASSERT(r, all(rsqrt(float4{2,3,4,5}) < float4{1.0f,1.0f,1.0f,0.5f})); in DEF_TEST()
116 REPORTER_ASSERT(r, all(skvx::cast<int>(float4{-1.5f,0.5f,1.0f,1.5f}) == int4{-1,0,1,1})); in DEF_TEST()
119 REPORTER_ASSERT(r, all(float4::Load(buf) == float4{1,2,3,4})); in DEF_TEST()
120 float4{2,3,4,5}.store(buf); in DEF_TEST()
127 REPORTER_ASSERT(r, all(float4::Load(buf+0) == float4{2,3,4,5})); in DEF_TEST()
128 REPORTER_ASSERT(r, all(float4::Load(buf+2) == float4{4,5,5,6})); in DEF_TEST()
130 REPORTER_ASSERT(r, all(mad(float4{1,2,3,4}, 2.0f, 3.0f) == float4{5,7,9,11})); in DEF_TEST()
132 REPORTER_ASSERT(r, all(skvx::shuffle<2,1,0,3> (float4{1,2,3,4}) == float4{3,2,1,4})); in DEF_TEST()
133 REPORTER_ASSERT(r, all(skvx::shuffle<2,1> (float4{1,2,3,4}) == float2{3,2})); in DEF_TEST()
134 REPORTER_ASSERT(r, all(skvx::shuffle<3,3,3,3> (float4{1,2,3,4}) == float4{4,4,4,4})); in DEF_TEST()
135 REPORTER_ASSERT(r, all(skvx::shuffle<2,1,2,1,2,1,2,1>(float4{1,2,3,4}) in DEF_TEST()
139 REPORTER_ASSERT(r, all(float4{1,2,3,4} < 5)); in DEF_TEST()
142 float4 five = 5; in DEF_TEST()
146 REPORTER_ASSERT(r, all(max(2, min(float4{1,2,3,4}, 3)) == float4{2,2,3,3})); in DEF_TEST()