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

Function computeFPS

cpp/5_Domain_Specific/volumeRender/volumeRender.cpp:142–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140void initPixelBuffer();
141
142void computeFPS()
143{
144 frameCount++;
145 fpsCount++;
146
147 if (fpsCount == fpsLimit) {
148 char fps[256];
149 float ifps = 1.f / (sdkGetAverageTimerValue(&timer) / 1000.f);
150 sprintf(fps, "Volume Render: %3.1f fps", ifps);
151
152 glutSetWindowTitle(fps);
153 fpsCount = 0;
154
155 fpsLimit = (int)MAX(1.f, ifps);
156 sdkResetTimer(&timer);
157 }
158}
159
160// render image using CUDA
161void render()

Callers 1

displayFunction · 0.70

Calls 2

sdkGetAverageTimerValueFunction · 0.85
sdkResetTimerFunction · 0.85

Tested by

no test coverage detected