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

Method GetOffsetAfter

tensorflow/lite/arena_planner_test.cc:193–201  ·  view source on GitHub ↗

Returns the first aligned offset after a given tensor.

Source from the content-addressed store, hash-verified

191
192 // Returns the first aligned offset after a given tensor.
193 int64_t GetOffsetAfter(int tensor_index) {
194 const TfLiteTensor& tensor = (*graph_->tensors())[tensor_index];
195 int64_t offset = GetOffset(tensor_index) + tensor.bytes;
196 // We must make sure the offset is aligned to kDefaultArenaAlignment.
197 if (offset % kTensorAlignment != 0) {
198 offset += kTensorAlignment - offset % kTensorAlignment;
199 }
200 return offset;
201 };
202
203 TfLiteContext context_;
204 TestGraph* graph_;

Callers

nothing calls this directly

Calls 2

GetOffsetFunction · 0.85
tensorsMethod · 0.80

Tested by

no test coverage detected