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

Function computeFPS

cpp/3_CUDA_Features/bindlessTexture/bindlessTexture.cpp:104–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102extern "C" void renderAtlasImage(dim3 gridSize, dim3 blockSize, uint *d_output, uint imageW, uint imageH, float lod);
103
104void computeFPS()
105{
106 frameCount++;
107 fpsCount++;
108
109 if (fpsCount == fpsLimit) {
110 char fps[256];
111 float ifps = 1.f / (sdkGetAverageTimerValue(&timer) / 1000.f);
112 sprintf(fps, "%s: %3.1f fps", sSDKsample, ifps);
113
114 glutSetWindowTitle(fps);
115 fpsCount = 0;
116
117 fpsLimit = (int)MAX(1.0f, ifps);
118 sdkResetTimer(&timer);
119 }
120}
121
122// render image using CUDA
123void render()

Callers 1

displayFunction · 0.70

Calls 2

sdkGetAverageTimerValueFunction · 0.85
sdkResetTimerFunction · 0.85

Tested by

no test coverage detected