Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small header changes and a Doxygen tweak to shape the C++ API a bit b… #5304

Merged
merged 1 commit into from Oct 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions tensorflow/core/framework/tensor.h
Expand Up @@ -466,6 +466,8 @@ class Tensor {

// Implementation details

// START_SKIP_DOXYGEN

// Interface to access the raw ref-counted data buffer.
class TensorBuffer : public core::RefCounted {
public:
Expand Down Expand Up @@ -659,6 +661,8 @@ inline Tensor& Tensor::operator=(Tensor&& other) {
return *this;
}

// END_SKIP_DOXYGEN

} // namespace tensorflow

#endif // TENSORFLOW_CORE_FRAMEWORK_TENSOR_H_
16 changes: 15 additions & 1 deletion tensorflow/core/framework/tensor_shape.h
Expand Up @@ -31,8 +31,19 @@ limitations under the License.

namespace tensorflow {

// START_SKIP_DOXYGEN
class TensorShapeIter; // Declared below

// END_SKIP_DOXYGEN

/// Represents the shape of a Tensor.
///
/// A tensor's shape is denoted by its number of dimensions and a size for each
/// dimension. For example, a Tensor represented by a 3 x 4 matrix would have
/// a shape of 2-D, [3,4].
///
/// If you know the exact shape of your Tensor when you create the TensorShape
/// object, you can specify it then, or you can create a TensorShape with
/// zero dimensions and one element, and call AddDim() to add dimensions later.
class TensorShape {
public:
/// \brief Construct a `TensorShape` from the provided sizes.
Expand Down Expand Up @@ -220,11 +231,13 @@ class TensorShape {
int64 num_elements_;
};

/// Represents the value of one dimension in a TensorShape.
struct TensorShapeDim {
explicit TensorShapeDim(int64 s) : size(s) {}
int64 size;
};

// START_SKIP_DOXYGEN
class TensorShapeIter {
public:
TensorShapeIter(const TensorShape* shape, int d) : shape_(shape), d_(d) {}
Expand All @@ -243,6 +256,7 @@ class TensorShapeIter {
const TensorShape* shape_;
int d_;
};
// END_SKIP_DOXYGEN

/// \brief Static helper routines for `TensorShape`. Includes a few common
/// predicates on a tensor shape.
Expand Down
1 change: 1 addition & 0 deletions tensorflow/core/lib/core/status.h
Expand Up @@ -25,6 +25,7 @@ limitations under the License.

namespace tensorflow {

/// Denotes success or failure of a call in Tensorflow.
class Status {
public:
/// Create a success status.
Expand Down
5 changes: 5 additions & 0 deletions tensorflow/core/platform/env.h
Expand Up @@ -343,6 +343,7 @@ class EnvWrapper : public Env {
Env* target_;
};

/// Represents a thread used to run a Tensorflow function.
class Thread {
public:
Thread() {}
Expand Down Expand Up @@ -382,6 +383,8 @@ Status WriteBinaryProto(Env* env, const string& fname,
Status ReadBinaryProto(Env* env, const string& fname,
::tensorflow::protobuf::MessageLite* proto);

// START_SKIP_DOXYGEN

namespace register_file_system {

template <typename Factory>
Expand All @@ -394,6 +397,8 @@ struct Register {

} // namespace register_file_system

// END_SKIP_DOXYGEN

} // namespace tensorflow

// Register a FileSystem implementation for a scheme. Files with names that have
Expand Down
4 changes: 4 additions & 0 deletions tensorflow/core/platform/file_system.h
Expand Up @@ -98,6 +98,8 @@ class FileSystem {
virtual Status IsDirectory(const string& fname);
};

// START_SKIP_DOXYGEN

#ifndef SWIG
// Degenerate file system that provides no implementations.
class NullFileSystem : public FileSystem {
Expand Down Expand Up @@ -160,6 +162,8 @@ class NullFileSystem : public FileSystem {
};
#endif

// END_SKIP_DOXYGEN

/// A file abstraction for randomly reading the contents of a file.
class RandomAccessFile {
public:
Expand Down