MCPcopy Create free account
hub / github.com/RenderKit/ospray / commit

Function commit

modules/mpi/ospray/common/OSPWork.cpp:290–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290void commit(OSPState &state,
291 networking::BufferReader &cmdBuf,
292 networking::Fabric &fabric)
293{
294 int64_t handle = 0;
295 uint32_t isSharedData = 0;
296 cmdBuf >> handle >> isSharedData;
297
298 // If it's a data being committed, we need to retrieve the updated data
299 if (isSharedData) {
300 OSPDataType format = OSP_UNKNOWN;
301 vec3ul numItems = 0;
302 cmdBuf >> format >> numItems;
303 auto data = retrieveData(state, cmdBuf, fabric, format, numItems);
304
305 auto subscopy = (OSPData)state.objects[handle];
306
307 // gives an opportunity to pass off to internal device(s)
308 auto forsubs = ospNewSharedData(
309 data->data(), format, numItems.x, 0, numItems.y, 0, numItems.z, 0);
310 ospCopyData(forsubs, subscopy);
311 ospCommit(subscopy);
312 ospRelease(forsubs);
313 }
314
315 ospCommit(state.objects[handle]);
316}
317
318void release(
319 OSPState &state, networking::BufferReader &cmdBuf, networking::Fabric &)

Callers 15

dispatchWorkFunction · 0.70
commitMethod · 0.70
commitMethod · 0.50
commitMethod · 0.50
commitMethod · 0.50
commitMethod · 0.50
commitMethod · 0.50
SetUpMethod · 0.50
mainFunction · 0.50
mainFunction · 0.50
commitMethod · 0.50
commitMethod · 0.50

Calls 6

retrieveDataFunction · 0.85
ospNewSharedDataFunction · 0.85
ospCopyDataFunction · 0.85
ospCommitFunction · 0.85
ospReleaseFunction · 0.85
dataMethod · 0.45

Tested by 2

SetUpMethod · 0.40
commitMethod · 0.40