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

Method GetOffset

tensorflow/lite/arena_planner_test.cc:186–190  ·  view source on GitHub ↗

Returns the actual offset of a given tensor, relative to the start of its arena.

Source from the content-addressed store, hash-verified

184 // Returns the actual offset of a given tensor, relative to the start of its
185 // arena.
186 int64_t GetOffset(int tensor_index) {
187 const TfLiteTensor& tensor = (*graph_->tensors())[tensor_index];
188 return reinterpret_cast<int64_t>(tensor.data.raw) -
189 planner_->BasePointer(tensor.allocation_type);
190 }
191
192 // Returns the first aligned offset after a given tensor.
193 int64_t GetOffsetAfter(int tensor_index) {

Callers

nothing calls this directly

Calls 2

tensorsMethod · 0.80
BasePointerMethod · 0.45

Tested by

no test coverage detected