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

Method ReadData

tensorflow/lite/delegates/gpu/cl/buffer.h:84–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82
83template <typename T>
84Status Buffer::ReadData(CLCommandQueue* queue, std::vector<T>* result) const {
85 if (size_ % sizeof(T) != 0) {
86 return UnknownError("Wrong element size(typename T is not correct?");
87 }
88
89 const int elements_count = size_ / sizeof(T);
90 result->resize(elements_count);
91
92 return queue->EnqueueReadBuffer(buffer_, size_, result->data());
93}
94
95} // namespace cl
96} // namespace gpu

Callers 2

GetOutputTensorMethod · 0.45
ExecuteGPUOperationFunction · 0.45

Calls 4

EnqueueReadBufferMethod · 0.80
UnknownErrorFunction · 0.50
resizeMethod · 0.45
dataMethod · 0.45

Tested by 1

ExecuteGPUOperationFunction · 0.36