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

Method ReadData

tensorflow/lite/delegates/gpu/cl/texture2d.h:103–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101
102template <typename T>
103Status Texture2D::ReadData(CLCommandQueue* queue,
104 std::vector<T>* result) const {
105 const int element_size = ChannelTypeToSizeInBytes(channel_type_);
106 if (sizeof(T) != element_size) {
107 return InvalidArgumentError("Pixel format is different.");
108 }
109
110 const int elements_count = width_ * height_ * 4;
111 result->resize(elements_count);
112
113 return queue->EnqueueReadImage(texture_, int3(width_, height_, 1),
114 result->data());
115}
116
117} // namespace cl
118} // namespace gpu

Callers

nothing calls this directly

Calls 5

ChannelTypeToSizeInBytesFunction · 0.85
EnqueueReadImageMethod · 0.80
InvalidArgumentErrorFunction · 0.50
resizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected