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

Function CopyTensorsData

tensorflow/lite/kernels/while.cc:71–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69// to `dst_tensor_indices` in `dst_subgraph`.
70template <typename SrcVector, typename DstVector>
71TfLiteStatus CopyTensorsData(TfLiteContext* context, Subgraph* src_subgraph,
72 const SrcVector& src_tensor_indices,
73 Subgraph* dst_subgraph,
74 const DstVector& dst_tensor_indices) {
75 TF_LITE_ENSURE_EQ(context, src_tensor_indices.size(),
76 dst_tensor_indices.size());
77 for (int i = 0; i < src_tensor_indices.size(); ++i) {
78 const TfLiteTensor* src_tensor =
79 src_subgraph->tensor(src_tensor_indices[i]);
80 TfLiteTensor* dst_tensor = dst_subgraph->tensor(dst_tensor_indices[i]);
81 TF_LITE_ENSURE_EQ(context, src_tensor->bytes, dst_tensor->bytes);
82 memcpy(dst_tensor->data.raw, src_tensor->data.raw, src_tensor->bytes);
83 }
84 return kTfLiteOk;
85}
86
87TfLiteStatus CheckCondOutput(TfLiteContext* context,
88 const TfLiteTensor* cond_output) {

Callers 1

EvalFunction · 0.85

Calls 2

sizeMethod · 0.45
tensorMethod · 0.45

Tested by

no test coverage detected