Home
last modified time | relevance | path

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

12

/external/libtextclassifier/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.h98 inline bool ConsumePrefix(StringPiece *text, StringPiece prefix) { in ConsumePrefix() function
/external/tensorflow/tensorflow/core/util/
Dcommand_line_flags.cc34 if (str_util::ConsumePrefix(&arg, "--") && in ParseStringFlag()
35 str_util::ConsumePrefix(&arg, flag) && in ParseStringFlag()
36 str_util::ConsumePrefix(&arg, "=")) { in ParseStringFlag()
48 if (str_util::ConsumePrefix(&arg, "--") && in ParseInt32Flag()
49 str_util::ConsumePrefix(&arg, flag) && in ParseInt32Flag()
50 str_util::ConsumePrefix(&arg, "=")) { in ParseInt32Flag()
70 if (str_util::ConsumePrefix(&arg, "--") && in ParseInt64Flag()
71 str_util::ConsumePrefix(&arg, flag) && in ParseInt64Flag()
72 str_util::ConsumePrefix(&arg, "=")) { in ParseInt64Flag()
92 if (str_util::ConsumePrefix(&arg, "--") && in ParseBoolFlag()
[all …]
Ddevice_name_utils.cc121 if (str_util::ConsumePrefix(&fullname, "/job:")) { in ParseFullName()
122 p->has_job = !str_util::ConsumePrefix(&fullname, "*"); in ParseFullName()
128 if (str_util::ConsumePrefix(&fullname, "/replica:")) { in ParseFullName()
129 p->has_replica = !str_util::ConsumePrefix(&fullname, "*"); in ParseFullName()
135 if (str_util::ConsumePrefix(&fullname, "/task:")) { in ParseFullName()
136 p->has_task = !str_util::ConsumePrefix(&fullname, "*"); in ParseFullName()
142 if (str_util::ConsumePrefix(&fullname, "/device:")) { in ParseFullName()
143 p->has_type = !str_util::ConsumePrefix(&fullname, "*"); in ParseFullName()
147 if (!str_util::ConsumePrefix(&fullname, ":")) { in ParseFullName()
150 p->has_id = !str_util::ConsumePrefix(&fullname, "*"); in ParseFullName()
[all …]
Dsemver_test.cc37 if (!str_util::ConsumePrefix(s, prefix)) return false; in ConsumeDotSeparatedIdentifiers()
57 ASSERT_TRUE(str_util::ConsumePrefix(&semver, ".")); in TEST()
59 ASSERT_TRUE(str_util::ConsumePrefix(&semver, ".")); in TEST()
66 if (str_util::ConsumePrefix(&semver, "head")) { in TEST()
/external/tensorflow/tensorflow/core/framework/
Dop_def_builder.cc115 if (str_util::ConsumePrefix(sp, "numbertype") || in ConsumeCompoundAttrType()
116 str_util::ConsumePrefix(sp, "numerictype") || in ConsumeCompoundAttrType()
117 str_util::ConsumePrefix(sp, "quantizedtype") || in ConsumeCompoundAttrType()
118 str_util::ConsumePrefix(sp, "realnumbertype") || in ConsumeCompoundAttrType()
119 str_util::ConsumePrefix(sp, "realnumberictype")) { in ConsumeCompoundAttrType()
160 if (str_util::ConsumePrefix(&spec, "string")) { in FinalizeAttr()
162 } else if (str_util::ConsumePrefix(&spec, "int")) { in FinalizeAttr()
164 } else if (str_util::ConsumePrefix(&spec, "float")) { in FinalizeAttr()
166 } else if (str_util::ConsumePrefix(&spec, "bool")) { in FinalizeAttr()
168 } else if (str_util::ConsumePrefix(&spec, "type")) { in FinalizeAttr()
[all …]
Dattr_value_util.cc377 bool is_list = str_util::ConsumePrefix(&type, "list("); in ParseAttrValue()
378 if (str_util::ConsumePrefix(&type, "string")) { in ParseAttrValue()
380 } else if (str_util::ConsumePrefix(&type, "int")) { in ParseAttrValue()
382 } else if (str_util::ConsumePrefix(&type, "float")) { in ParseAttrValue()
384 } else if (str_util::ConsumePrefix(&type, "bool")) { in ParseAttrValue()
386 } else if (str_util::ConsumePrefix(&type, "type")) { in ParseAttrValue()
388 } else if (str_util::ConsumePrefix(&type, "shape")) { in ParseAttrValue()
390 } else if (str_util::ConsumePrefix(&type, "tensor")) { in ParseAttrValue()
392 } else if (str_util::ConsumePrefix(&type, "func")) { in ParseAttrValue()
394 } else if (str_util::ConsumePrefix(&type, "placeholder")) { in ParseAttrValue()
[all …]
Dop_gen_lib.cc58 while (str_util::ConsumePrefix(&str, " ")) { in WordWrap()
70 if (str_util::ConsumePrefix(description, "=")) { in ConsumeEquals()
71 while (str_util::ConsumePrefix(description, in ConsumeEquals()
104 while (str_util::ConsumePrefix(&up_to_colon, " ")) in StartsWithFieldName()
125 while (str_util::ConsumePrefix(&after_colon, " ")) in ConvertLine()
127 if (!str_util::ConsumePrefix(&after_colon, "\"")) { in ConvertLine()
187 while (str_util::ConsumePrefix(&line, " ")) { in FindMultiline()
189 if (str_util::ConsumePrefix(&line, "<<")) { in FindMultiline()
233 if (str_util::ConsumePrefix(&line, end)) break; in PBTxtFromMultiline()
Dop_def_util.cc274 bool is_list = str_util::ConsumePrefix(&type, "list("); in ValidateOpDef()
278 if (str_util::ConsumePrefix(&type, valid)) { in ValidateOpDef()
286 VALIDATE(str_util::ConsumePrefix(&type, ")"), in ValidateOpDef()
/external/tensorflow/tensorflow/core/lib/strings/
Dstr_util_test.cc201 TEST(ConsumePrefix, Basic) { in TEST() argument
204 EXPECT_FALSE(str_util::ConsumePrefix(&input, "abcdefg")); in TEST()
207 EXPECT_FALSE(str_util::ConsumePrefix(&input, "abce")); in TEST()
210 EXPECT_TRUE(str_util::ConsumePrefix(&input, "")); in TEST()
213 EXPECT_FALSE(str_util::ConsumePrefix(&input, "abcdeg")); in TEST()
216 EXPECT_TRUE(str_util::ConsumePrefix(&input, "abcdef")); in TEST()
220 EXPECT_TRUE(str_util::ConsumePrefix(&input, "abcde")); in TEST()
Dscanner.h79 str_util::ConsumePrefix(&cur_, s); in ZeroOrOneLiteral()
86 if (!str_util::ConsumePrefix(&cur_, s)) { in OneLiteral()
Dnumbers.cc228 if (str_util::ConsumePrefix(&str, "-")) { in safe_strto64()
290 if (str_util::ConsumePrefix(&str, "-")) { in safe_strto32()
Dstr_util.h71 bool ConsumePrefix(StringPiece* s, StringPiece expected);
Dstr_util.cc378 bool ConsumePrefix(StringPiece* s, StringPiece expected) { in ConsumePrefix() function
/external/tensorflow/tensorflow/cc/tutorials/
Dexample_trainer.cc170 if (tensorflow::str_util::ConsumePrefix(&arg, flag) && in ParseInt32Flag()
171 tensorflow::str_util::ConsumePrefix(&arg, "=")) { in ParseInt32Flag()
181 if (tensorflow::str_util::ConsumePrefix(&arg, flag)) { in ParseBoolFlag()
/external/tensorflow/tensorflow/core/platform/
Dfile_system_test.cc127 str_util::ConsumePrefix(&path, "/"); in ParsePath()
163 EXPECT_TRUE(str_util::ConsumePrefix(&trimmed_result, in Match()
/external/libtextclassifier/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/python/framework/
Dpython_op_gen_main.cc99 if (str_util::ConsumePrefix(&command_str, kExecPrefix) && in InferSourceFileName()
/external/tensorflow/tensorflow/core/graph/
Dgraph_constructor.cc565 if (str_util::ConsumePrefix(&s, kColocationGroupPrefix) && in ValidateColocationConstraints()
804 if (str_util::ConsumePrefix(&input, "^")) { in AddPrefixToNodeDef()
816 if (str_util::ConsumePrefix(&v, kColocationGroupPrefix)) { in AddPrefixToNodeDef()
859 if (str_util::ConsumePrefix(&val, kColocationGroupPrefix)) { in UpdateUniquifiedColocationNames()
/external/tensorflow/tensorflow/contrib/android/
Dasset_manager_filesystem.cc233 str_util::ConsumePrefix(&piece, prefix_); in RemoveAssetPrefix()
/external/tensorflow/tensorflow/core/platform/cloud/
Dgcs_file_system.cc188 str_util::ConsumePrefix(&objectp, "/"); in ParseGcsPath()
551 str_util::ConsumePrefix(&range_piece, in RequestUploadSessionStatus()
1341 if (!str_util::ConsumePrefix(&relative_path, object_prefix)) { in GetChildrenBounded()
1370 if (!str_util::ConsumePrefix(&relative_path, object_prefix)) { in GetChildrenBounded()
/external/tensorflow/tensorflow/java/src/gen/cc/
Dop_specs.cc133 if (str_util::ConsumePrefix(&attr_type, "list(")) { in TypesOf()
/external/tensorflow/tensorflow/core/platform/s3/
Ds3_file_system.cc158 str_util::ConsumePrefix(&objectp, "/"); in ParseS3Path()

12