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

Function cleanup

cpp/0_Introduction/simpleTexture3D/simpleTexture3D.cpp:233–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233void cleanup()
234{
235 sdkDeleteTimer(&timer);
236
237 // add extra check to unmap the resource before unregistering it
238 if (g_GraphicsMapFlag) {
239 checkCudaErrors(cudaGraphicsUnmapResources(1, &cuda_pbo_resource, 0));
240 g_GraphicsMapFlag--;
241 }
242
243 // unregister this buffer object from CUDA C
244 checkCudaErrors(cudaGraphicsUnregisterResource(cuda_pbo_resource));
245 glDeleteBuffers(1, &pbo);
246 cleanupCuda();
247}
248
249void initGLBuffers()
250{

Callers

nothing calls this directly

Calls 1

sdkDeleteTimerFunction · 0.85

Tested by

no test coverage detected