/external/llvm/unittests/ADT/ |
D | APFloatTest.cpp | 22 llvm::APFloat F(0.0); in convertToDoubleFromString() 23 F.convertFromString(Str, llvm::APFloat::rmNearestTiesToEven); in convertToDoubleFromString() 29 llvm::APFloat F(d); in convertToString() 41 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle, false).isSignaling()); in TEST() 42 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle, true).isSignaling()); in TEST() 43 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle, false, &payload).isSignaling()); in TEST() 44 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle, true, &payload).isSignaling()); in TEST() 45 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, false).isSignaling()); in TEST() 46 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, true).isSignaling()); in TEST() 47 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, false, &payload).isSignaling()); in TEST() [all …]
|
/external/llvm-project/llvm/unittests/ADT/ |
D | APFloatTest.cpp | 24 llvm::APFloat F(0.0); in convertToErrorFromString() 26 F.convertFromString(Str, llvm::APFloat::rmNearestTiesToEven); in convertToErrorFromString() 32 llvm::APFloat F(0.0); in convertToDoubleFromString() 34 F.convertFromString(Str, llvm::APFloat::rmNearestTiesToEven); in convertToDoubleFromString() 43 llvm::APFloat F(d); in convertToString() 55 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle(), false).isSignaling()); in TEST() 56 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle(), true).isSignaling()); in TEST() 57 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle(), false, &payload).isSignaling()); in TEST() 58 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle(), true, &payload).isSignaling()); in TEST() 59 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle(), false).isSignaling()); in TEST() [all …]
|
/external/llvm/include/llvm/ADT/ |
D | APFloat.h | 124 class APFloat { 196 APFloat(const fltSemantics &); // Default construct to 0.0 197 APFloat(const fltSemantics &, StringRef); 198 APFloat(const fltSemantics &, integerPart); 199 APFloat(const fltSemantics &, uninitializedTag); 200 APFloat(const fltSemantics &, const APInt &); 201 explicit APFloat(double d); 202 explicit APFloat(float f); 203 APFloat(const APFloat &); 204 APFloat(APFloat &&); [all …]
|
/external/llvm-project/llvm/include/llvm/ADT/ |
D | APFloat.h | 39 class APFloat; variable 440 bool getExactInverse(APFloat *inv) const; 605 std::unique_ptr<APFloat[]> Floats; 607 opStatus addImpl(const APFloat &a, const APFloat &aa, const APFloat &c, 608 const APFloat &cc, roundingMode RM); 618 DoubleAPFloat(const fltSemantics &S, APFloat &&First, APFloat &&Second); 634 APFloat &getFirst() { return Floats[0]; } in getFirst() 635 const APFloat &getFirst() const { return Floats[0]; } in getFirst() 636 APFloat &getSecond() { return Floats[1]; } in getSecond() 637 const APFloat &getSecond() const { return Floats[1]; } in getSecond() [all …]
|
/external/swiftshader/third_party/llvm-subzero/include/llvm/ADT/ |
D | APFloat.h | 29 class APFloat; variable 603 std::unique_ptr<APFloat[]> Floats; 605 opStatus addImpl(const APFloat &a, const APFloat &aa, const APFloat &c, 606 const APFloat &cc, roundingMode RM); 616 DoubleAPFloat(const fltSemantics &S, APFloat &&First, APFloat &&Second); 632 APFloat &getFirst() { return Floats[0]; } in getFirst() 633 const APFloat &getFirst() const { return Floats[0]; } in getFirst() 634 APFloat &getSecond() { return Floats[1]; } in getSecond() 635 const APFloat &getSecond() const { return Floats[1]; } in getSecond() 653 class APFloat : public APFloatBase { [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/ADT/ |
D | APFloat.h | 38 class APFloat; variable 435 bool getExactInverse(APFloat *inv) const; 594 std::unique_ptr<APFloat[]> Floats; 596 opStatus addImpl(const APFloat &a, const APFloat &aa, const APFloat &c, 597 const APFloat &cc, roundingMode RM); 607 DoubleAPFloat(const fltSemantics &S, APFloat &&First, APFloat &&Second); 623 APFloat &getFirst() { return Floats[0]; } in getFirst() 624 const APFloat &getFirst() const { return Floats[0]; } in getFirst() 625 APFloat &getSecond() { return Floats[1]; } in getSecond() 626 const APFloat &getSecond() const { return Floats[1]; } in getSecond() [all …]
|
/external/llvm/lib/Support/ |
D | APFloat.cpp | 47 APFloat::ExponentType maxExponent; 51 APFloat::ExponentType minExponent; 61 const fltSemantics APFloat::IEEEhalf = { 15, -14, 11, 16 }; 62 const fltSemantics APFloat::IEEEsingle = { 127, -126, 24, 32 }; 63 const fltSemantics APFloat::IEEEdouble = { 1023, -1022, 53, 64 }; 64 const fltSemantics APFloat::IEEEquad = { 16383, -16382, 113, 128 }; 65 const fltSemantics APFloat::x87DoubleExtended = { 16383, -16382, 64, 80 }; 66 const fltSemantics APFloat::Bogus = { 0, 0, 0, 0 }; 79 const fltSemantics APFloat::PPCDoubleDouble = { 1023, -1022 + 53, 53 + 53, 128 }; 300 D->exponent += static_cast<APFloat::ExponentType>((dot - p) - (dot > p)); in interpretDecimal() [all …]
|
/external/llvm-project/llvm/tools/llvm-exegesis/lib/ |
D | RegisterValue.cpp | 16 static APFloat getFloatValue(const fltSemantics &FltSemantics, in getFloatValue() 20 return APFloat::getZero(FltSemantics); in getFloatValue() 22 return APFloat::getZero(FltSemantics, true); in getFloatValue() 24 return APFloat(FltSemantics, "1"); in getFloatValue() 26 return APFloat(FltSemantics, "2"); in getFloatValue() 28 return APFloat::getInf(FltSemantics); in getFloatValue() 30 return APFloat::getQNaN(FltSemantics); in getFloatValue() 32 return APFloat::getSmallestNormalized(FltSemantics); in getFloatValue() 34 return APFloat::getLargest(FltSemantics); in getFloatValue() 36 return APFloat::getSmallest(FltSemantics); in getFloatValue()
|
/external/llvm-project/mlir/include/mlir/Dialect/Quant/ |
D | UniformSupport.h | 79 roundMode(APFloat::rmNearestTiesToAway) {} in UniformQuantizedValueConverter() 82 APFloat clampMin, APFloat clampMax, in UniformQuantizedValueConverter() 89 roundMode(APFloat::rmNearestTiesToAway) {} in UniformQuantizedValueConverter() 91 virtual APInt quantizeFloatToInt(APFloat expressedValue) const { in quantizeFloatToInt() 96 if (&expressedValue.getSemantics() == &APFloat::IEEEsingle() && in quantizeFloatToInt() 106 APFloat scaled = (expressedValue / scale); in quantizeFloatToInt() 109 APFloat fixedpoint = llvm::minimum(scaled, clampMax); in quantizeFloatToInt() 118 int64_t quantizeFloatToInt64(APFloat expressedValue) const { in quantizeFloatToInt64() 128 virtual APInt quantizeF32ToInt8(APFloat expressedValue) const { in quantizeF32ToInt8() 129 assert(&expressedValue.getSemantics() == &APFloat::IEEEsingle()); in quantizeF32ToInt8() [all …]
|
/external/tensorflow/tensorflow/compiler/xla/service/cpu/ |
D | llvm_ir_runtime.cc | 167 const llvm::APFloat half = GetIeeeF32(0.5); in GenerateVF32Exp() 168 const llvm::APFloat one = GetIeeeF32(1); in GenerateVF32Exp() 171 const llvm::APFloat cephes_LOG2EF = GetIeeeF32(1.44269504088896341); in GenerateVF32Exp() 173 const llvm::APFloat cephes_exp_C1 = GetIeeeF32(0.693359375); in GenerateVF32Exp() 174 const llvm::APFloat cephes_exp_C2 = GetIeeeF32(-2.12194440e-4); in GenerateVF32Exp() 176 const llvm::APFloat cephes_exp_p0 = GetIeeeF32(1.9875691500E-4); in GenerateVF32Exp() 177 const llvm::APFloat cephes_exp_p1 = GetIeeeF32(1.3981999507E-3); in GenerateVF32Exp() 178 const llvm::APFloat cephes_exp_p2 = GetIeeeF32(8.3334519073E-3); in GenerateVF32Exp() 179 const llvm::APFloat cephes_exp_p3 = GetIeeeF32(4.1665795894E-2); in GenerateVF32Exp() 180 const llvm::APFloat cephes_exp_p4 = GetIeeeF32(1.6666665459E-1); in GenerateVF32Exp() [all …]
|
D | vector_support_library.h | 34 inline llvm::APFloat GetIeeeF32(float f) { return llvm::APFloat(f); } in GetIeeeF32() 35 inline llvm::APFloat GetIeeeF32FromBitwiseRep(int32 bitwise_value) { in GetIeeeF32FromBitwiseRep() 36 return llvm::APFloat(llvm::APFloat::IEEEsingle(), in GetIeeeF32FromBitwiseRep() 55 llvm::Value* Mul(const llvm::APFloat& lhs, llvm::Value* rhs) { in Mul() 68 llvm::Value* Add(const llvm::APFloat& lhs, llvm::Value* rhs) { in Add() 78 llvm::Value* Sub(llvm::Value* lhs, const llvm::APFloat& rhs) { in Sub() 83 llvm::Value* Max(const llvm::APFloat& lhs, llvm::Value* rhs, in Max() 93 llvm::Value* MulAdd(llvm::Value* a, llvm::Value* b, const llvm::APFloat& c) { in MulAdd() 97 llvm::Value* MulAdd(llvm::Value* a, const llvm::APFloat& b, in MulAdd() 98 const llvm::APFloat& c) { in MulAdd() [all …]
|
/external/llvm-project/llvm/lib/Support/ |
D | APFixedPoint.cpp | 139 APFloat F(FloatSema); in fitsInFloatSemantics() 140 APFloat::opStatus Status = F.convertFromAPInt(MaxInt, MaxInt.isSigned(), in fitsInFloatSemantics() 141 APFloat::rmNearestTiesToAway); in fitsInFloatSemantics() 142 if ((Status & APFloat::opOverflow) || !isSigned()) in fitsInFloatSemantics() 143 return !(Status & APFloat::opOverflow); in fitsInFloatSemantics() 147 APFloat::rmNearestTiesToAway); in fitsInFloatSemantics() 148 return !(Status & APFloat::opOverflow); in fitsInFloatSemantics() 445 if (S == &APFloat::BFloat()) in promoteFloatSemantics() 446 return &APFloat::IEEEdouble(); in promoteFloatSemantics() 447 else if (S == &APFloat::IEEEhalf()) in promoteFloatSemantics() [all …]
|
D | APFloat.cpp | 139 if (&Sem == &llvm::APFloat::IEEEhalf()) in SemanticsToEnum() 141 else if (&Sem == &llvm::APFloat::BFloat()) in SemanticsToEnum() 143 else if (&Sem == &llvm::APFloat::IEEEsingle()) in SemanticsToEnum() 145 else if (&Sem == &llvm::APFloat::IEEEdouble()) in SemanticsToEnum() 147 else if (&Sem == &llvm::APFloat::x87DoubleExtended()) in SemanticsToEnum() 149 else if (&Sem == &llvm::APFloat::IEEEquad()) in SemanticsToEnum() 151 else if (&Sem == &llvm::APFloat::PPCDoubleDouble()) in SemanticsToEnum() 440 D->exponent += static_cast<APFloat::ExponentType>((dot - p) - (dot > p)); in interpretDecimal() 442 static_cast<APFloat::ExponentType>((p - D->firstSigDigit) in interpretDecimal() 3969 bool IEEEFloat::getExactInverse(APFloat *inv) const { in getExactInverse() [all …]
|
/external/llvm-project/llvm/lib/Target/NVPTX/ |
D | NVPTXMCExpr.cpp | 19 NVPTXFloatMCExpr::create(VariantKind Kind, const APFloat &Flt, MCContext &Ctx) { in create() 26 APFloat APF = getAPFloat(); in printImpl() 35 APF.convert(APFloat::IEEEhalf(), APFloat::rmNearestTiesToEven, &Ignored); in printImpl() 40 APF.convert(APFloat::IEEEsingle(), APFloat::rmNearestTiesToEven, &Ignored); in printImpl() 45 APF.convert(APFloat::IEEEdouble(), APFloat::rmNearestTiesToEven, &Ignored); in printImpl()
|
D | NVPTXMCExpr.h | 31 const APFloat Flt; 33 explicit NVPTXFloatMCExpr(VariantKind Kind, APFloat Flt) in NVPTXFloatMCExpr() 40 static const NVPTXFloatMCExpr *create(VariantKind Kind, const APFloat &Flt, 43 static const NVPTXFloatMCExpr *createConstantFPHalf(const APFloat &Flt, in createConstantFPHalf() 48 static const NVPTXFloatMCExpr *createConstantFPSingle(const APFloat &Flt, in createConstantFPSingle() 53 static const NVPTXFloatMCExpr *createConstantFPDouble(const APFloat &Flt, in createConstantFPDouble() 66 APFloat getAPFloat() const { return Flt; } in getAPFloat()
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/NVPTX/ |
D | NVPTXMCExpr.cpp | 19 NVPTXFloatMCExpr::create(VariantKind Kind, const APFloat &Flt, MCContext &Ctx) { in create() 26 APFloat APF = getAPFloat(); in printImpl() 35 APF.convert(APFloat::IEEEhalf(), APFloat::rmNearestTiesToEven, &Ignored); in printImpl() 40 APF.convert(APFloat::IEEEsingle(), APFloat::rmNearestTiesToEven, &Ignored); in printImpl() 45 APF.convert(APFloat::IEEEdouble(), APFloat::rmNearestTiesToEven, &Ignored); in printImpl()
|
D | NVPTXMCExpr.h | 31 const APFloat Flt; 33 explicit NVPTXFloatMCExpr(VariantKind Kind, APFloat Flt) in NVPTXFloatMCExpr() 40 static const NVPTXFloatMCExpr *create(VariantKind Kind, const APFloat &Flt, 43 static const NVPTXFloatMCExpr *createConstantFPHalf(const APFloat &Flt, in createConstantFPHalf() 48 static const NVPTXFloatMCExpr *createConstantFPSingle(const APFloat &Flt, in createConstantFPSingle() 53 static const NVPTXFloatMCExpr *createConstantFPDouble(const APFloat &Flt, in createConstantFPDouble() 66 APFloat getAPFloat() const { return Flt; } in getAPFloat()
|
/external/llvm/lib/Target/NVPTX/ |
D | NVPTXMCExpr.cpp | 19 NVPTXFloatMCExpr::create(VariantKind Kind, const APFloat &Flt, MCContext &Ctx) { in create() 26 APFloat APF = getAPFloat(); in printImpl() 33 APF.convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven, &Ignored); in printImpl() 38 APF.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven, &Ignored); in printImpl()
|
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/utils/ |
D | convert_op_folder.cc | 35 using func_type = mlir::APInt(const llvm::APFloat&); in ConvertElementsAttr() 40 [&newFloatType](const llvm::APFloat& floatVal) { in ConvertElementsAttr() 41 llvm::APFloat newDouble( in ConvertElementsAttr() 45 llvm::APFloat::rmNearestTiesToEven, in ConvertElementsAttr() 53 [&bit_width](const llvm::APFloat& floatVal) { in ConvertElementsAttr() 73 llvm::APFloat newDouble(static_cast<double>(val)); in ConvertElementsAttr() 76 llvm::APFloat::rmNearestTiesToEven, &loses_info); in ConvertElementsAttr()
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Support/ |
D | APFloat.cpp | 136 if (&Sem == &llvm::APFloat::IEEEhalf()) in SemanticsToEnum() 138 else if (&Sem == &llvm::APFloat::IEEEsingle()) in SemanticsToEnum() 140 else if (&Sem == &llvm::APFloat::IEEEdouble()) in SemanticsToEnum() 142 else if (&Sem == &llvm::APFloat::x87DoubleExtended()) in SemanticsToEnum() 144 else if (&Sem == &llvm::APFloat::IEEEquad()) in SemanticsToEnum() 146 else if (&Sem == &llvm::APFloat::PPCDoubleDouble()) in SemanticsToEnum() 426 D->exponent += static_cast<APFloat::ExponentType>((dot - p) - (dot > p)); in interpretDecimal() 428 static_cast<APFloat::ExponentType>((p - D->firstSigDigit) in interpretDecimal() 3689 bool IEEEFloat::getExactInverse(APFloat *inv) const { in getExactInverse() 3713 *inv = APFloat(reciprocal, *semantics); in getExactInverse() [all …]
|
/external/clang/include/clang/AST/ |
D | APValue.h | 40 typedef llvm::APFloat APFloat; typedef 76 APFloat Real, Imag; 112 typedef llvm::AlignedCharArrayUnion<void *, APSInt, APFloat, ComplexAPSInt, 124 explicit APValue(APFloat F) : Kind(Uninitialized) { in APValue() 133 APValue(APFloat R, APFloat I) : Kind(Uninitialized) { in APValue() 208 APFloat &getFloat() { in getFloat() 210 return *(APFloat*)(char*)Data.buffer; in getFloat() 212 const APFloat &getFloat() const { in getFloat() 232 APFloat &getComplexFloatReal() { in getComplexFloatReal() 236 const APFloat &getComplexFloatReal() const { in getComplexFloatReal() [all …]
|
/external/llvm-project/llvm/lib/Analysis/ |
D | ConstantFolding.cpp | 138 APFloat FP(DestTy->getFltSemantics(), Result); in FoldBitCast() 1663 APFloat APF(V); in GetConstantFoldFPValue() 1665 APF.convert(Ty->getFltSemantics(), APFloat::rmNearestTiesToEven, &unused); in GetConstantFoldFPValue() 1669 return ConstantFP::get(Ty->getContext(), APFloat(V)); in GetConstantFoldFPValue() 1770 Constant *ConstantFoldSSEConvertToInt(const APFloat &Val, bool roundTowardZero, in ConstantFoldSSEConvertToInt() 1779 APFloat::roundingMode mode = roundTowardZero? APFloat::rmTowardZero in ConstantFoldSSEConvertToInt() 1780 : APFloat::rmNearestTiesToEven; in ConstantFoldSSEConvertToInt() 1781 APFloat::opStatus status = in ConstantFoldSSEConvertToInt() 1784 if (status != APFloat::opOK && in ConstantFoldSSEConvertToInt() 1785 (!roundTowardZero || status != APFloat::opInexact)) in ConstantFoldSSEConvertToInt() [all …]
|
/external/llvm-project/llvm/include/llvm/IR/ |
D | Type.h | 171 case HalfTyID: return APFloat::IEEEhalf(); in getFltSemantics() 172 case BFloatTyID: return APFloat::BFloat(); in getFltSemantics() 173 case FloatTyID: return APFloat::IEEEsingle(); in getFltSemantics() 174 case DoubleTyID: return APFloat::IEEEdouble(); in getFltSemantics() 175 case X86_FP80TyID: return APFloat::x87DoubleExtended(); in getFltSemantics() 176 case FP128TyID: return APFloat::IEEEquad(); in getFltSemantics() 177 case PPC_FP128TyID: return APFloat::PPCDoubleDouble(); in getFltSemantics() 432 if (&S == &APFloat::IEEEhalf()) in getFloatingPointTy() 434 else if (&S == &APFloat::BFloat()) in getFloatingPointTy() 436 else if (&S == &APFloat::IEEEsingle()) in getFloatingPointTy() [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/ |
D | ConstantFolding.cpp | 132 APFloat FP(DestTy->getFltSemantics(), Result); in FoldBitCast() 1566 APFloat APF(V); in GetConstantFoldFPValue() 1568 APF.convert(Ty->getFltSemantics(), APFloat::rmNearestTiesToEven, &unused); in GetConstantFoldFPValue() 1572 return ConstantFP::get(Ty->getContext(), APFloat(V)); in GetConstantFoldFPValue() 1626 Constant *ConstantFoldSSEConvertToInt(const APFloat &Val, bool roundTowardZero, in ConstantFoldSSEConvertToInt() 1635 APFloat::roundingMode mode = roundTowardZero? APFloat::rmTowardZero in ConstantFoldSSEConvertToInt() 1636 : APFloat::rmNearestTiesToEven; in ConstantFoldSSEConvertToInt() 1637 APFloat::opStatus status = in ConstantFoldSSEConvertToInt() 1640 if (status != APFloat::opOK && in ConstantFoldSSEConvertToInt() 1641 (!roundTowardZero || status != APFloat::opInexact)) in ConstantFoldSSEConvertToInt() [all …]
|
/external/llvm-project/lldb/source/Utility/ |
D | Scalar.cpp | 26 using llvm::APFloat; 44 &APFloat::IEEEsingle(), &APFloat::IEEEdouble(), in GetFloatPromoKey() 45 &APFloat::x87DoubleExtended()}; in GetFloatPromoKey() 199 m_float = llvm::APFloat(semantics); in FloatPromote() 201 llvm::APFloat::rmNearestTiesToEven); in FloatPromote() 209 m_float.convert(semantics, llvm::APFloat::rmNearestTiesToEven, &ignore); in FloatPromote() 277 static llvm::APInt ToAPInt(const llvm::APFloat &f, unsigned bits, in ToAPInt() 281 f.convertToInteger(result, llvm::APFloat::rmTowardZero, &isExact); in ToAPInt() 372 APFloat result = m_float; in Float() 374 result.convert(APFloat::IEEEsingle(), APFloat::rmNearestTiesToEven, in Float() [all …]
|