12.07.2015 Views

NVIDIA CUDA

NVIDIA CUDA

NVIDIA CUDA

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

52 Module DocumentationSee also:cudaGLSetGLDevice, cudaGLRegisterBufferObject, cudaGLUnmapBufferObject, cudaGLUnregisterBufferObject3.9.2.2 cudaError_t cudaGLRegisterBufferObject (GLuint bufObj)Registers the buffer object of ID bufObj for access by <strong>CUDA</strong>. This function must be called before <strong>CUDA</strong> can mapthe buffer object. The OpenGL context used to create the buffer, or another context from the same share group, mustbe bound to the current thread when this is called.Parameters:bufObj - Buffer object ID to registerReturns:Note:See also:cudaSuccess, cudaErrorInitializationErrorNote that this function may also return error codes from previous, asynchronous launches.cudaGLSetGLDevice, cudaGLMapBufferObject, cudaGLUnmapBufferObject, cudaGLUnregisterBufferObject3.9.2.3 cudaError_t cudaGLSetGLDevice (int device)Records device as the device on which the active host thread executes the device code. Records the thread as usingOpenGL interopability. If the host thread has already initialized the <strong>CUDA</strong> runtime by calling non-device managementruntime functions, this call returns cudaErrorSetOnActiveProcess.Parameters:device - Device to use for OpenGL interoperabilityReturns:Note:See also:cudaSuccess, cudaErrorInvalidDevice, cudaErrorSetOnActiveProcessNote that this function may also return error codes from previous, asynchronous launches.cudaGLRegisterBufferObject, cudaGLMapBufferObject, cudaGLUnmapBufferObject, cudaGLUnregisterBuffer-Object3.9.2.4 cudaError_t cudaGLUnmapBufferObject (GLuint bufObj)Unmaps the buffer object of ID bufObj for access by <strong>CUDA</strong>. When a buffer is unmapped, the base address returnedby cudaGLMapBufferObject() is invalid and subsequent references to the address result in undefined behavior. TheOpenGL context used to create the buffer, or another context from the same share group, must be bound to the currentthread when this is called.Generated on Wed Apr 1 16:11:42 2009 for <strong>NVIDIA</strong> <strong>CUDA</strong> Library by Doxygen

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!