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

Function TfLiteTensorRealloc

tensorflow/lite/c/c_api_internal.c:143–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143void TfLiteTensorRealloc(size_t num_bytes, TfLiteTensor* tensor) {
144 if (tensor->allocation_type != kTfLiteDynamic) {
145 return;
146 }
147 if (!tensor->data.raw) {
148 tensor->data.raw = malloc(num_bytes);
149 } else if (num_bytes > tensor->bytes) {
150 tensor->data.raw = realloc(tensor->data.raw, num_bytes);
151 }
152 tensor->bytes = num_bytes;
153}
154#endif // TF_LITE_STATIC_MEMORY
155
156const char* TfLiteTypeGetName(TfLiteType type) {

Callers 7

TESTFunction · 0.85
MakeLiteTensorFunction · 0.85
MakeLiteTensor<string>Function · 0.85
ResizeTensorImplMethod · 0.85
EvalFunction · 0.85
EvalFunction · 0.85
AssignFromMethod · 0.85

Calls

no outgoing calls

Tested by 3

TESTFunction · 0.68
MakeLiteTensorFunction · 0.68
MakeLiteTensor<string>Function · 0.68