MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / computeFPS

Function computeFPS

cpp/5_Domain_Specific/marchingCubes/marchingCubes.cpp:290–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290void computeFPS()
291{
292 frameCount++;
293 fpsCount++;
294
295 if (fpsCount == fpsLimit) {
296 char fps[256];
297 float ifps = 1.f / (sdkGetAverageTimerValue(&timer) / 1000.f);
298 sprintf(fps, "CUDA Marching Cubes: %3.1f fps", ifps);
299
300 glutSetWindowTitle(fps);
301 fpsCount = 0;
302
303 fpsLimit = ftoi(MAX(1.f, ifps));
304 sdkResetTimer(&timer);
305 }
306}
307
308////////////////////////////////////////////////////////////////////////////////
309// Load raw data from disk

Callers 1

displayFunction · 0.70

Calls 3

sdkGetAverageTimerValueFunction · 0.85
sdkResetTimerFunction · 0.85
ftoiFunction · 0.50

Tested by

no test coverage detected