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

Function CopyVectorToTfLiteIntArray

tensorflow/lite/core/subgraph.cc:230–234  ·  view source on GitHub ↗

Copy a std::vector to an existing TfLiteIntArray. This is a low-level data manipulation function, and it's caller's responsibility to ensure TfLiteIntArray has enough size.

Source from the content-addressed store, hash-verified

228// This is a low-level data manipulation function, and it's caller's
229// responsibility to ensure TfLiteIntArray has enough size.
230void CopyVectorToTfLiteIntArray(const std::vector<int>& vec,
231 TfLiteIntArray* arr) {
232 arr->size = vec.size();
233 memcpy(arr->data, vec.data(), sizeof(int) * arr->size);
234}
235
236// This function allocates a continuous memory space that contains a
237// TfLiteDelegateParams followed by a several TfLiteIntArray.

Callers 1

CreateDelegateParamsFunction · 0.85

Calls 2

sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected