Lines Matching refs:float4

13 using float4 = skvx::Vec<4,float>;
39 static_assert(sizeof(float4) == 16, "");
47 int4 mask = float4{1,2,3,4} < float4{1,2,4,8};
68 REPORTER_ASSERT(r, min(float4{1,2,3,4}) == 1);
69 REPORTER_ASSERT(r, max(float4{1,2,3,4}) == 4);
83 REPORTER_ASSERT(r, all(if_then_else(float4{1,2,3,2} <= float4{2,2,2,2}, float4(42), float4(47))
84 == float4{42,42,47,42}));
86 REPORTER_ASSERT(r, all(floor(float4{-1.5f,1.5f,1.0f,-1.0f}) == float4{-2.0f,1.0f,1.0f,-1.0f}));
87 REPORTER_ASSERT(r, all( ceil(float4{-1.5f,1.5f,1.0f,-1.0f}) == float4{-1.0f,2.0f,1.0f,-1.0f}));
88 REPORTER_ASSERT(r, all(trunc(float4{-1.5f,1.5f,1.0f,-1.0f}) == float4{-1.0f,1.0f,1.0f,-1.0f}));
89 REPORTER_ASSERT(r, all(round(float4{-1.5f,1.5f,1.0f,-1.0f}) == float4{-2.0f,2.0f,1.0f,-1.0f}));
92 REPORTER_ASSERT(r, all(abs(float4{-2,-1,0,1}) == float4{2,1,0,1}));
95 REPORTER_ASSERT(r, all( sqrt(float4{2,3,4,5}) < float4{2,2,3,3}));
98 REPORTER_ASSERT(r, all(skvx::cast<int>(float4{-1.5f,0.5f,1.0f,1.5f}) == int4{-1,0,1,1}));
101 REPORTER_ASSERT(r, all(float4::Load(buf) == float4{1,2,3,4}));
102 float4{2,3,4,5}.store(buf);
109 REPORTER_ASSERT(r, all(float4::Load(buf+0) == float4{2,3,4,5}));
110 REPORTER_ASSERT(r, all(float4::Load(buf+2) == float4{4,5,5,6}));
112 REPORTER_ASSERT(r, all(skvx::shuffle<2,1,0,3> (float4{1,2,3,4}) == float4{3,2,1,4}));
113 REPORTER_ASSERT(r, all(skvx::shuffle<2,1> (float4{1,2,3,4}) == float2{3,2}));
114 REPORTER_ASSERT(r, all(skvx::shuffle<3,3,3,3> (float4{1,2,3,4}) == float4{4,4,4,4}));
115 REPORTER_ASSERT(r, all(skvx::shuffle<2,1,2,1,2,1,2,1>(float4{1,2,3,4})
119 REPORTER_ASSERT(r, all(float4{1,2,3,4} < 5));
122 float4 five = 5;
126 REPORTER_ASSERT(r, all(max(2, min(float4{1,2,3,4}, 3)) == float4{2,2,3,3}));
195 REPORTER_ASSERT(r, all(f.xyxy() == float4(6,8,6,8)));
196 REPORTER_ASSERT(r, all(f.xyxy() == float4(f,f)));
198 REPORTER_ASSERT(r, all(skvx::join(f.yx(),f) == float4(f.y(),f.x(),f)));
199 REPORTER_ASSERT(r, all(skvx::join(f.yx(),f) == float4(f.yx(),f.x(),f.y())));
200 REPORTER_ASSERT(r, all(skvx::join(f,f.yx()) == float4(f.x(),f.y(),f.yx())));
201 REPORTER_ASSERT(r, all(skvx::join(f.yx(),f.yx()) == float4(f.yx(),f.yx())));
205 float4 f = float4{1,2,3,4};
206 REPORTER_ASSERT(r, all(f == float4(1,2,3,4)));
207 REPORTER_ASSERT(r, all(f == float4(1,2,float2(3,4))));
208 REPORTER_ASSERT(r, all(f == float4(float2(1,2),3,4)));
209 REPORTER_ASSERT(r, all(f == float4(float2(1,2),float2(3,4))));
211 REPORTER_ASSERT(r, all(f == float4(9,8,3,4)));
214 REPORTER_ASSERT(r, all(f == float4(9,8,7,6)));
219 REPORTER_ASSERT(r, all(f == float4(5,4,3,2)));
230 REPORTER_ASSERT(r, all(f == float4(0,1,2,3)));
243 skvx::shuffle<3,2>(float4(0,1,2,3)),
244 float4(4,5,6,7).xy()) == float2(4,2)));
246 skvx::shuffle<3,2>(float4(0,1,2,3)),
247 float4(4,5,6,7).xy()) == float2(4,2)));
249 float4(0,1,2,3).zwxy(),
250 float4(4,5,6,7)) == float4(4,3,6,1)));
252 float4(0,1,2,3).zwxy(),
253 float4(4,5,6,7)) == float4(4,3,6,1)));
255 REPORTER_ASSERT(r, all(skvx::pin(float4(0,1,2,3).yxwz(),
257 float2(2).xyxy()) == float4(1,1,2,2)));
279 float4 boundaries = skvx::approx_acos(float4{-1, 0, 1, 0});