MCPcopy Create free account
hub / github.com/GPUOpen-Tools/GPU-Reshape / Commit

Method Commit

Source/Libraries/Bridge/Source/RemoteClientBridge.cpp:250–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250void RemoteClientBridge::Commit() {
251 // Get number of streams
252 uint32_t streamCount;
253 storage.ConsumeStreams(&streamCount, nullptr);
254
255 // Get all streams
256 streamCache.resize(streamCount);
257 storage.ConsumeStreams(&streamCount, streamCache.data());
258
259 // Push all streams
260 for (uint32_t i = 0; i < streamCount; i++) {
261 const MessageStream &stream = streamCache[i];
262
263 // Setup protocol header
264 MessageStreamHeaderProtocol protocol;
265 protocol.schema = stream.GetSchema();
266 protocol.versionID = stream.GetVersionID();
267 protocol.size = stream.GetByteSize();
268
269 // Send header and stream data (sync)
270 client->WriteAsync(&protocol, sizeof(protocol));
271 client->WriteAsync(stream.GetDataBegin(), protocol.size);
272
273 // Tracking
274 info.bytesWritten += sizeof(protocol);
275 info.bytesWritten += protocol.size;
276 }
277
278 // Commit all inbound streams
279 memoryBridge.Commit();
280}

Callers 4

OnConnectedMethod · 0.45
OnResolveMethod · 0.45
OnDiscoveryMethod · 0.45
OnReadAsyncMethod · 0.45

Calls 8

ConsumeStreamsMethod · 0.80
resizeMethod · 0.80
dataMethod · 0.80
GetDataBeginMethod · 0.80
GetSchemaMethod · 0.45
GetVersionIDMethod · 0.45
GetByteSizeMethod · 0.45
WriteAsyncMethod · 0.45

Tested by

no test coverage detected