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

Function MakeGlBuffer

tensorflow/lite/delegates/gpu/gl/runtime.cc:135–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135Status MakeGlBuffer(const Object& object, const ObjectData& data,
136 GlBuffer* gl_buffer) {
137 if (data.size() % SizeOf(object.data_type) != 0) {
138 return InvalidArgumentError("Buffer size is not aligned");
139 }
140 return CreateReadOnlyShaderStorageBuffer(absl::MakeConstSpan(data),
141 gl_buffer);
142}
143
144// Looks up an object with the given id. If found, makes a binding function.
145Status MakeBindingFunc(const Object& object, uint32_t id,

Callers 1

AllocateConstObjectMethod · 0.85

Calls 4

SizeOfFunction · 0.50
InvalidArgumentErrorFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected