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

Method UpdateToCover

tensorflow/core/framework/tensor_slice.cc:243–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243void TensorSlice::UpdateToCover(const TensorSlice& other) {
244 DCHECK_EQ(dims(), other.dims());
245 for (int d = 0; d < dims(); ++d) {
246 if (!IsFullAt(d)) {
247 if (other.IsFullAt(d)) {
248 starts_[d] = 0;
249 lengths_[d] = kFullExtent;
250 } else {
251 const auto new_end = std::max(end(d), other.end(d));
252 set_start(d, std::min(start(d), other.start(d)));
253 set_length(d, new_end - start(d));
254 }
255 }
256 }
257}
258
259// static
260bool TensorSlice::HasExtentLength(const TensorSliceProto::Extent& extent) {

Callers 2

TESTFunction · 0.80
RegisterMethod · 0.80

Calls 8

dimsFunction · 0.85
startFunction · 0.85
IsFullAtMethod · 0.80
maxFunction · 0.50
minFunction · 0.50
dimsMethod · 0.45
endMethod · 0.45
startMethod · 0.45

Tested by 1

TESTFunction · 0.64