MCPcopy Create free account
hub / github.com/RenderKit/embree / Benchmark_Dynamic_Update

Function Benchmark_Dynamic_Update

tutorials/buildbench/buildbench_device.cpp:233–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231 }
232
233 void Benchmark_Dynamic_Update(
234 BenchState& state,
235 BenchParams& params,
236 BuildBenchParams& buildParams,
237 ISPCScene* ispc_scene,
238 RTCBuildQuality quality)
239 {
240#ifdef USE_GOOGLE_BENCHMARK
241 if (params.legacy) {
242 Benchmark_Dynamic_Update_Legacy(ispc_scene, params, quality);
243 return;
244 }
245
246 RTCScene scene = createScene(RTC_SCENE_FLAG_DYNAMIC, RTC_BUILD_QUALITY_LOW);
247 convertScene(scene, ispc_scene, quality);
248 const size_t primitives = getNumPrimitives(ispc_scene);
249 const size_t objects = getNumObjects(ispc_scene);
250
251 // warm-up
252 for (int i = 0; i < params.minTimeOrIterations; ++i) {
253 updateObjects(ispc_scene,scene);
254 rtcCommitScene(scene);
255 }
256
257 for (auto _ : *state.state) {
258 state.state->PauseTiming();
259
260 updateObjects(ispc_scene,scene);
261
262 state.state->ResumeTiming();
263
264 rtcCommitScene (scene);
265 }
266
267 addCounter(state, primitives, objects);
268
269 rtcReleaseScene (scene);
270#else
271 Benchmark_Dynamic_Update_Legacy(ispc_scene, params, quality);
272#endif
273 }
274
275 void Benchmark_Dynamic_Create_Legacy(ISPCScene* scene_in, BenchParams& params, RTCBuildQuality quality = RTC_BUILD_QUALITY_MEDIUM)
276 {

Callers 1

buildBenchFunction · 0.85

Calls 9

createSceneFunction · 0.85
getNumObjectsFunction · 0.85
updateObjectsFunction · 0.85
rtcCommitSceneFunction · 0.85
addCounterFunction · 0.85
rtcReleaseSceneFunction · 0.85
convertSceneFunction · 0.70
getNumPrimitivesFunction · 0.70

Tested by

no test coverage detected