• Home
  • Raw
  • Download

Lines Matching refs:SIMD

549 SIMD::UInt halfToFloatBits(SIMD::UInt halfBits)  in halfToFloatBits()
551 auto magic = SIMD::UInt(126 << 23); in halfToFloatBits()
553 auto sign16 = halfBits & SIMD::UInt(0x8000); in halfToFloatBits()
554 auto man16 = halfBits & SIMD::UInt(0x03FF); in halfToFloatBits()
555 auto exp16 = halfBits & SIMD::UInt(0x7C00); in halfToFloatBits()
557 auto isDnormOrZero = CmpEQ(exp16, SIMD::UInt(0)); in halfToFloatBits()
558 auto isInfOrNaN = CmpEQ(exp16, SIMD::UInt(0x7C00)); in halfToFloatBits()
562 auto exp32 = (exp16 + SIMD::UInt(0x1C000)) << 13; in halfToFloatBits()
563 auto norm32 = (man32 | exp32) | (isInfOrNaN & SIMD::UInt(0x7F800000)); in halfToFloatBits()
565 auto denorm32 = As<SIMD::UInt>(As<SIMD::Float>(magic + man16) - As<SIMD::Float>(magic)); in halfToFloatBits()
570 SIMD::UInt floatToHalfBits(SIMD::UInt floatBits, bool storeInUpperBits) in floatToHalfBits()
580 SIMD::UInt justsign = SIMD::UInt(mask_sign) & floatBits; in floatToHalfBits()
581 SIMD::UInt absf = floatBits ^ justsign; in floatToHalfBits()
582 SIMD::UInt b_isnormal = CmpNLE(SIMD::UInt(c_f32infty), absf); in floatToHalfBits()
586SIMD::UInt joined = ((((As<SIMD::UInt>(Min(As<SIMD::Float>(absf & SIMD::UInt(mask_round)) * As<SIM… in floatToHalfBits()
587 As<SIMD::Float>(SIMD::UInt(c_clamp))))) - in floatToHalfBits()
588 SIMD::UInt(mask_round)) >> in floatToHalfBits()
591 ((b_isnormal ^ SIMD::UInt(0xFFFFFFFF)) & in floatToHalfBits()
592 … ((CmpNLE(absf, SIMD::UInt(c_f32infty)) & SIMD::UInt(c_nanbit)) | SIMD::UInt(c_infty_as_fp16))); in floatToHalfBits()
660 rr::RValue<rr::Bool> AnyTrue(rr::RValue<sw::SIMD::Int> const &ints) in AnyTrue()
665 rr::RValue<rr::Bool> AnyFalse(rr::RValue<sw::SIMD::Int> const &ints) in AnyFalse()
670 rr::RValue<sw::SIMD::Float> Sign(rr::RValue<sw::SIMD::Float> const &val) in Sign()
672 …return rr::As<sw::SIMD::Float>((rr::As<sw::SIMD::UInt>(val) & sw::SIMD::UInt(0x80000000)) | sw::SI… in Sign()
677 std::pair<rr::RValue<sw::SIMD::Float>, rr::RValue<sw::SIMD::Float>>
678 Modf(rr::RValue<sw::SIMD::Float> const &val) in Modf()
688 sw::SIMD::UInt CountBits(rr::RValue<sw::SIMD::UInt> const &bits) in CountBits()
694 sw::SIMD::UInt c = bits - ((bits >> 1) & sw::SIMD::UInt(0x55555555)); in CountBits()
695 c = ((c >> 2) & sw::SIMD::UInt(0x33333333)) + (c & sw::SIMD::UInt(0x33333333)); in CountBits()
696 c = ((c >> 4) + c) & sw::SIMD::UInt(0x0F0F0F0F); in CountBits()
697 c = ((c >> 8) + c) & sw::SIMD::UInt(0x00FF00FF); in CountBits()
698 c = ((c >> 16) + c) & sw::SIMD::UInt(0x0000FFFF); in CountBits()
704 rr::RValue<sw::SIMD::UInt> NthBit32(rr::RValue<sw::SIMD::UInt> const &bits) in NthBit32()
706 return ((sw::SIMD::UInt(1) << bits) & rr::CmpLT(bits, sw::SIMD::UInt(32))); in NthBit32()
710 rr::RValue<sw::SIMD::UInt> Bitmask32(rr::RValue<sw::SIMD::UInt> const &bitCount) in Bitmask32()
712 return NthBit32(bitCount) - sw::SIMD::UInt(1); in Bitmask32()
716 rr::RValue<sw::SIMD::Float> FMA( in FMA()
717 rr::RValue<sw::SIMD::Float> const &a, in FMA()
718 rr::RValue<sw::SIMD::Float> const &b, in FMA()
719 rr::RValue<sw::SIMD::Float> const &c) in FMA()
726 rr::RValue<sw::SIMD::Int> Exponent(rr::RValue<sw::SIMD::Float> f) in Exponent()
728 auto v = rr::As<sw::SIMD::UInt>(f); in Exponent()
729 return (sw::SIMD::Int((v >> sw::SIMD::UInt(23)) & sw::SIMD::UInt(0xFF)) - sw::SIMD::Int(126)); in Exponent()
735 rr::RValue<sw::SIMD::Float> NMin(rr::RValue<sw::SIMD::Float> const &x, rr::RValue<sw::SIMD::Float> … in NMin()
740 return As<sw::SIMD::Float>( in NMin()
742 ((~xIsNan & ~yIsNan) & As<sw::SIMD::Int>(Min(x, y))) | in NMin()
745 ((~xIsNan & yIsNan) & As<sw::SIMD::Int>(x)) | in NMin()
746 (xIsNan & As<sw::SIMD::Int>(y))); in NMin()
752 rr::RValue<sw::SIMD::Float> NMax(rr::RValue<sw::SIMD::Float> const &x, rr::RValue<sw::SIMD::Float> … in NMax()
757 return As<sw::SIMD::Float>( in NMax()
759 ((~xIsNan & ~yIsNan) & As<sw::SIMD::Int>(Max(x, y))) | in NMax()
762 ((~xIsNan & yIsNan) & As<sw::SIMD::Int>(x)) | in NMax()
763 (xIsNan & As<sw::SIMD::Int>(y))); in NMax()
767 rr::RValue<sw::SIMD::Float> Determinant( in Determinant()
768 rr::RValue<sw::SIMD::Float> const &a, rr::RValue<sw::SIMD::Float> const &b, in Determinant()
769 rr::RValue<sw::SIMD::Float> const &c, rr::RValue<sw::SIMD::Float> const &d) in Determinant()
775 rr::RValue<sw::SIMD::Float> Determinant( in Determinant()
776 …rr::RValue<sw::SIMD::Float> const &a, rr::RValue<sw::SIMD::Float> const &b, rr::RValue<sw::SIMD::F… in Determinant()
777 …rr::RValue<sw::SIMD::Float> const &d, rr::RValue<sw::SIMD::Float> const &e, rr::RValue<sw::SIMD::F… in Determinant()
778 …rr::RValue<sw::SIMD::Float> const &g, rr::RValue<sw::SIMD::Float> const &h, rr::RValue<sw::SIMD::F… in Determinant()
784 rr::RValue<sw::SIMD::Float> Determinant( in Determinant()
785 …rr::RValue<sw::SIMD::Float> const &a, rr::RValue<sw::SIMD::Float> const &b, rr::RValue<sw::SIMD::F… in Determinant()
786 …rr::RValue<sw::SIMD::Float> const &e, rr::RValue<sw::SIMD::Float> const &f, rr::RValue<sw::SIMD::F… in Determinant()
787 …rr::RValue<sw::SIMD::Float> const &i, rr::RValue<sw::SIMD::Float> const &j, rr::RValue<sw::SIMD::F… in Determinant()
788 …rr::RValue<sw::SIMD::Float> const &m, rr::RValue<sw::SIMD::Float> const &n, rr::RValue<sw::SIMD::F… in Determinant()
805 std::array<rr::RValue<sw::SIMD::Float>, 4> MatrixInverse( in MatrixInverse()
806 rr::RValue<sw::SIMD::Float> const &a, rr::RValue<sw::SIMD::Float> const &b, in MatrixInverse()
807 rr::RValue<sw::SIMD::Float> const &c, rr::RValue<sw::SIMD::Float> const &d) in MatrixInverse()
809 auto s = sw::SIMD::Float(1.0f) / Determinant(a, b, c, d); in MatrixInverse()
814 std::array<rr::RValue<sw::SIMD::Float>, 9> MatrixInverse( in MatrixInverse()
815 …rr::RValue<sw::SIMD::Float> const &a, rr::RValue<sw::SIMD::Float> const &b, rr::RValue<sw::SIMD::F… in MatrixInverse()
816 …rr::RValue<sw::SIMD::Float> const &d, rr::RValue<sw::SIMD::Float> const &e, rr::RValue<sw::SIMD::F… in MatrixInverse()
817 …rr::RValue<sw::SIMD::Float> const &g, rr::RValue<sw::SIMD::Float> const &h, rr::RValue<sw::SIMD::F… in MatrixInverse()
819 auto s = sw::SIMD::Float(1.0f) / Determinant( in MatrixInverse()
838 std::array<rr::RValue<sw::SIMD::Float>, 16> MatrixInverse( in MatrixInverse()
839 …rr::RValue<sw::SIMD::Float> const &a, rr::RValue<sw::SIMD::Float> const &b, rr::RValue<sw::SIMD::F… in MatrixInverse()
840 …rr::RValue<sw::SIMD::Float> const &e, rr::RValue<sw::SIMD::Float> const &f, rr::RValue<sw::SIMD::F… in MatrixInverse()
841 …rr::RValue<sw::SIMD::Float> const &i, rr::RValue<sw::SIMD::Float> const &j, rr::RValue<sw::SIMD::F… in MatrixInverse()
842 …rr::RValue<sw::SIMD::Float> const &m, rr::RValue<sw::SIMD::Float> const &n, rr::RValue<sw::SIMD::F… in MatrixInverse()
844 auto s = sw::SIMD::Float(1.0f) / Determinant( in MatrixInverse()
880 namespace SIMD { namespace
902 Pointer::Pointer(rr::Pointer<Byte> base, rr::Int limit, SIMD::Int offset) in Pointer()
912 Pointer::Pointer(rr::Pointer<Byte> base, unsigned int limit, SIMD::Int offset) in Pointer()
937 Pointer Pointer::operator+(SIMD::Int i) in operator +()
943 Pointer Pointer::operator*(SIMD::Int i) in operator *()
952 for(int el = 0; el < SIMD::Width; el++) { staticOffsets[el] += i; } in operator +=()
958 for(int el = 0; el < SIMD::Width; el++) { staticOffsets[el] *= i; } in operator *=()
961 dynamicOffsets *= SIMD::Int(i); in operator *=()
979 SIMD::Int Pointer::offsets() const in offsets()
981 static_assert(SIMD::Width == 4, "Expects SIMD::Width to be 4"); in offsets()
982 …return dynamicOffsets + SIMD::Int(staticOffsets[0], staticOffsets[1], staticOffsets[2], staticOffs… in offsets()
985 SIMD::Int Pointer::isInBounds(unsigned int accessSize, OutOfBoundsBehavior robustness) const in isInBounds()
991 return SIMD::Int(0xffffffff); in isInBounds()
997 static_assert(SIMD::Width == 4, "Expects SIMD::Width to be 4"); in isInBounds()
998 return SIMD::Int( in isInBounds()
1005 return CmpLT(offsets() + SIMD::Int(accessSize - 1), SIMD::Int(limit())); in isInBounds()
1033 for(int i = 0; i < SIMD::Width; i++) in isStaticallyInBounds()
1056 static_assert(SIMD::Width == 4, "Expects SIMD::Width to be 4"); in hasSequentialOffsets()
1057 return rr::SignMask(~CmpEQ(o.yzww, o + SIMD::Int(1 * step, 2 * step, 3 * step, 0))) == 0; in hasSequentialOffsets()
1070 for(int i = 1; i < SIMD::Width; i++) in hasStaticSequentialOffsets()
1083 static_assert(SIMD::Width == 4, "Expects SIMD::Width to be 4"); in hasEqualOffsets()
1097 for(int i = 1; i < SIMD::Width; i++) in hasStaticEqualOffsets()