/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/swiftshader/third_party/llvm-7.0/llvm/unittests/ADT/ |
D | APFloatTest.cpp | 25 llvm::APFloat F(0.0); in convertToDoubleFromString() 26 F.convertFromString(Str, llvm::APFloat::rmNearestTiesToEven); in convertToDoubleFromString() 33 llvm::APFloat F(d); in convertToString() 45 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle(), false).isSignaling()); in TEST() 46 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle(), true).isSignaling()); in TEST() 47 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle(), false, &payload).isSignaling()); in TEST() 48 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle(), true, &payload).isSignaling()); in TEST() 49 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle(), false).isSignaling()); in TEST() 50 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle(), true).isSignaling()); in TEST() 51 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle(), false, &payload).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/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-7.0/llvm/include/llvm/ADT/ |
D | APFloat.h | 39 class APFloat; variable 419 bool getExactInverse(APFloat *inv) const; 577 std::unique_ptr<APFloat[]> Floats; 579 opStatus addImpl(const APFloat &a, const APFloat &aa, const APFloat &c, 580 const APFloat &cc, roundingMode RM); 590 DoubleAPFloat(const fltSemantics &S, APFloat &&First, APFloat &&Second); 606 APFloat &getFirst() { return Floats[0]; } in getFirst() 607 const APFloat &getFirst() const { return Floats[0]; } in getFirst() 608 APFloat &getSecond() { return Floats[1]; } in getSecond() 609 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/tensorflow/tensorflow/compiler/xla/service/cpu/ |
D | llvm_ir_runtime.cc | 165 const llvm::APFloat half = GetIeeeF32(0.5); in GenerateVF32Exp() 166 const llvm::APFloat one = GetIeeeF32(1); in GenerateVF32Exp() 169 const llvm::APFloat cephes_LOG2EF = GetIeeeF32(1.44269504088896341); in GenerateVF32Exp() 171 const llvm::APFloat cephes_exp_C1 = GetIeeeF32(0.693359375); in GenerateVF32Exp() 172 const llvm::APFloat cephes_exp_C2 = GetIeeeF32(-2.12194440e-4); in GenerateVF32Exp() 174 const llvm::APFloat cephes_exp_p0 = GetIeeeF32(1.9875691500E-4); in GenerateVF32Exp() 175 const llvm::APFloat cephes_exp_p1 = GetIeeeF32(1.3981999507E-3); in GenerateVF32Exp() 176 const llvm::APFloat cephes_exp_p2 = GetIeeeF32(8.3334519073E-3); in GenerateVF32Exp() 177 const llvm::APFloat cephes_exp_p3 = GetIeeeF32(4.1665795894E-2); in GenerateVF32Exp() 178 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() 82 llvm::Value* Max(const llvm::APFloat& lhs, llvm::Value* rhs) { in Max() 91 llvm::Value* MulAdd(llvm::Value* a, llvm::Value* b, const llvm::APFloat& c) { in MulAdd() 95 llvm::Value* MulAdd(llvm::Value* a, const llvm::APFloat& b, in MulAdd() 96 const llvm::APFloat& c) { in MulAdd() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/NVPTX/ |
D | NVPTXMCExpr.cpp | 20 NVPTXFloatMCExpr::create(VariantKind Kind, const APFloat &Flt, MCContext &Ctx) { in create() 27 APFloat APF = getAPFloat(); in printImpl() 36 APF.convert(APFloat::IEEEhalf(), APFloat::rmNearestTiesToEven, &Ignored); in printImpl() 41 APF.convert(APFloat::IEEEsingle(), APFloat::rmNearestTiesToEven, &Ignored); in printImpl() 46 APF.convert(APFloat::IEEEdouble(), APFloat::rmNearestTiesToEven, &Ignored); in printImpl()
|
D | NVPTXMCExpr.h | 32 const APFloat Flt; 34 explicit NVPTXFloatMCExpr(VariantKind Kind, APFloat Flt) in NVPTXFloatMCExpr() 41 static const NVPTXFloatMCExpr *create(VariantKind Kind, const APFloat &Flt, 44 static const NVPTXFloatMCExpr *createConstantFPHalf(const APFloat &Flt, in createConstantFPHalf() 49 static const NVPTXFloatMCExpr *createConstantFPSingle(const APFloat &Flt, in createConstantFPSingle() 54 static const NVPTXFloatMCExpr *createConstantFPDouble(const APFloat &Flt, in createConstantFPDouble() 67 APFloat getAPFloat() const { return Flt; } in getAPFloat()
|
/external/tensorflow/tensorflow/compiler/mlir/xla/ |
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() 69 llvm::APFloat newDouble(static_cast<double>(intVal.getSExtValue())); in ConvertElementsAttr() 72 llvm::APFloat::rmNearestTiesToEven, &loses_info); in ConvertElementsAttr()
|
/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()
|
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 *createConstantFPSingle(const APFloat &Flt, in createConstantFPSingle() 48 static const NVPTXFloatMCExpr *createConstantFPDouble(const APFloat &Flt, in createConstantFPDouble() 61 APFloat getAPFloat() const { return Flt; } in getAPFloat()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Analysis/ |
D | ConstantFolding.cpp | 127 APFloat FP(DestTy->getFltSemantics(), Result); in FoldBitCast() 1493 APFloat APF(V); in GetConstantFoldFPValue() 1495 APF.convert(APFloat::IEEEhalf(), APFloat::rmNearestTiesToEven, &unused); in GetConstantFoldFPValue() 1499 return ConstantFP::get(Ty->getContext(), APFloat((float)V)); in GetConstantFoldFPValue() 1501 return ConstantFP::get(Ty->getContext(), APFloat(V)); in GetConstantFoldFPValue() 1555 Constant *ConstantFoldSSEConvertToInt(const APFloat &Val, bool roundTowardZero, in ConstantFoldSSEConvertToInt() 1564 APFloat::roundingMode mode = roundTowardZero? APFloat::rmTowardZero in ConstantFoldSSEConvertToInt() 1565 : APFloat::rmNearestTiesToEven; in ConstantFoldSSEConvertToInt() 1566 APFloat::opStatus status = in ConstantFoldSSEConvertToInt() 1569 if (status != APFloat::opOK && in ConstantFoldSSEConvertToInt() [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/swiftshader/third_party/llvm-7.0/llvm/lib/Support/ |
D | APFloat.cpp | 375 D->exponent += static_cast<APFloat::ExponentType>((dot - p) - (dot > p)); in interpretDecimal() 377 static_cast<APFloat::ExponentType>((p - D->firstSigDigit) in interpretDecimal() 3612 bool IEEEFloat::getExactInverse(APFloat *inv) const { in getExactInverse() 3636 *inv = APFloat(reciprocal, *semantics); in getExactInverse() 3849 Floats(new APFloat[2]{APFloat(semIEEEdouble), APFloat(semIEEEdouble)}) { in DoubleAPFloat() 3855 Floats(new APFloat[2]{APFloat(semIEEEdouble, uninitialized), in DoubleAPFloat() 3856 APFloat(semIEEEdouble, uninitialized)}) { in DoubleAPFloat() 3861 : Semantics(&S), Floats(new APFloat[2]{APFloat(semIEEEdouble, I), in DoubleAPFloat() 3862 APFloat(semIEEEdouble)}) { in DoubleAPFloat() 3868 Floats(new APFloat[2]{ in DoubleAPFloat() [all …]
|
/external/clang/lib/Basic/ |
D | TargetInfo.cpp | 73 HalfFormat = &llvm::APFloat::IEEEhalf; in TargetInfo() 74 FloatFormat = &llvm::APFloat::IEEEsingle; in TargetInfo() 75 DoubleFormat = &llvm::APFloat::IEEEdouble; in TargetInfo() 76 LongDoubleFormat = &llvm::APFloat::IEEEdouble; in TargetInfo() 77 Float128Format = &llvm::APFloat::IEEEquad; in TargetInfo() 223 if (&getLongDoubleFormat() == &llvm::APFloat::x87DoubleExtended) in getRealTypeByWidth() 227 if (&getLongDoubleFormat() == &llvm::APFloat::PPCDoubleDouble || in getRealTypeByWidth() 228 &getLongDoubleFormat() == &llvm::APFloat::IEEEquad) in getRealTypeByWidth() 305 DoubleFormat = &llvm::APFloat::IEEEdouble; in adjust() 318 HalfFormat = &llvm::APFloat::IEEEhalf; in adjust() [all …]
|
/external/llvm/lib/Analysis/ |
D | ConstantFolding.cpp | 1365 APFloat APF(V); in GetConstantFoldFPValue() 1367 APF.convert(APFloat::IEEEhalf, APFloat::rmNearestTiesToEven, &unused); in GetConstantFoldFPValue() 1371 return ConstantFP::get(Ty->getContext(), APFloat((float)V)); in GetConstantFoldFPValue() 1373 return ConstantFP::get(Ty->getContext(), APFloat(V)); in GetConstantFoldFPValue() 1427 Constant *ConstantFoldConvertToInt(const APFloat &Val, bool roundTowardZero, in ConstantFoldConvertToInt() 1436 APFloat::roundingMode mode = roundTowardZero? APFloat::rmTowardZero in ConstantFoldConvertToInt() 1437 : APFloat::rmNearestTiesToEven; in ConstantFoldConvertToInt() 1438 APFloat::opStatus status = Val.convertToInteger(&UIntVal, ResultWidth, in ConstantFoldConvertToInt() 1441 if (status != APFloat::opOK && status != APFloat::opInexact) in ConstantFoldConvertToInt() 1456 APFloat APF = Op->getValueAPF(); in getValueAsDouble() [all …]
|
/external/llvm/lib/AsmParser/ |
D | LLLexer.cpp | 874 APFloatVal = APFloat(BitsToDouble(HexIntToVal(TokStart+2, CurPtr))); in Lex0x() 875 return lltok::APFloat; in Lex0x() 884 APFloatVal = APFloat(APFloat::x87DoubleExtended, APInt(80, Pair)); in Lex0x() 885 return lltok::APFloat; in Lex0x() 889 APFloatVal = APFloat(APFloat::IEEEquad, APInt(128, Pair)); in Lex0x() 890 return lltok::APFloat; in Lex0x() 894 APFloatVal = APFloat(APFloat::PPCDoubleDouble, APInt(128, Pair)); in Lex0x() 895 return lltok::APFloat; in Lex0x() 897 APFloatVal = APFloat(APFloat::IEEEhalf, in Lex0x() 899 return lltok::APFloat; in Lex0x() [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/lite/ir/ |
D | tfl_ops.cc | 257 llvm::function_ref<APFloat(APFloat, APFloat)> float_calculate, in ConstFoldBinaryOp() argument 285 llvm::function_ref<APFloat(APFloat)> calculate) { in ConstFoldUnaryOp() 290 SmallVector<APFloat, 16> new_values; in ConstFoldUnaryOp() 294 for (APFloat old_value : dense_elements.getValues<APFloat>()) { in ConstFoldUnaryOp() 349 getType(), operands, [](APFloat a, APFloat b) { return a + b; }, in fold() 677 getType(), operands, [](APFloat a, APFloat b) { return a * b; }, in fold() 689 getType(), operands, [](APFloat a, APFloat b) { return a / b; }, in fold() 978 getType(), operands, [](APFloat a, APFloat b) { return a - b; }, in fold() 1300 auto compute = [](APFloat value) -> APFloat { return llvm::abs(value); }; in fold() 1313 auto compute = [](APFloat value) -> APFloat { return llvm::neg(value); }; in fold() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/IR/ |
D | Constants.cpp | 274 APFloat::getZero(APFloat::IEEEhalf())); in getNullValue() 277 APFloat::getZero(APFloat::IEEEsingle())); in getNullValue() 280 APFloat::getZero(APFloat::IEEEdouble())); in getNullValue() 283 APFloat::getZero(APFloat::x87DoubleExtended())); in getNullValue() 286 APFloat::getZero(APFloat::IEEEquad())); in getNullValue() 289 APFloat(APFloat::PPCDoubleDouble(), in getNullValue() 328 APFloat FL = APFloat::getAllOnesValue(Ty->getPrimitiveSizeInBits(), in getAllOnesValue() 670 return &APFloat::IEEEhalf(); in TypeToFloatSemantics() 672 return &APFloat::IEEEsingle(); in TypeToFloatSemantics() 674 return &APFloat::IEEEdouble(); in TypeToFloatSemantics() [all …]
|
/external/llvm/lib/IR/ |
D | Constants.cpp | 201 APFloat::getZero(APFloat::IEEEhalf)); in getNullValue() 204 APFloat::getZero(APFloat::IEEEsingle)); in getNullValue() 207 APFloat::getZero(APFloat::IEEEdouble)); in getNullValue() 210 APFloat::getZero(APFloat::x87DoubleExtended)); in getNullValue() 213 APFloat::getZero(APFloat::IEEEquad)); in getNullValue() 216 APFloat(APFloat::PPCDoubleDouble, in getNullValue() 255 APFloat FL = APFloat::getAllOnesValue(Ty->getPrimitiveSizeInBits(), in getAllOnesValue() 609 return &APFloat::IEEEhalf; in TypeToFloatSemantics() 611 return &APFloat::IEEEsingle; in TypeToFloatSemantics() 613 return &APFloat::IEEEdouble; in TypeToFloatSemantics() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/AsmParser/ |
D | LLLexer.cpp | 975 APFloatVal = APFloat(APFloat::IEEEdouble(), in Lex0x() 977 return lltok::APFloat; in Lex0x() 986 APFloatVal = APFloat(APFloat::x87DoubleExtended(), APInt(80, Pair)); in Lex0x() 987 return lltok::APFloat; in Lex0x() 991 APFloatVal = APFloat(APFloat::IEEEquad(), APInt(128, Pair)); in Lex0x() 992 return lltok::APFloat; in Lex0x() 996 APFloatVal = APFloat(APFloat::PPCDoubleDouble(), APInt(128, Pair)); in Lex0x() 997 return lltok::APFloat; in Lex0x() 999 APFloatVal = APFloat(APFloat::IEEEhalf(), in Lex0x() 1001 return lltok::APFloat; in Lex0x() [all …]
|
/external/clang/lib/AST/ |
D | ExprConstant.cpp | 54 using llvm::APFloat; 390 OptionalDiagnostic &operator<<(const APFloat &F) { in operator <<() 399 llvm::APFloat::semanticsPrecision(F.getSemantics()); in operator <<() 1034 APFloat FloatReal, FloatImag; 1036 ComplexValue() : FloatReal(APFloat::Bogus), FloatImag(APFloat::Bogus) {} in ComplexValue() 1040 APFloat &getComplexFloatReal() { return FloatReal; } in getComplexFloatReal() 1041 APFloat &getComplexFloatImag() { return FloatImag; } in getComplexFloatImag() 1262 static bool EvaluateFloat(const Expr *E, APFloat &Result, EvalInfo &Info); 1658 QualType SrcType, const APFloat &Value, in HandleFloatToIntCast() 1666 if (Value.convertToInteger(Result, llvm::APFloat::rmTowardZero, &ignored) in HandleFloatToIntCast() [all …]
|
/external/llvm/lib/Target/WebAssembly/InstPrinter/ |
D | WebAssemblyInstPrinter.cpp | 112 static std::string toString(const APFloat &FP) { in toString() 115 !FP.bitwiseIsEqual(APFloat::getQNaN(FP.getSemantics())) && in toString() 116 !FP.bitwiseIsEqual(APFloat::getQNaN(FP.getSemantics(), /*Negative=*/true))) { in toString() 130 buf, /*hexDigits=*/0, /*upperCase=*/false, APFloat::rmNearestTiesToEven); in toString() 177 O << toString(APFloat(float(Op.getFPImm()))); in printOperand() 180 O << toString(APFloat(Op.getFPImm())); in printOperand()
|