Home
last modified time | relevance | path

Searched refs:ConsumePrefix (Results 1 – 25 of 38) sorted by relevance

12

/external/libtextclassifier/native/utils/strings/
Dstringpiece_test.cc43 TEST(StringPieceTest, ConsumePrefix) { in TEST() argument
45 EXPECT_TRUE(ConsumePrefix(&str, "hello ")); in TEST()
47 EXPECT_TRUE(ConsumePrefix(&str, "there")); in TEST()
49 EXPECT_FALSE(ConsumePrefix(&str, "!!")); in TEST()
50 EXPECT_TRUE(ConsumePrefix(&str, "")); in TEST()
51 EXPECT_TRUE(ConsumePrefix(&str, "!")); in TEST()
53 EXPECT_TRUE(ConsumePrefix(&str, "")); in TEST()
54 EXPECT_FALSE(ConsumePrefix(&str, "!")); in TEST()
Dstringpiece.h155 inline bool ConsumePrefix(StringPiece* text, StringPiece prefix) { in ConsumePrefix() function
/external/tensorflow/tensorflow/core/util/
Dcommand_line_flags.cc34 if (absl::ConsumePrefix(&arg, "--") && absl::ConsumePrefix(&arg, flag) && in ParseStringFlag()
35 absl::ConsumePrefix(&arg, "=")) { in ParseStringFlag()
47 if (absl::ConsumePrefix(&arg, "--") && absl::ConsumePrefix(&arg, flag) && in ParseInt32Flag()
48 absl::ConsumePrefix(&arg, "=")) { in ParseInt32Flag()
68 if (absl::ConsumePrefix(&arg, "--") && absl::ConsumePrefix(&arg, flag) && in ParseInt64Flag()
69 absl::ConsumePrefix(&arg, "=")) { in ParseInt64Flag()
89 if (absl::ConsumePrefix(&arg, "--") && absl::ConsumePrefix(&arg, flag)) { in ParseBoolFlag()
116 if (absl::ConsumePrefix(&arg, "--") && absl::ConsumePrefix(&arg, flag) && in ParseFloatFlag()
117 absl::ConsumePrefix(&arg, "=")) { in ParseFloatFlag()
Ddevice_name_utils.cc41 static bool ConsumePrefix(StringPiece* in, string* out, in ConsumePrefix() function
57 return ConsumePrefix(in, job, "/"); in ConsumeJobName()
63 return ConsumePrefix(in, device_type, "/:"); in ConsumeDeviceType()
111 if (absl::ConsumePrefix(&fullname, "/job:")) { in ParseFullName()
112 p->has_job = !absl::ConsumePrefix(&fullname, "*"); in ParseFullName()
118 if (absl::ConsumePrefix(&fullname, "/replica:")) { in ParseFullName()
119 p->has_replica = !absl::ConsumePrefix(&fullname, "*"); in ParseFullName()
125 if (absl::ConsumePrefix(&fullname, "/task:")) { in ParseFullName()
126 p->has_task = !absl::ConsumePrefix(&fullname, "*"); in ParseFullName()
132 if (absl::ConsumePrefix(&fullname, "/device:")) { in ParseFullName()
[all …]
Dsemver_test.cc37 if (!absl::ConsumePrefix(s, prefix)) return false; in ConsumeDotSeparatedIdentifiers()
57 ASSERT_TRUE(absl::ConsumePrefix(&semver, ".")); in TEST()
59 ASSERT_TRUE(absl::ConsumePrefix(&semver, ".")); in TEST()
66 if (absl::ConsumePrefix(&semver, "head")) { in TEST()
/external/tensorflow/tensorflow/core/framework/
Dop_def_builder.cc117 if (absl::ConsumePrefix(sp, "numbertype") || in ConsumeCompoundAttrType()
118 absl::ConsumePrefix(sp, "numerictype") || in ConsumeCompoundAttrType()
119 absl::ConsumePrefix(sp, "quantizedtype") || in ConsumeCompoundAttrType()
120 absl::ConsumePrefix(sp, "realnumbertype") || in ConsumeCompoundAttrType()
121 absl::ConsumePrefix(sp, "realnumberictype")) { in ConsumeCompoundAttrType()
162 if (absl::ConsumePrefix(&spec, "string")) { in FinalizeAttr()
164 } else if (absl::ConsumePrefix(&spec, "int")) { in FinalizeAttr()
166 } else if (absl::ConsumePrefix(&spec, "float")) { in FinalizeAttr()
168 } else if (absl::ConsumePrefix(&spec, "bool")) { in FinalizeAttr()
170 } else if (absl::ConsumePrefix(&spec, "type")) { in FinalizeAttr()
[all …]
Dattr_value_util.cc400 bool is_list = absl::ConsumePrefix(&type, "list("); in ParseAttrValue()
401 if (absl::ConsumePrefix(&type, "string")) { in ParseAttrValue()
403 } else if (absl::ConsumePrefix(&type, "int")) { in ParseAttrValue()
405 } else if (absl::ConsumePrefix(&type, "float")) { in ParseAttrValue()
407 } else if (absl::ConsumePrefix(&type, "bool")) { in ParseAttrValue()
409 } else if (absl::ConsumePrefix(&type, "type")) { in ParseAttrValue()
411 } else if (absl::ConsumePrefix(&type, "shape")) { in ParseAttrValue()
413 } else if (absl::ConsumePrefix(&type, "tensor")) { in ParseAttrValue()
415 } else if (absl::ConsumePrefix(&type, "func")) { in ParseAttrValue()
417 } else if (absl::ConsumePrefix(&type, "placeholder")) { in ParseAttrValue()
[all …]
Dop_gen_lib.cc60 while (absl::ConsumePrefix(&str, " ")) { in WordWrap()
72 if (absl::ConsumePrefix(description, "=")) { in ConsumeEquals()
73 while (absl::ConsumePrefix(description, in ConsumeEquals()
106 while (absl::ConsumePrefix(&up_to_colon, " ")) in StartsWithFieldName()
127 while (absl::ConsumePrefix(&after_colon, " ")) in ConvertLine()
129 if (!absl::ConsumePrefix(&after_colon, "\"")) { in ConvertLine()
189 while (absl::ConsumePrefix(&line, " ")) { in FindMultiline()
191 if (absl::ConsumePrefix(&line, "<<")) { in FindMultiline()
235 if (absl::ConsumePrefix(&line, end)) break; in PBTxtFromMultiline()
Dop_def_util.cc288 bool is_list = absl::ConsumePrefix(&type, "list("); in ValidateOpDef()
292 if (absl::ConsumePrefix(&type, valid)) { in ValidateOpDef()
300 VALIDATE(absl::ConsumePrefix(&type, ")"), in ValidateOpDef()
/external/tensorflow/tensorflow/core/platform/
Dstr_util_test.cc202 TEST(ConsumePrefix, Basic) { in TEST() argument
205 EXPECT_FALSE(str_util::ConsumePrefix(&input, "abcdefg")); in TEST()
208 EXPECT_FALSE(str_util::ConsumePrefix(&input, "abce")); in TEST()
211 EXPECT_TRUE(str_util::ConsumePrefix(&input, "")); in TEST()
214 EXPECT_FALSE(str_util::ConsumePrefix(&input, "abcdeg")); in TEST()
217 EXPECT_TRUE(str_util::ConsumePrefix(&input, "abcdef")); in TEST()
221 EXPECT_TRUE(str_util::ConsumePrefix(&input, "abcde")); in TEST()
Dscanner.h81 str_util::ConsumePrefix(&cur_, s); in ZeroOrOneLiteral()
88 if (!str_util::ConsumePrefix(&cur_, s)) { in OneLiteral()
Dstr_util.cc107 bool ConsumePrefix(StringPiece* s, StringPiece expected) { in ConsumePrefix() function
108 return absl::ConsumePrefix(s, expected); in ConsumePrefix()
Dfile_system_test.cc127 absl::ConsumePrefix(&path, "/"); in ParsePath()
164 absl::ConsumePrefix(&trimmed_result, strings::StrCat(kPrefix, "/"))); in Match()
Dstr_util.h73 bool ConsumePrefix(StringPiece* s, StringPiece expected);
Dnumbers.cc228 if (absl::ConsumePrefix(&str, "-")) { in safe_strto64()
290 if (absl::ConsumePrefix(&str, "-")) { in safe_strto32()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/utils/
Dparse_text_proto.cc37 Status ConsumePrefix(absl::string_view str, absl::string_view prefix, in ConsumePrefix() function
59 ConsumePrefix(text_proto, prefix_to_strip, &text_proto_without_prefix)); in ParseTextProto()
Dparse_text_proto.h28 Status ConsumePrefix(absl::string_view str, absl::string_view prefix,
Dmangling_util.cc85 TF_RETURN_IF_ERROR(ConsumePrefix(str, kDataTypePrefix, &pbtxt)); in DemangleDataType()
/external/tensorflow/tensorflow/cc/tutorials/
Dexample_trainer.cc170 if (absl::ConsumePrefix(&arg, flag) && absl::ConsumePrefix(&arg, "=")) { in ParseInt32Flag()
180 if (absl::ConsumePrefix(&arg, flag)) { in ParseBoolFlag()
/external/tensorflow/tensorflow/core/profiler/utils/
Dcost_utils.cc83 absl::ConsumePrefix(&shapes_stats, "("); in Predict()
/external/libtextclassifier/native/utils/sentencepiece/
Dnormalizer.cc87 while (is_prev_space && ConsumePrefix(&sp, " ")) { in Normalize()
/external/tensorflow/tensorflow/compiler/xla/
Dtext_literal_reader.cc89 if (!absl::ConsumePrefix(&coordinates_string, "(")) { in ReadAllLines()
/external/tensorflow/tensorflow/lite/toco/
Dargs.cc98 bool res = absl::ConsumePrefix(&str, prefix); in TryStripPrefixString()
/external/tensorflow/tensorflow/compiler/jit/
Dflags.cc64 if (!absl::ConsumePrefix(&value_sv, "single-gpu(") || in SetterForXlaAutoJitFlag()
/external/tensorflow/tensorflow/python/framework/
Dpython_op_gen_main.cc99 if (absl::ConsumePrefix(&command_str, kExecPrefix) && in InferSourceFileName()

12