Lines Matching refs:SIMD

48 		SIMD::Float v = lhs.Float(i) * rhs.Float(0);  in EmitMatrixTimesVector()
68 SIMD::Float v = lhs.Float(0) * rhs.Float(i * lhs.componentCount); in EmitVectorTimesMatrix()
94 SIMD::Float v = SIMD::Float(0); in EmitMatrixTimesMatrix()
166 auto one = SIMD::UInt(1); in EmitUnaryOp()
177 auto one = SIMD::UInt(1); in EmitUnaryOp()
179 SIMD::UInt out = (v >> offset) & Bitmask32(count); in EmitUnaryOp()
195 SIMD::UInt v = src.UInt(i); in EmitUnaryOp()
196 v = ((v >> 1) & SIMD::UInt(0x55555555)) | ((v & SIMD::UInt(0x55555555)) << 1); in EmitUnaryOp()
197 v = ((v >> 2) & SIMD::UInt(0x33333333)) | ((v & SIMD::UInt(0x33333333)) << 2); in EmitUnaryOp()
198 v = ((v >> 4) & SIMD::UInt(0x0F0F0F0F)) | ((v & SIMD::UInt(0x0F0F0F0F)) << 4); in EmitUnaryOp()
199 v = ((v >> 8) & SIMD::UInt(0x00FF00FF)) | ((v & SIMD::UInt(0x00FF00FF)) << 8); in EmitUnaryOp()
214 dst.move(i, SIMD::UInt(src.Float(i))); in EmitUnaryOp()
217 dst.move(i, SIMD::Int(src.Float(i))); in EmitUnaryOp()
220 dst.move(i, SIMD::Float(src.Int(i))); in EmitUnaryOp()
223 dst.move(i, SIMD::Float(src.UInt(i))); in EmitUnaryOp()
239 …static_assert(SIMD::Width == 4, "All cross-lane instructions will need care when using a different… in EmitUnaryOp()
240 dst.move(i, SIMD::Float(Extract(src.Float(i), 1) - Extract(src.Float(i), 0))); in EmitUnaryOp()
244 dst.move(i, SIMD::Float(Extract(src.Float(i), 2) - Extract(src.Float(i), 0))); in EmitUnaryOp()
248 …dst.move(i, SIMD::Float(Abs(Extract(src.Float(i), 1) - Extract(src.Float(i), 0)) + Abs(Extract(src… in EmitUnaryOp()
254 SIMD::Float v = SIMD::Float(firstRow); in EmitUnaryOp()
264 SIMD::Float v = SIMD::Float(firstColumn); in EmitUnaryOp()
274 SIMD::Float dpdx = SIMD::Float(firstRow); in EmitUnaryOp()
279 SIMD::Float dpdy = SIMD::Float(firstColumn); in EmitUnaryOp()
289 auto sign = src.Int(i) & SIMD::Int(0x80000000); in EmitUnaryOp()
290 auto isZero = CmpLT(abs, SIMD::Float(0.000061035f)); in EmitUnaryOp()
291 auto isInf = CmpGT(abs, SIMD::Float(65504.0f)); in EmitUnaryOp()
294 SIMD::Int v = src.Int(i) & SIMD::Int(0xFFFFE000); in EmitUnaryOp()
295 v &= ~isZero | SIMD::Int(0x80000000); in EmitUnaryOp()
296 v = sign | (isInfOrNan & SIMD::Int(0x7F800000)) | (~isInfOrNan & v); in EmitUnaryOp()
297 v |= isNaN & SIMD::Int(0x400000); in EmitUnaryOp()
332 SIMD::Int a = lhs.Int(i); in EmitBinaryOp()
333 SIMD::Int b = rhs.Int(i); in EmitBinaryOp()
334 b = b | CmpEQ(b, SIMD::Int(0)); // prevent divide-by-zero in EmitBinaryOp()
335 … a = a | (CmpEQ(a, SIMD::Int(0x80000000)) & CmpEQ(b, SIMD::Int(-1))); // prevent integer overflow in EmitBinaryOp()
341 auto zeroMask = As<SIMD::UInt>(CmpEQ(rhs.Int(i), SIMD::Int(0))); in EmitBinaryOp()
347 SIMD::Int a = lhs.Int(i); in EmitBinaryOp()
348 SIMD::Int b = rhs.Int(i); in EmitBinaryOp()
349 b = b | CmpEQ(b, SIMD::Int(0)); // prevent divide-by-zero in EmitBinaryOp()
350 … a = a | (CmpEQ(a, SIMD::Int(0x80000000)) & CmpEQ(b, SIMD::Int(-1))); // prevent integer overflow in EmitBinaryOp()
356 SIMD::Int a = lhs.Int(i); in EmitBinaryOp()
357 SIMD::Int b = rhs.Int(i); in EmitBinaryOp()
358 b = b | CmpEQ(b, SIMD::Int(0)); // prevent divide-by-zero in EmitBinaryOp()
359 … a = a | (CmpEQ(a, SIMD::Int(0x80000000)) & CmpEQ(b, SIMD::Int(-1))); // prevent integer overflow in EmitBinaryOp()
367 auto signDiff = CmpNEQ(CmpGE(a, SIMD::Int(0)), CmpGE(b, SIMD::Int(0))); in EmitBinaryOp()
368 auto fixedMod = mod + (b & CmpNEQ(mod, SIMD::Int(0)) & signDiff); in EmitBinaryOp()
369 dst.move(i, As<SIMD::Float>(fixedMod)); in EmitBinaryOp()
374 auto zeroMask = As<SIMD::UInt>(CmpEQ(rhs.Int(i), SIMD::Int(0))); in EmitBinaryOp()
534 SIMD::Float SpirvShader::Dot(unsigned numComponents, Operand const &x, Operand const &y) const in Dot()
536 SIMD::Float d = x.Float(0) * y.Float(0); in Dot()
546 std::pair<SIMD::Float, SIMD::Int> SpirvShader::Frexp(RValue<SIMD::Float> val) const in Frexp()
549 auto v = As<SIMD::UInt>(val); in Frexp()
550 auto isNotZero = CmpNEQ(v & SIMD::UInt(0x7FFFFFFF), SIMD::UInt(0)); in Frexp()
551 auto zeroSign = v & SIMD::UInt(0x80000000) & ~isNotZero; in Frexp()
552 …auto significand = As<SIMD::Float>((((v & SIMD::UInt(0x807FFFFF)) | SIMD::UInt(0x3F000000)) & isNo… in Frexp()
553 auto exponent = Exponent(val) & SIMD::Int(isNotZero); in Frexp()