/external/tensorflow/tensorflow/compiler/xla/tests/ |
D | transfer_manager_test.cc | 61 std::unique_ptr<Literal> literal = Literal::CreateR0<uint32>(42); in XLA_TEST_F() local 62 const Shape& shape = literal->shape(); in XLA_TEST_F() 67 stream_executor_, *literal, *device_buffer)); in XLA_TEST_F() 76 std::unique_ptr<Literal> literal = in XLA_TEST_F() local 78 const Shape& shape = literal->shape(); in XLA_TEST_F() 83 stream_executor_, *literal, *device_buffer)); in XLA_TEST_F() 95 std::unique_ptr<Literal> literal = Literal::CreateR1<float>(test_vector); in XLA_TEST_F() local 96 const Shape& shape = literal->shape(); in XLA_TEST_F() 101 stream_executor_, *literal, *device_buffer)); in XLA_TEST_F() 111 std::unique_ptr<Literal> literal = Literal::CreateR1U8(test_string); in XLA_TEST_F() local [all …]
|
D | deconstruct_tuple_test.cc | 68 std::unique_ptr<Literal> literal; in TEST_F() local 69 TF_ASSERT_OK_AND_ASSIGN(literal, client_->Transfer(*handles[0])); in TEST_F() 70 LiteralTestUtil::ExpectR1Equal<float>({1.0, 2.0, 3.0, 4.0}, *literal); in TEST_F() 71 TF_ASSERT_OK_AND_ASSIGN(literal, client_->Transfer(*handles[1])); in TEST_F() 72 LiteralTestUtil::ExpectR1Equal<float>({2.0, 4.0, 6.0, 8.0}, *literal); in TEST_F() 90 std::unique_ptr<Literal> literal; in TEST_F() local 91 TF_ASSERT_OK_AND_ASSIGN(literal, client_->Transfer(*handles1[0])); in TEST_F() 92 LiteralTestUtil::ExpectR1Equal<float>({1.0, 2.0, 3.0, 4.0}, *literal); in TEST_F() 93 TF_ASSERT_OK_AND_ASSIGN(literal, client_->Transfer(*handles1[1])); in TEST_F() 94 LiteralTestUtil::ExpectR1Equal<float>({2.0, 4.0, 6.0, 8.0}, *literal); in TEST_F() [all …]
|
D | test_utils.cc | 27 void PopulateWithRandomFloatingPointData(Literal* literal, in PopulateWithRandomFloatingPointData() argument 29 CHECK_EQ(literal->shape().element_type(), in PopulateWithRandomFloatingPointData() 34 const bool should_index_bias = ShapeUtil::ElementsIn(literal->shape()) > 1000; in PopulateWithRandomFloatingPointData() 35 TF_CHECK_OK(literal->Populate<FloatT>( in PopulateWithRandomFloatingPointData() 62 void PopulateWithRandomFloatingPointData<bfloat16>(Literal* literal, in PopulateWithRandomFloatingPointData() argument 64 CHECK_EQ(literal->shape().element_type(), BF16); in PopulateWithRandomFloatingPointData() 66 TF_CHECK_OK(literal->Populate<bfloat16>( in PopulateWithRandomFloatingPointData() 73 void PopulateWithRandomIntegralData(Literal* literal, in PopulateWithRandomIntegralData() argument 75 CHECK_EQ(literal->shape().element_type(), in PopulateWithRandomIntegralData() 79 TF_CHECK_OK(literal->Populate<IntT>( in PopulateWithRandomIntegralData() [all …]
|
D | params_test.cc | 155 std::unique_ptr<Literal> literal = Literal::CreateR0<float>(3.14159f); in XLA_TEST_F() local 157 client_->TransferToServer(*literal).ConsumeValueOrDie(); in XLA_TEST_F() 237 std::unique_ptr<Literal> literal = Literal::CreateR1<float>(sum_value); in XLA_TEST_F() local 239 client_->TransferToServer(*literal).ConsumeValueOrDie()); in XLA_TEST_F() 241 builder.Parameter(i, literal->shape(), "param"); in XLA_TEST_F() 273 std::unique_ptr<Literal> literal = Literal::CreateR0<float>(i); in XLA_TEST_F() local 275 std::move(client_->TransferToServer(*literal)).ValueOrDie()); in XLA_TEST_F() 277 builder.Parameter(i, literal->shape(), "param"); in XLA_TEST_F() 306 std::unique_ptr<Literal> literal = Literal::CreateR1<int32>({i, i}); in XLA_TEST_F() local 308 std::move(client_->TransferToServer(*literal)).ValueOrDie()); in XLA_TEST_F() [all …]
|
D | copy_test.cc | 40 void TestCopyOp(const Literal& literal) { in TestCopyOp() argument 43 HloInstruction::CreateConstant(literal.CloneToUnique())); in TestCopyOp() 51 LiteralTestUtil::ExpectEqual(literal, *result); in TestCopyOp() 90 auto literal = Literal::CreateR0<float>(42.0); in XLA_TEST_F() local 91 Shape shape = literal->shape(); in XLA_TEST_F() 104 ExecuteAndTransfer(std::move(module), {literal.get()}); in XLA_TEST_F() 111 auto literal = Literal::CreateR2<float>({{1.0, 2.0}, {3.0, 4.0}}); in XLA_TEST_F() local 113 HloInstruction::CreateConstant(std::move(literal))); in XLA_TEST_F() 132 std::unique_ptr<Literal> literal = in XLA_TEST_F() local 136 literal->mutable_shape_do_not_use()->mutable_layout(); in XLA_TEST_F() [all …]
|
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/util/ |
D | Preconditions.java | 72 public static int checkNibbleLiteral(int literal) { in checkNibbleLiteral() argument 73 if (literal < -8 || literal > 7) { in checkNibbleLiteral() 75 … String.format("Invalid literal value: %d. Must be between -8 and 7, inclusive.", literal)); in checkNibbleLiteral() 77 return literal; in checkNibbleLiteral() 80 public static int checkByteLiteral(int literal) { in checkByteLiteral() argument 81 if (literal < -128 || literal > 127) { in checkByteLiteral() 83 … String.format("Invalid literal value: %d. Must be between -128 and 127, inclusive.", literal)); in checkByteLiteral() 85 return literal; in checkByteLiteral() 88 public static int checkShortLiteral(int literal) { in checkShortLiteral() argument 89 if (literal < -32768 || literal > 32767) { in checkShortLiteral() [all …]
|
/external/vixl/doc/aarch32/design/ |
D | literal-pool-aarch32.md | 3 * Consider the literal pool simply as a container of literals 4 * Keep the literal pool at the macro-assembler level 5 * The literal pool is public (can be used by the users) 6 * The macro-assembler will have its own literal pool, and will manage 8 * The macro-assembler is responsible for emitting its managed literal 10 * The assembler does not manage literals, but can place a literal in the 21 specify the maximum range the literal has to be placed. 29 When a literal is added to the literal pool, it’s appended to the list of 31 When an instruction using a literal is emitted, the literal's checkpoint 36 literal pool is emitted. The emission will include an optional branch to let the [all …]
|
/external/tensorflow/tensorflow/compiler/tf2xla/ |
D | xla_op_kernel.cc | 158 static Status LiteralToInt64Scalar(const xla::Literal& literal, int64* out) { in LiteralToInt64Scalar() argument 159 if (xla::ShapeUtil::Rank(literal.shape()) != 0) { in LiteralToInt64Scalar() 162 if (literal.shape().element_type() == xla::S32) { in LiteralToInt64Scalar() 163 *out = literal.Get<int32>({}); in LiteralToInt64Scalar() 164 } else if (literal.shape().element_type() == xla::S64) { in LiteralToInt64Scalar() 165 *out = literal.Get<int64>({}); in LiteralToInt64Scalar() 173 static Status LiteralToFloat64Scalar(const xla::Literal& literal, double* out) { in LiteralToFloat64Scalar() argument 174 if (xla::ShapeUtil::Rank(literal.shape()) != 0) { in LiteralToFloat64Scalar() 177 if (literal.shape().element_type() == xla::F32) { in LiteralToFloat64Scalar() 178 *out = literal.Get<float>({}); in LiteralToFloat64Scalar() [all …]
|
D | literal_util.cc | 25 Status HostTensorToLiteral(const Tensor& host_tensor, xla::Literal* literal) { in HostTensorToLiteral() argument 30 *literal = xla::Literal(literal_shape); in HostTensorToLiteral() 36 void* dst_ptr = literal->untyped_data(); in HostTensorToLiteral() 43 Status CopyLiteralToHostTensor(const xla::Literal& literal, in CopyLiteralToHostTensor() argument 45 TF_RET_CHECK(xla::ShapeUtil::IsArray(literal.shape()) && in CopyLiteralToHostTensor() 46 xla::ShapeUtil::ElementsIn(literal.shape()) == in CopyLiteralToHostTensor() 51 if (literal.shape().element_type() != primitive_type) { in CopyLiteralToHostTensor() 54 xla::PrimitiveType_Name(literal.shape().element_type()), in CopyLiteralToHostTensor() 59 const void* src_ptr = literal.untyped_data(); in CopyLiteralToHostTensor() 66 Status LiteralToHostTensor(const xla::Literal& literal, DataType target_type, in LiteralToHostTensor() argument [all …]
|
/external/tensorflow/tensorflow/compiler/xla/python/ |
D | numpy_bridge.cc | 350 PyObject* PyObjectFromXlaLiteral(const Literal& literal) { in PyObjectFromXlaLiteral() argument 351 if (ShapeUtil::IsTuple(literal.shape())) { in PyObjectFromXlaLiteral() 352 int num_elements = ShapeUtil::TupleElementCount(literal.shape()); in PyObjectFromXlaLiteral() 356 tuple, i, PyObjectFromXlaLiteral(LiteralView::Create(literal, {i}))); in PyObjectFromXlaLiteral() 360 int rank = ShapeUtil::Rank(literal.shape()); in PyObjectFromXlaLiteral() 363 dimensions[i] = ShapeUtil::GetDimension(literal.shape(), i); in PyObjectFromXlaLiteral() 365 int np_type = PrimitiveTypeToNumpyType(literal.shape().element_type()); in PyObjectFromXlaLiteral() 368 CopyLiteralToNumpyArray(np_type, literal, in PyObjectFromXlaLiteral() 381 TF_ASSIGN_OR_RETURN(auto literal, XlaLiteralFromPyObject(element)); in XlaLiteralFromPyObject() 382 elements.push_back(std::move(literal)); in XlaLiteralFromPyObject() [all …]
|
/external/clang/test/SemaObjC/ |
D | objc-literal-comparison.m | 1 // RUN: %clang_cc1 -fsyntax-only -Wno-everything -Wobjc-literal-compare "-Dnil=((id)0)" -verify %s 2 // RUN: %clang_cc1 -fsyntax-only -Wno-everything -Wobjc-literal-compare "-Dnil=(id)0" -verify %s 3 // RUN: %clang_cc1 -fsyntax-only -Wno-everything -Wobjc-literal-compare "-Dnil=0" -verify %s 5 // RUN: %clang_cc1 -fsyntax-only -Wno-everything -Wobjc-literal-compare -fobjc-arc "-Dnil=((id)0)" … 6 // RUN: %clang_cc1 -fsyntax-only -Wno-everything -Wobjc-literal-compare -fobjc-arc "-Dnil=(id)0" -v… 7 // RUN: %clang_cc1 -fsyntax-only -Wno-everything -Wobjc-literal-compare -fobjc-arc "-Dnil=0" -verif… 39 …if (obj == @"") return; // expected-warning{{direct comparison of a string literal has undefined b… 40 …if (obj != @"") return; // expected-warning{{direct comparison of a string literal has undefined b… 41 …if (@"" == obj) return; // expected-warning{{direct comparison of a string literal has undefined b… 42 …if (@"" == @"") return; // expected-warning{{direct comparison of a string literal has undefined b… [all …]
|
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/codegen/ |
D | ObjCTarget.java | 50 String literal) in getTargetCharLiteralFromANTLRCharLiteral() argument 52 if (literal.startsWith("'\\u") ) { in getTargetCharLiteralFromANTLRCharLiteral() 53 literal = "0x" +literal.substring(3, 7); in getTargetCharLiteralFromANTLRCharLiteral() 55 int c = literal.charAt(1); // TJP in getTargetCharLiteralFromANTLRCharLiteral() 57 literal = "0x" + Integer.toHexString(c); in getTargetCharLiteralFromANTLRCharLiteral() 61 return literal; in getTargetCharLiteralFromANTLRCharLiteral() 71 String literal) in getTargetStringLiteralFromANTLRStringLiteral() argument 73 literal = Utils.replace(literal,"\"","\\\""); in getTargetStringLiteralFromANTLRStringLiteral() 74 StringBuffer buf = new StringBuffer(literal); in getTargetStringLiteralFromANTLRStringLiteral() 76 buf.setCharAt(literal.length()-1,'"'); in getTargetStringLiteralFromANTLRStringLiteral()
|
D | DelphiTarget.java | 71 String literal) in getTargetCharLiteralFromANTLRCharLiteral() argument 74 int c = Grammar.getCharValueFromGrammarCharLiteral(literal); in getTargetCharLiteralFromANTLRCharLiteral() 118 String literal) in getTargetStringLiteralFromANTLRStringLiteral() argument 120 literal = Utils.replace(literal,"\\\'","''"); // \' to ' to normalize in getTargetStringLiteralFromANTLRStringLiteral() 121 literal = Utils.replace(literal,"\\r\\n","'#13#10'"); in getTargetStringLiteralFromANTLRStringLiteral() 122 literal = Utils.replace(literal,"\\r","'#13'"); in getTargetStringLiteralFromANTLRStringLiteral() 123 literal = Utils.replace(literal,"\\n","'#10'"); in getTargetStringLiteralFromANTLRStringLiteral() 124 StringBuffer buf = new StringBuffer(literal); in getTargetStringLiteralFromANTLRStringLiteral() 126 buf.setCharAt(literal.length()-1,'\''); in getTargetStringLiteralFromANTLRStringLiteral()
|
D | CTarget.java | 168 String literal) { in getTargetCharLiteralFromANTLRCharLiteral() argument 170 if (literal.startsWith("'\\u")) { in getTargetCharLiteralFromANTLRCharLiteral() 171 literal = "0x" + literal.substring(3, 7); in getTargetCharLiteralFromANTLRCharLiteral() 173 int c = literal.charAt(1); in getTargetCharLiteralFromANTLRCharLiteral() 176 literal = "0x" + Integer.toHexString(c); in getTargetCharLiteralFromANTLRCharLiteral() 180 return literal; in getTargetCharLiteralFromANTLRCharLiteral() 194 String literal) { in getTargetStringLiteralFromANTLRStringLiteral() argument 205 for (int i = 1; i < literal.length() - 1; i++) { in getTargetStringLiteralFromANTLRStringLiteral() 208 if (literal.charAt(i) == '\\') { in getTargetStringLiteralFromANTLRStringLiteral() 211 switch (literal.charAt(i)) { in getTargetStringLiteralFromANTLRStringLiteral() [all …]
|
/external/clang/test/SemaObjCXX/ |
D | warn-objc-literal-conversion.mm | 1 // RUN: %clang_cc1 -fsyntax-only -verify -Wobjc-literal-conversion %s 24 …// expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates… 29 …// expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates… 31 …// expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates… 33 …// expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates… 35 …// expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates… 40 …// expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates… 42 …// expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates… 44 …// expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates… 46 …// expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates… [all …]
|
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/immutable/instruction/ |
D | ImmutableInstructionFactory.java | 60 int literal) { in makeInstruction11n() argument 61 return new ImmutableInstruction11n(opcode, registerA, literal); in makeInstruction11n() 94 int literal) { in makeInstruction21ih() argument 95 return new ImmutableInstruction21ih(opcode, registerA, literal); in makeInstruction21ih() 100 long literal) { in makeInstruction21lh() argument 101 return new ImmutableInstruction21lh(opcode, registerA, literal); in makeInstruction21lh() 106 int literal) { in makeInstruction21s() argument 107 return new ImmutableInstruction21s(opcode, registerA, literal); in makeInstruction21s() 119 int literal) { in makeInstruction22b() argument 120 return new ImmutableInstruction22b(opcode, registerA, registerB, literal); in makeInstruction22b() [all …]
|
D | ImmutableInstruction21ih.java | 45 protected final int literal; field in ImmutableInstruction21ih 49 int literal) { in ImmutableInstruction21ih() argument 52 this.literal = Preconditions.checkIntegerHatLiteral(literal); in ImmutableInstruction21ih() 66 @Override public int getNarrowLiteral() { return literal; } in getNarrowLiteral() 67 @Override public long getWideLiteral() { return literal; } in getWideLiteral() 68 @Override public short getHatLiteral() { return (short)(literal >>> 16); } in getHatLiteral()
|
/external/tensorflow/tensorflow/compiler/xla/ |
D | text_literal_reader_test.cc | 45 std::unique_ptr<Literal> literal = in TEST() local 48 ShapeUtil::Equal(ShapeUtil::MakeShape(F32, {1, 2, 3}), literal->shape())); in TEST() 49 EXPECT_EQ(42.5, literal->Get<float>({0, 0, 0})); in TEST() 50 EXPECT_EQ(43.5, literal->Get<float>({0, 0, 1})); in TEST() 51 EXPECT_EQ(44.5, literal->Get<float>({0, 0, 2})); in TEST() 52 EXPECT_EQ(45.5, literal->Get<float>({0, 1, 0})); in TEST() 53 EXPECT_EQ(46.5, literal->Get<float>({0, 1, 1})); in TEST() 54 EXPECT_EQ(47.5, literal->Get<float>({0, 1, 2})); in TEST()
|
/external/tensorflow/tensorflow/compiler/xla/tools/ |
D | show_text_literal.cc | 39 std::unique_ptr<xla::Literal> literal = in main() local 42 LOG(INFO) << "literal: " << *literal; in main() 43 fprintf(stderr, "%s\n", literal->ToString().c_str()); in main() 44 if (literal->shape().element_type() == xla::F32) { in main() 45 float min = *std::min_element(literal->data<float>().begin(), in main() 46 literal->data<float>().end()); in main() 47 float max = *std::max_element(literal->data<float>().begin(), in main() 48 literal->data<float>().end()); in main()
|
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/builder/instruction/ |
D | BuilderInstruction21ih.java | 46 protected final int literal; field in BuilderInstruction21ih 50 int literal) { in BuilderInstruction21ih() argument 53 this.literal = Preconditions.checkIntegerHatLiteral(literal); in BuilderInstruction21ih() 57 @Override public int getNarrowLiteral() { return literal; } in getNarrowLiteral() 58 @Override public long getWideLiteral() { return literal; } in getWideLiteral() 59 @Override public short getHatLiteral() { return (short)(literal >>> 16); } in getHatLiteral()
|
/external/mesa3d/src/gallium/drivers/r600/sb/ |
D | sb_expr.h | 63 value* get_const(const literal &l); 81 bool eval_const_op(unsigned op, literal &r, literal cv0, literal cv1); 84 static void apply_alu_src_mod(const bc_alu &bc, unsigned src, literal &v); 85 static void apply_alu_dst_mod(const bc_alu &bc, literal &v); 89 static bool evaluate_condition(unsigned alu_cnd_flags, literal s1, 90 literal s2);
|
/external/dagger2/compiler/src/main/java/dagger/internal/codegen/writer/ |
D | StringLiteral.java | 70 private final String literal; field in StringLiteral 72 private StringLiteral(String value, String literal) { in StringLiteral() argument 74 this.literal = literal; in StringLiteral() 81 public String literal() { in literal() method in StringLiteral 82 return literal; in literal() 87 return literal; in toString()
|
/external/llvm/test/CodeGen/AMDGPU/ |
D | sra.ll | 66 ; EG: SUB_INT {{\*? *}}[[COMPSH:T[0-9]+\.[XYZW]]], {{literal.[xy]}}, [[SHIFT:T[0-9]+\.[XYZW]]] 68 ; EG-DAG: ADD_INT {{\*? *}}[[BIGSH:T[0-9]+\.[XYZW]]], [[SHIFT]], literal 73 ; EG-DAG: ASHR {{\*? *}}[[LOBIG:T[0-9]+\.[XYZW]]], [[OPHI]], literal 74 ; EG-DAG: ASHR {{\*? *}}[[HIBIG:T[0-9]+\.[XYZW]]], [[OPHI]], literal 75 ; EG-DAG: SETGT_UINT {{\*? *}}[[RESC:T[0-9]+\.[XYZW]]], [[SHIFT]], literal 92 ; EG-DAG: SUB_INT {{\*? *}}[[COMPSHA:T[0-9]+\.[XYZW]]], {{literal.[xy]}}, [[SHA:T[0-9]+\.[XYZW]]] 93 ; EG-DAG: SUB_INT {{\*? *}}[[COMPSHB:T[0-9]+\.[XYZW]]], {{literal.[xy]}}, [[SHB:T[0-9]+\.[XYZW]]] 104 ; EG-DAG: ADD_INT {{\*? *}}[[BIGSHA:T[0-9]+\.[XYZW]]]{{.*}}, literal 105 ; EG-DAG: ADD_INT {{\*? *}}[[BIGSHB:T[0-9]+\.[XYZW]]]{{.*}}, literal 108 ; EG-DAG: ASHR {{.*}}, literal [all …]
|
/external/v8/src/ast/ |
D | ast-value-factory.cc | 251 Vector<const uint8_t> literal) { in GetOneByteStringInternal() argument 252 if (literal.length() == 1 && IsInRange(literal[0], 'a', 'z')) { in GetOneByteStringInternal() 253 int key = literal[0] - 'a'; in GetOneByteStringInternal() 256 literal.start(), literal.length(), hash_seed_); in GetOneByteStringInternal() 257 one_character_strings_[key] = GetString(hash, true, literal); in GetOneByteStringInternal() 262 literal.start(), literal.length(), hash_seed_); in GetOneByteStringInternal() 263 return GetString(hash, true, literal); in GetOneByteStringInternal() 268 Vector<const uint16_t> literal) { in GetTwoByteStringInternal() argument 270 literal.start(), literal.length(), hash_seed_); in GetTwoByteStringInternal() 271 return GetString(hash, false, Vector<const byte>::cast(literal)); in GetTwoByteStringInternal() [all …]
|
/external/tensorflow/tensorflow/compiler/tf2xla/lib/ |
D | util.cc | 63 xla::Literal literal; in IntegerLiteral() local 66 literal = std::move(*xla::Literal::CreateR0<uint8>(value)); in IntegerLiteral() 69 literal = std::move(*xla::Literal::CreateR0<uint32>(value)); in IntegerLiteral() 72 literal = std::move(*xla::Literal::CreateR0<uint64>(value)); in IntegerLiteral() 75 literal = std::move(*xla::Literal::CreateR0<int8>(value)); in IntegerLiteral() 78 literal = std::move(*xla::Literal::CreateR0<int32>(value)); in IntegerLiteral() 81 literal = std::move(*xla::Literal::CreateR0<int64>(value)); in IntegerLiteral() 84 literal = std::move(*xla::Literal::CreateR0<float>(value)); in IntegerLiteral() 87 literal = std::move(*xla::Literal::CreateR0<double>(value)); in IntegerLiteral() 90 literal = std::move(*xla::Literal::CreateR0<complex64>(value)); in IntegerLiteral() [all …]
|