diff options
author | Manjunath Kudlur <keveman@gmail.com> | 2015-11-06 16:27:58 -0800 |
---|---|---|
committer | Manjunath Kudlur <keveman@gmail.com> | 2015-11-06 16:27:58 -0800 |
commit | f41959ccb2d9d4c722fe8fc3351401d53bcf4900 (patch) | |
tree | ef0ca22cb2a5ac4bdec9d080d8e0788a53ed496d /tensorflow/core/framework/op_gen_lib.h |
TensorFlow: Initial commit of TensorFlow library.
TensorFlow is an open source software library for numerical computation
using data flow graphs.
Base CL: 107276108
Diffstat (limited to 'tensorflow/core/framework/op_gen_lib.h')
-rw-r--r-- | tensorflow/core/framework/op_gen_lib.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tensorflow/core/framework/op_gen_lib.h b/tensorflow/core/framework/op_gen_lib.h new file mode 100644 index 0000000000..9890f1bcec --- /dev/null +++ b/tensorflow/core/framework/op_gen_lib.h @@ -0,0 +1,24 @@ +#ifndef TENSORFLOW_FRAMEWORK_OP_GEN_LIB_H_ +#define TENSORFLOW_FRAMEWORK_OP_GEN_LIB_H_ + +#include <string> +#include "tensorflow/core/lib/core/stringpiece.h" + +namespace tensorflow { + +inline string Spaces(int n) { return string(n, ' '); } + +// Wrap prefix + str to be at most width characters, indenting every line +// after the first by prefix.size() spaces. Intended use case is something +// like prefix = " Foo(" and str is a list of arguments (terminated by a ")"). +// TODO(josh11b): Option to wrap on ", " instead of " " when possible. +string WordWrap(StringPiece prefix, StringPiece str, int width); + +// Looks for an "=" at the beginning of *description. If found, strips it off +// (and any following spaces) from *description and return true. Otherwise +// returns false. +bool ConsumeEquals(StringPiece* description); + +} // namespace tensorflow + +#endif // TENSORFLOW_FRAMEWORK_OP_GEN_LIB_H_ |