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

Method commit

modules/multiDevice/MultiDevice.cpp:32–57  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////////// ManagedObject Implementation ///////////////////////////////////////// ////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

30// ManagedObject Implementation /////////////////////////////////////////
31/////////////////////////////////////////////////////////////////////////
32void MultiDevice::commit()
33{
34 Device::commit();
35
36 hostDevice.commit();
37
38 if (subdevices.empty()) {
39 auto OSPRAY_NUM_SUBDEVICES =
40 utility::getEnvVar<int>("OSPRAY_NUM_SUBDEVICES");
41 int numSubdevices =
42 OSPRAY_NUM_SUBDEVICES.value_or(getParam("numSubdevices", 1));
43 postStatusMsg(OSP_LOG_DEBUG) << "# of subdevices =" << numSubdevices;
44
45 std::vector<std::shared_ptr<TiledLoadBalancer>> subdeviceLoadBalancers;
46 for (int i = 0; i < numSubdevices; ++i) {
47 std::unique_ptr<devicert::Device> drtDevice =
48 devicert::make_device_unique(i, debugMode);
49 auto d = rkcommon::make_unique<ISPCDevice>(std::move(drtDevice));
50 d->commit();
51 subdevices.emplace_back(std::move(d));
52 subdeviceLoadBalancers.push_back(subdevices.back()->loadBalancer);
53 }
54 loadBalancer =
55 rkcommon::make_unique<MultiDeviceLoadBalancer>(subdeviceLoadBalancers);
56 }
57}
58
59/////////////////////////////////////////////////////////////////////////
60// Device Implementation ////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 6

postStatusMsgFunction · 0.85
make_device_uniqueFunction · 0.85
retainFunction · 0.85
commitFunction · 0.50
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected