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

Method benchmark

tutorials/verify/verify.cpp:6179–6199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6177 }
6178
6179 float benchmark(VerifyApplication* state)
6180 {
6181 if (!update) create_scene();
6182
6183 double t0 = getSeconds();
6184
6185 if (update)
6186 for (unsigned int i=0; i<numMeshes; i++)
6187 rtcCommitGeometry(rtcGetGeometry(*scene,i));
6188
6189 create_geometry_bytes_used = 0;
6190 rtcCommitScene (*scene);
6191 AssertNoError(device);
6192
6193 double t1 = getSeconds();
6194
6195 if (dobenchmark)
6196 return 1E-6f*float(numPrimitives)/float(t1-t0);
6197 else
6198 return 1E-6f*create_geometry_bytes_used;
6199 }
6200
6201 virtual void cleanup(VerifyApplication* state)
6202 {

Callers

nothing calls this directly

Calls 4

getSecondsFunction · 0.85
rtcCommitGeometryFunction · 0.85
rtcCommitSceneFunction · 0.85
AssertNoErrorFunction · 0.85

Tested by

no test coverage detected