• Home
  • Raw
  • Download

Lines Matching refs:SIMD

561 SIMD::UInt halfToFloatBits(SIMD::UInt halfBits)  in halfToFloatBits()
563 auto magic = SIMD::UInt(126 << 23); in halfToFloatBits()
565 auto sign16 = halfBits & SIMD::UInt(0x8000); in halfToFloatBits()
566 auto man16 = halfBits & SIMD::UInt(0x03FF); in halfToFloatBits()
567 auto exp16 = halfBits & SIMD::UInt(0x7C00); in halfToFloatBits()
569 auto isDnormOrZero = CmpEQ(exp16, SIMD::UInt(0)); in halfToFloatBits()
570 auto isInfOrNaN = CmpEQ(exp16, SIMD::UInt(0x7C00)); in halfToFloatBits()
574 auto exp32 = (exp16 + SIMD::UInt(0x1C000)) << 13; in halfToFloatBits()
575 auto norm32 = (man32 | exp32) | (isInfOrNaN & SIMD::UInt(0x7F800000)); in halfToFloatBits()
577 auto denorm32 = As<SIMD::UInt>(As<SIMD::Float>(magic + man16) - As<SIMD::Float>(magic)); in halfToFloatBits()
582 SIMD::UInt floatToHalfBits(SIMD::UInt floatBits, bool storeInUpperBits) in floatToHalfBits()
584 SIMD::UInt sign = floatBits & SIMD::UInt(0x80000000); in floatToHalfBits()
585 SIMD::UInt abs = floatBits & SIMD::UInt(0x7FFFFFFF); in floatToHalfBits()
587 SIMD::UInt normal = CmpNLE(abs, SIMD::UInt(0x38800000)); in floatToHalfBits()
589 SIMD::UInt mantissa = (abs & SIMD::UInt(0x007FFFFF)) | SIMD::UInt(0x00800000); in floatToHalfBits()
590 SIMD::UInt e = SIMD::UInt(113) - (abs >> 23); in floatToHalfBits()
591 SIMD::UInt denormal = CmpLT(e, SIMD::UInt(24)) & (mantissa >> e); in floatToHalfBits()
593 SIMD::UInt base = (normal & abs) | (~normal & denormal); // TODO: IfThenElse() in floatToHalfBits()
596 SIMD::UInt bias = normal & SIMD::UInt(0xC8000000); in floatToHalfBits()
598 SIMD::UInt rounded = base + bias + SIMD::UInt(0x00000FFF) + ((base >> 13) & SIMD::UInt(1)); in floatToHalfBits()
599 SIMD::UInt fp16u = rounded >> 13; in floatToHalfBits()
602 fp16u |= CmpNLE(abs, SIMD::UInt(0x47FFEFFF)) & SIMD::UInt(0x7FFF); in floatToHalfBits()
671 rr::RValue<rr::Bool> AnyTrue(rr::RValue<sw::SIMD::Int> const &ints) in AnyTrue()
676 rr::RValue<rr::Bool> AnyFalse(rr::RValue<sw::SIMD::Int> const &ints) in AnyFalse()
681 rr::RValue<sw::SIMD::Float> Sign(rr::RValue<sw::SIMD::Float> const &val) in Sign()
683 …return rr::As<sw::SIMD::Float>((rr::As<sw::SIMD::UInt>(val) & sw::SIMD::UInt(0x80000000)) | sw::SI… in Sign()
688 std::pair<rr::RValue<sw::SIMD::Float>, rr::RValue<sw::SIMD::Float>>
689 Modf(rr::RValue<sw::SIMD::Float> const &val) in Modf()
699 sw::SIMD::UInt CountBits(rr::RValue<sw::SIMD::UInt> const &bits) in CountBits()
705 sw::SIMD::UInt c = bits - ((bits >> 1) & sw::SIMD::UInt(0x55555555)); in CountBits()
706 c = ((c >> 2) & sw::SIMD::UInt(0x33333333)) + (c & sw::SIMD::UInt(0x33333333)); in CountBits()
707 c = ((c >> 4) + c) & sw::SIMD::UInt(0x0F0F0F0F); in CountBits()
708 c = ((c >> 8) + c) & sw::SIMD::UInt(0x00FF00FF); in CountBits()
709 c = ((c >> 16) + c) & sw::SIMD::UInt(0x0000FFFF); in CountBits()
715 rr::RValue<sw::SIMD::UInt> NthBit32(rr::RValue<sw::SIMD::UInt> const &bits) in NthBit32()
717 return ((sw::SIMD::UInt(1) << bits) & rr::CmpLT(bits, sw::SIMD::UInt(32))); in NthBit32()
721 rr::RValue<sw::SIMD::UInt> Bitmask32(rr::RValue<sw::SIMD::UInt> const &bitCount) in Bitmask32()
723 return NthBit32(bitCount) - sw::SIMD::UInt(1); in Bitmask32()
727 rr::RValue<sw::SIMD::Float> FMA( in FMA()
728 rr::RValue<sw::SIMD::Float> const &a, in FMA()
729 rr::RValue<sw::SIMD::Float> const &b, in FMA()
730 rr::RValue<sw::SIMD::Float> const &c) in FMA()
737 rr::RValue<sw::SIMD::Int> Exponent(rr::RValue<sw::SIMD::Float> f) in Exponent()
739 auto v = rr::As<sw::SIMD::UInt>(f); in Exponent()
740 return (sw::SIMD::Int((v >> sw::SIMD::UInt(23)) & sw::SIMD::UInt(0xFF)) - sw::SIMD::Int(126)); in Exponent()
746 rr::RValue<sw::SIMD::Float> NMin(rr::RValue<sw::SIMD::Float> const &x, rr::RValue<sw::SIMD::Float> … in NMin()
751 return As<sw::SIMD::Float>( in NMin()
753 ((~xIsNan & ~yIsNan) & As<sw::SIMD::Int>(Min(x, y))) | in NMin()
756 ((~xIsNan & yIsNan) & As<sw::SIMD::Int>(x)) | in NMin()
757 (xIsNan & As<sw::SIMD::Int>(y))); in NMin()
763 rr::RValue<sw::SIMD::Float> NMax(rr::RValue<sw::SIMD::Float> const &x, rr::RValue<sw::SIMD::Float> … in NMax()
768 return As<sw::SIMD::Float>( in NMax()
770 ((~xIsNan & ~yIsNan) & As<sw::SIMD::Int>(Max(x, y))) | in NMax()
773 ((~xIsNan & yIsNan) & As<sw::SIMD::Int>(x)) | in NMax()
774 (xIsNan & As<sw::SIMD::Int>(y))); in NMax()
778 rr::RValue<sw::SIMD::Float> Determinant( in Determinant()
779 rr::RValue<sw::SIMD::Float> const &a, rr::RValue<sw::SIMD::Float> const &b, in Determinant()
780 rr::RValue<sw::SIMD::Float> const &c, rr::RValue<sw::SIMD::Float> const &d) in Determinant()
786 rr::RValue<sw::SIMD::Float> Determinant( in Determinant()
787 …rr::RValue<sw::SIMD::Float> const &a, rr::RValue<sw::SIMD::Float> const &b, rr::RValue<sw::SIMD::F… in Determinant()
788 …rr::RValue<sw::SIMD::Float> const &d, rr::RValue<sw::SIMD::Float> const &e, rr::RValue<sw::SIMD::F… in Determinant()
789 …rr::RValue<sw::SIMD::Float> const &g, rr::RValue<sw::SIMD::Float> const &h, rr::RValue<sw::SIMD::F… in Determinant()
795 rr::RValue<sw::SIMD::Float> Determinant( in Determinant()
796 …rr::RValue<sw::SIMD::Float> const &a, rr::RValue<sw::SIMD::Float> const &b, rr::RValue<sw::SIMD::F… in Determinant()
797 …rr::RValue<sw::SIMD::Float> const &e, rr::RValue<sw::SIMD::Float> const &f, rr::RValue<sw::SIMD::F… in Determinant()
798 …rr::RValue<sw::SIMD::Float> const &i, rr::RValue<sw::SIMD::Float> const &j, rr::RValue<sw::SIMD::F… in Determinant()
799 …rr::RValue<sw::SIMD::Float> const &m, rr::RValue<sw::SIMD::Float> const &n, rr::RValue<sw::SIMD::F… in Determinant()
816 std::array<rr::RValue<sw::SIMD::Float>, 4> MatrixInverse( in MatrixInverse()
817 rr::RValue<sw::SIMD::Float> const &a, rr::RValue<sw::SIMD::Float> const &b, in MatrixInverse()
818 rr::RValue<sw::SIMD::Float> const &c, rr::RValue<sw::SIMD::Float> const &d) in MatrixInverse()
820 auto s = sw::SIMD::Float(1.0f) / Determinant(a, b, c, d); in MatrixInverse()
825 std::array<rr::RValue<sw::SIMD::Float>, 9> MatrixInverse( in MatrixInverse()
826 …rr::RValue<sw::SIMD::Float> const &a, rr::RValue<sw::SIMD::Float> const &b, rr::RValue<sw::SIMD::F… in MatrixInverse()
827 …rr::RValue<sw::SIMD::Float> const &d, rr::RValue<sw::SIMD::Float> const &e, rr::RValue<sw::SIMD::F… in MatrixInverse()
828 …rr::RValue<sw::SIMD::Float> const &g, rr::RValue<sw::SIMD::Float> const &h, rr::RValue<sw::SIMD::F… in MatrixInverse()
830 auto s = sw::SIMD::Float(1.0f) / Determinant( in MatrixInverse()
849 std::array<rr::RValue<sw::SIMD::Float>, 16> MatrixInverse( in MatrixInverse()
850 …rr::RValue<sw::SIMD::Float> const &a, rr::RValue<sw::SIMD::Float> const &b, rr::RValue<sw::SIMD::F… in MatrixInverse()
851 …rr::RValue<sw::SIMD::Float> const &e, rr::RValue<sw::SIMD::Float> const &f, rr::RValue<sw::SIMD::F… in MatrixInverse()
852 …rr::RValue<sw::SIMD::Float> const &i, rr::RValue<sw::SIMD::Float> const &j, rr::RValue<sw::SIMD::F… in MatrixInverse()
853 …rr::RValue<sw::SIMD::Float> const &m, rr::RValue<sw::SIMD::Float> const &n, rr::RValue<sw::SIMD::F… in MatrixInverse()
855 auto s = sw::SIMD::Float(1.0f) / Determinant( in MatrixInverse()
891 namespace SIMD { namespace
913 Pointer::Pointer(rr::Pointer<Byte> base, rr::Int limit, SIMD::Int offset) in Pointer()
923 Pointer::Pointer(rr::Pointer<Byte> base, unsigned int limit, SIMD::Int offset) in Pointer()
948 Pointer Pointer::operator+(SIMD::Int i) in operator +()
954 Pointer Pointer::operator*(SIMD::Int i) in operator *()
963 for(int el = 0; el < SIMD::Width; el++) { staticOffsets[el] += i; } in operator +=()
969 for(int el = 0; el < SIMD::Width; el++) { staticOffsets[el] *= i; } in operator *=()
972 dynamicOffsets *= SIMD::Int(i); in operator *=()
990 SIMD::Int Pointer::offsets() const in offsets()
992 static_assert(SIMD::Width == 4, "Expects SIMD::Width to be 4"); in offsets()
993 …return dynamicOffsets + SIMD::Int(staticOffsets[0], staticOffsets[1], staticOffsets[2], staticOffs… in offsets()
996 SIMD::Int Pointer::isInBounds(unsigned int accessSize, OutOfBoundsBehavior robustness) const in isInBounds()
1002 return SIMD::Int(0xffffffff); in isInBounds()
1008 static_assert(SIMD::Width == 4, "Expects SIMD::Width to be 4"); in isInBounds()
1009 return SIMD::Int( in isInBounds()
1016 return CmpLT(offsets() + SIMD::Int(accessSize - 1), SIMD::Int(limit())); in isInBounds()
1044 for(int i = 0; i < SIMD::Width; i++) in isStaticallyInBounds()
1067 static_assert(SIMD::Width == 4, "Expects SIMD::Width to be 4"); in hasSequentialOffsets()
1068 return rr::SignMask(~CmpEQ(o.yzww, o + SIMD::Int(1 * step, 2 * step, 3 * step, 0))) == 0; in hasSequentialOffsets()
1081 for(int i = 1; i < SIMD::Width; i++) in hasStaticSequentialOffsets()
1094 static_assert(SIMD::Width == 4, "Expects SIMD::Width to be 4"); in hasEqualOffsets()
1108 for(int i = 1; i < SIMD::Width; i++) in hasStaticEqualOffsets()