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

Function ToInputCoord

tensorflow/core/kernels/mirror_pad_op.h:286–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284 };
285
286 EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Index ToInputCoord(Index k,
287 int dim) const {
288 const Index m = impl_.dimensions()[dim];
289 k -= padding_[dim].first;
290 if (k < 0) {
291 return -k + left_offset_;
292 }
293 if (k < m) {
294 return k;
295 }
296 return m - (k - m) + right_offset_;
297 }
298
299 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index
300 ToInputIndex(const Coords& coords) const {

Callers 2

coeffFunction · 0.85
ToInputIndexFunction · 0.85

Calls 1

dimensionsMethod · 0.45

Tested by

no test coverage detected