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

Method ResolveAlloc

tensorflow/lite/simple_memory_arena.cc:131–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131TfLiteStatus SimpleMemoryArena::ResolveAlloc(TfLiteContext* context,
132 const ArenaAlloc& alloc,
133 char** output_ptr) {
134 TF_LITE_ENSURE(context, committed_);
135 TF_LITE_ENSURE(context, output_ptr != nullptr);
136 if (alloc.size == 0) {
137 *output_ptr = nullptr;
138 } else {
139 *output_ptr = underlying_buffer_aligned_ptr_ + alloc.offset;
140 }
141 return kTfLiteOk;
142}
143
144TfLiteStatus SimpleMemoryArena::Clear() {
145 committed_ = false;

Callers 2

TESTFunction · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64