Returns the actual offset of a given tensor, relative to the start of its arena.
| 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) { |
nothing calls this directly
no test coverage detected