MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ShapeHandle

Class ShapeHandle

tensorflow/core/framework/shape_inference.h:99–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97};
98
99class ShapeHandle {
100 public:
101 ShapeHandle() {}
102 bool SameHandle(ShapeHandle s) const { return ptr_ == s.ptr_; }
103 std::size_t Handle() const { return reinterpret_cast<std::size_t>(ptr_); }
104
105 private:
106 ShapeHandle(const Shape* shape) { ptr_ = shape; }
107 const Shape* operator->() const { return ptr_; }
108 bool IsSet() const { return ptr_ != nullptr; }
109
110 const Shape* ptr_ = nullptr;
111
112 friend class InferenceContext;
113 friend class ShapeInferenceTest;
114 friend class ShapeInferenceTestutil;
115 friend class ::tensorflow::ShapeRefinerTest;
116 friend class ShapeManager;
117 friend class ::tensorflow::grappler::SymbolicShapeManager;
118
119 // Intentionally copyable.
120};
121
122// Struct used to allow functions to take DimensionHandle or a dimension value.
123// Not meant to be constructed directly.

Callers 3

TEST_FFunction · 0.85
UnknownMethod · 0.85

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.68