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

Function Set16

tensorflow/core/framework/tensor_shape.cc:178–189  ·  view source on GitHub ↗

Returns true iff partial is true and val is < 0. REQUIRES: val < kMaxRep16 REQUIRES: partial || val >= 0

Source from the content-addressed store, hash-verified

176// REQUIRES: val < kMaxRep16
177// REQUIRES: partial || val >= 0
178static inline bool Set16(bool partial, uint16* dst, int dim, int64 val) {
179 if (partial) {
180 if (val < 0) {
181 dst[dim] = std::numeric_limits<uint16>::max();
182 return true;
183 }
184 } else {
185 CHECK_GE(val, 0);
186 }
187 dst[dim] = val;
188 return false;
189}
190
191template <class Shape>
192Status TensorShapeBase<Shape>::InitDims(gtl::ArraySlice<int64> dim_sizes) {

Callers 1

InitDimsMethod · 0.85

Calls 1

maxFunction · 0.50

Tested by

no test coverage detected