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

Function cleanup

cpp/5_Domain_Specific/fluidsGL/fluidsGL.cpp:340–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338}
339
340void cleanup(void)
341{
342 cudaGraphicsUnregisterResource(cuda_vbo_resource);
343
344 deleteTexture();
345
346 // Free all host and device resources
347 free(hvfield);
348 free(particles);
349 cudaFree(dvfield);
350 cudaFree(vxfield);
351 cudaFree(vyfield);
352 cufftDestroy(planr2c);
353 cufftDestroy(planc2r);
354
355 glBindBuffer(GL_ARRAY_BUFFER, 0);
356 glDeleteBuffers(1, &vbo);
357
358 sdkDeleteTimer(&timer);
359}
360
361int initGL(int *argc, char **argv)
362{

Callers 1

mainFunction · 0.70

Calls 2

sdkDeleteTimerFunction · 0.85
deleteTextureFunction · 0.50

Tested by

no test coverage detected