NVIDIA CUDA

Reference Manual

Version 3.2 Beta
August 2010

Contents
1 2 Deprecated List Module Index 2.1 3 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 5 5 7 7 9 9 10 10 10 11 11 11 11 12 12 13 13 14 15 15 15 15 15 16 17

Data Structure Index 3.1 Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4

Module Documentation 4.1 CUDA Runtime API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.1 4.1.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Define Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.2.1 4.2 CUDART_VERSION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Thread Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.1 4.2.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.2.1 4.2.2.2 4.2.2.3 4.2.2.4 4.2.2.5 4.2.2.6 cudaThreadExit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaThreadGetCacheConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaThreadGetLimit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaThreadSetCacheConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaThreadSetLimit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaThreadSynchronize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4.3

Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1 4.3.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.2.1 4.3.2.2 4.3.2.3 cudaGetErrorString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaGetLastError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaPeekAtLastError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4.4

Device Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

ii 4.4.1 4.4.2

CONTENTS Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.2.1 4.4.2.2 4.4.2.3 4.4.2.4 4.4.2.5 4.4.2.6 4.4.2.7 4.5 cudaChooseDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaGetDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaGetDeviceCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaGetDeviceProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaSetDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaSetDeviceFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaSetValidDevices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 17 17 18 18 18 20 21 21 23 23 23 23 23 24 24 25 26 26 26 26 27 27 28 28 29 29 30 30 30 30 31 31 32 32 33 33

Stream Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.1 4.5.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.2.1 4.5.2.2 4.5.2.3 4.5.2.4 4.5.2.5 cudaStreamCreate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaStreamDestroy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaStreamQuery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaStreamSynchronize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaStreamWaitEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4.6

Event Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.6.1 4.6.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.6.2.1 4.6.2.2 4.6.2.3 4.6.2.4 4.6.2.5 4.6.2.6 4.6.2.7 cudaEventCreate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaEventCreateWithFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaEventDestroy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaEventElapsedTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaEventQuery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaEventRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaEventSynchronize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4.7

Execution Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7.1 4.7.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7.2.1 4.7.2.2 4.7.2.3 4.7.2.4 4.7.2.5 4.7.2.6 4.7.2.7 cudaConfigureCall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaFuncGetAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaFuncSetCacheConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaLaunch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaSetDoubleForDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaSetDoubleForHost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaSetupArgument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Generated for NVIDIA CUDA Library by Doxygen

CONTENTS 4.8 Memory Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.1 4.8.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.1 4.8.2.2 4.8.2.3 4.8.2.4 4.8.2.5 4.8.2.6 4.8.2.7 4.8.2.8 4.8.2.9 cudaFree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaFreeArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaFreeHost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaGetSymbolAddress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaGetSymbolSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaHostAlloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaHostGetDevicePointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaHostGetFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaMalloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

iii 34 37 37 37 37 38 38 39 39 40 41 41 41 42 43 44 44 45 45 46 47 48 48 49 50 51 52 54 54 55 56 56 57 58 58 59 60

4.8.2.10 cudaMalloc3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.11 cudaMalloc3DArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.12 cudaMallocArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.13 cudaMallocHost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.14 cudaMallocPitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.15 cudaMemcpy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.16 cudaMemcpy2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.17 cudaMemcpy2DArrayToArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.18 cudaMemcpy2DAsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.19 cudaMemcpy2DFromArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.20 cudaMemcpy2DFromArrayAsync . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.21 cudaMemcpy2DToArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.22 cudaMemcpy2DToArrayAsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.23 cudaMemcpy3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.24 cudaMemcpy3DAsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.25 cudaMemcpyArrayToArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.26 cudaMemcpyAsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.27 cudaMemcpyFromArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.28 cudaMemcpyFromArrayAsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.29 cudaMemcpyFromSymbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.30 cudaMemcpyFromSymbolAsync . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.31 cudaMemcpyToArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.32 cudaMemcpyToArrayAsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.33 cudaMemcpyToSymbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.34 cudaMemcpyToSymbolAsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Generated for NVIDIA CUDA Library by Doxygen

iv

CONTENTS 4.8.2.35 cudaMemGetInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.36 cudaMemset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.37 cudaMemset2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.38 cudaMemset2DAsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.39 cudaMemset3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.40 cudaMemset3DAsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.41 cudaMemsetAsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.42 make_cudaExtent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.43 make_cudaPitchedPtr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2.44 make_cudaPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9 OpenGL Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9.1 4.9.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Enumeration Type Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9.2.1 4.9.3 cudaGLMapFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 61 61 62 62 63 64 64 64 65 66 66 66 66 67 67 67 68 68 70 70 71 71 71 71 71 71 72 72 73 73 75 75 76 76 76 76

Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9.3.1 4.9.3.2 4.9.3.3 4.9.3.4 cudaGLSetGLDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaGraphicsGLRegisterBuffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaGraphicsGLRegisterImage . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaWGLGetDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4.10 Direct3D 9 Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10.2 Enumeration Type Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10.2.1 cudaD3D9DeviceList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10.2.2 cudaD3D9MapFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10.2.3 cudaD3D9RegisterFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10.3.1 cudaD3D9GetDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10.3.2 cudaD3D9GetDevices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10.3.3 cudaD3D9GetDirect3DDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10.3.4 cudaD3D9SetDirect3DDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10.3.5 cudaGraphicsD3D9RegisterResource . . . . . . . . . . . . . . . . . . . . . . . . . 4.11 Direct3D 10 Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.11.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.11.2 Enumeration Type Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.11.2.1 cudaD3D10DeviceList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.11.2.2 cudaD3D10MapFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.11.2.3 cudaD3D10RegisterFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Generated for NVIDIA CUDA Library by Doxygen

CONTENTS 4.11.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.11.3.1 cudaD3D10GetDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.11.3.2 cudaD3D10GetDevices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.11.3.3 cudaD3D10GetDirect3DDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.11.3.4 cudaD3D10SetDirect3DDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.11.3.5 cudaGraphicsD3D10RegisterResource . . . . . . . . . . . . . . . . . . . . . . . . 4.12 Direct3D 11 Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.12.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.12.2 Enumeration Type Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.12.2.1 cudaD3D11DeviceList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.12.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.12.3.1 cudaD3D11GetDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.12.3.2 cudaD3D11GetDevices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.12.3.3 cudaD3D11GetDirect3DDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.12.3.4 cudaD3D11SetDirect3DDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.12.3.5 cudaGraphicsD3D11RegisterResource . . . . . . . . . . . . . . . . . . . . . . . . 4.13 VDPAU Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.13.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.13.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.13.2.1 cudaGraphicsVDPAURegisterOutputSurface . . . . . . . . . . . . . . . . . . . . . 4.13.2.2 cudaGraphicsVDPAURegisterVideoSurface . . . . . . . . . . . . . . . . . . . . . 4.13.2.3 cudaVDPAUGetDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.13.2.4 cudaVDPAUSetVDPAUDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.14 Graphics Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.14.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.14.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.14.2.1 cudaGraphicsMapResources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.14.2.2 cudaGraphicsResourceGetMappedPointer . . . . . . . . . . . . . . . . . . . . . . 4.14.2.3 cudaGraphicsResourceSetMapFlags . . . . . . . . . . . . . . . . . . . . . . . . . 4.14.2.4 cudaGraphicsSubResourceGetMappedArray . . . . . . . . . . . . . . . . . . . . . 4.14.2.5 cudaGraphicsUnmapResources . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.14.2.6 cudaGraphicsUnregisterResource . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.15 Texture Reference Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.15.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.15.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.15.2.1 cudaBindTexture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.15.2.2 cudaBindTexture2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Generated for NVIDIA CUDA Library by Doxygen

v 76 76 77 77 78 78 80 80 80 80 81 81 81 82 82 82 84 84 84 84 85 85 86 87 87 87 87 88 88 89 90 90 91 91 91 91 92

.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 Function Documentation .6 cudaBindTexture2D . 107 4. . . . 4. . . . .2. . . . . . . . . . . .15 cudaGetTextureAlignmentOffset . . . . . . . . . .16 Surface Reference Management . . 105 4. . . . . . . . . . . . . . . . . . . . . .18. . . . . . . . . . . 103 4. 108 4. .8 cudaBindTextureToArray . . . . . . . . . . . . .18. . . . . 4. . .2 cudaBindSurfaceToArray . .18.18. . .2. . . . . . . . . . . . . . . . . . . .18.18. . . . . . . . . .2 cudaGetSurfaceReference . . . .18. .18. . . .18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 Detailed Description . . . .15. . . . . . . . . . . . . .2. . . . . . . . . . . . . . .10 cudaEventCreate . .2. . . . . 4. . . . . . . . . .2. . . .4 cudaCreateChannelDesc . . . . . . 4. . . . . . . .1 cudaBindSurfaceToArray . . . . . .1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18. . . . . . . . . . . . . . . . . 108 4. . . . . . . . . . . . . . . . . . . . . . . . . . .15. . . .16 cudaLaunch . . . . 109 4.9 cudaCreateChannelDesc .18 C++ API Routines . . . . . .1 Function Documentation . . . . . . . . . . . . . . . . . .15. . .2. . . . . . . . . . . . . . . . 109 4. . . . . . . . . . .2 cudaRuntimeGetVersion . . . . . . . . 4. . . . . . . . . . . . . 4. . . . 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 4. . . . . . . . 104 4. . . . . . . . 93 93 94 94 95 95 96 96 96 96 96 98 98 98 98 99 4. . . . . . . . . . . . . . . . . . . . .18. . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . .18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1.2. . .3 cudaBindTexture . . .11 cudaFuncGetAttributes . 4. . 101 4. . . . . . . . . . . . . .18 cudaSetupArgument . . . . . . . . . . . . . . . . . . . . . . . . .15. . . .2 Function Documentation . . . . . . . . . . . . . . . . . . 101 4. .2. . . . . . . . .vi CONTENTS 4. . . .17. . . . . . . . . . . . . . . . . 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . .7 cudaBindTextureToArray . . . . .18. . 4. . . . . . .14 cudaGetSymbolSize . . . . . . . . .2. . .1 cudaBindSurfaceToArray . . . . . . . . . . . . . . . . .2. . . .18. . . . . . . 105 4.15. .16. . . . .12 cudaFuncSetCacheConfig . . . . . . . .2. . . . 4. . . . . . . . . . . . . . . . . .13 cudaGetSymbolAddress . . . . . . . . . . . . . . . . . . . 106 4. .17 Version Management . . . . 107 4. .8 cudaUnbindTexture . . . . . . . . . . . . . . . . . .18. . . . . . . . . . . . . . . . . . . 103 4. . . . . . . . .18. .7 cudaGetTextureReference . . . . . . . . . . . . . . . 100 4. .18. . . . .2. . . . . .18. . . . . . . . . .2. . . . . . .17 cudaMallocHost . . . . . . . . . . . . . . . . . . . .2. . . . .17. . . . . . . . . . . .1 Detailed Description .2. . .2. . . . . . . . . 4.2. . . . . . . . . . . . . . . . . . . . . 102 4. . . . . . . . . . . . 100 4. 111 Generated for NVIDIA CUDA Library by Doxygen . . . . . . . . . . . .1 cudaDriverGetVersion . . .15. . . . . . . . . . . . . . . . . . . . . . .5 cudaGetChannelDesc . . . . . . . . . . . . . . . . . .17. . . . . . . . .18. . . 106 4. . . . . . . . . . . . . . . . . . . . . . . .16. . . . . . . .2. . . . . .6 cudaGetTextureAlignmentOffset . . . . . . . . . . .2. . . . . . . . . . . . . . . . .16. . . . . .19 cudaUnbindTexture . . .18. . . . . . 110 4. . . . . . . . . . . . . . . . .2. 4.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . .2. . . . . . .16. . . . . . . . . . . . . . . . . . . . . . . . 4. . . .18. . . . . . . . . . . .5 cudaBindTexture2D . . . . . .3 cudaBindTextureToArray . . . . . . . . . . . . . . 4. .4 cudaBindTexture . . . . . . . . . . . . . . . . . .

. . . . . . . .5 cudaD3D9ResourceGetMappedPointer . . . . . . . . . .2 cudaGLMapBufferObjectAsync . . .6 cudaD3D10ResourceGetMappedSize . . . . . . . . . . . . . . .20. . . . . . . . . .20. . . . . . . . .3 cudaD3D9ResourceGetMappedArray . . . . . . . 128 4. . . . . . . . . . . . . . . . .2.2. . . . . 128 4. . . . . . . . 127 4. . .10 cudaD3D9UnregisterResource . . . . . . . . .20 Direct3D 9 Interoperability [DEPRECATED] . .19.20. . . . .2. . . . . . . . . . .2. . . . .22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 Interactions between CUarray and struct cudaArray ∗ . .21 Direct3D 10 Interoperability [DEPRECATED] . . .19. . . . . .1 cudaGLMapBufferObject . . 112 4. . . . . .2. . 119 4. . . 129 4. . .2 Function Documentation .2. .1 Detailed Description . 119 4. 112 4. . . . . 130 4. . . . . . . . . . . . . . . . . 123 4. . . . . . . . . . . . . . . . . 121 4. . . .20. . . . . .21. . . .21. .22.2.7 cudaD3D9ResourceGetSurfaceDimensions . . . . . . . . .2.21.21. . . . . . . . . . .1 Detailed Description . . . . . . .2. . 116 4. . . . . 121 4. 122 4. . . . . . .2 Function Documentation . . . . . . . . . . . . 122 4. . . . . . . . .20. . . . . . . . . . . . . . . . . . . .4 cudaD3D10ResourceGetMappedPitch . . . . 112 4.20. . . . . . . . . .9 cudaD3D9UnmapResources . . . . . . . . . . .2. . . 130 4. . . . . . . . . . . .8 cudaD3D9ResourceSetMapFlags . . . . . . . . . .20. . 114 4. . . . . . . . . . . . . . . .3 Interactions between CUevent and cudaEvent_t . . . .22. . . .2. 120 4. . . . . . . . 112 4. . . . . . . . . . . . . . . . . . . . . .21. . . . . . . . . . .1 cudaD3D9MapResources . . . . . . .21. . . . . . . . . . . . . . .20. . . . . .21. . . . . . . . . . . . . . . 114 4. . . . . . . . . .22 OpenGL Interoperability [DEPRECATED] . . . .1 cudaD3D10MapResources . . . . . . . . . . 115 4. . .22. . . . . . . .5 Interactions between CUgraphicsResource and cudaGraphicsResource_t . . . . . . . . . . . . . . 130 4. . . . . . . . . . . . . . . .2.20. . . . . . . . . . 118 4. . . . . . . . . . . . . . . 126 4. . . . . . . . . . . .19. . . . . . . . . . . . . . . . . . . . . . . .2 cudaD3D10RegisterResource .2. . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .CONTENTS vii 4. . . .2. . . . . . . . . . . 114 4. . . .3 cudaD3D10ResourceGetMappedArray . . . . .2 cudaD3D9RegisterResource . . . . . . .6 cudaD3D9ResourceGetMappedSize . . . . . . . 124 4.2. . . . .2.19. . . . . . . . .20. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21. . . . . . . . . . . . 131 Generated for NVIDIA CUDA Library by Doxygen . . . . . . . . . . . . . 112 4. . . . . . . . . . . . . . . .21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 4. . .2 Function Documentation . . . .4 cudaD3D9ResourceGetMappedPitch . . . . . . . . . . . . . . . . 126 4. . . . . . . 113 4.5 cudaD3D10ResourceGetMappedPointer . . . . . . . . . . .7 cudaD3D10ResourceGetSurfaceDimensions . . . .2 Interactions between CUstream and cudaStream_t .2. . . .19. . 117 4. . . .10 cudaD3D10UnregisterResource . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . . . . . . .21. . . . . . .20. . . . . . . . . . . . . . . 125 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 4.8 cudaD3D10ResourceSetMapFlags . . 122 4. .2. .21. . . . . . . . . . . .20. . . . . .9 cudaD3D10UnmapResources . . . . . . . . . . . . . . . . .2. . . . . . .1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.1 Context Management . . . . . . . . . . . . . . . . . . . . . . . . . 122 4. . . . . . . . .19 Interactions with the CUDA Driver API . . . . . .21. .

. . .22. . . . . .9 cudaDeviceScheduleSpin . . . 134 4. . . . . .4 cudaGLSetBufferObjectMapFlags . . . . . . . . . . . . . . . . . . . . .8 cudaDeviceScheduleAuto . . 138 4. 133 4.5 cudaUUID_t . . . . .4 cudaFuncCache . . . . . . .23. . . . . . . . . . . . . .1. . . . . . . . . . . . . . . .1. . . . . . . . . . . .2. . . . . . . . . . . . . . 140 4. .11 cudaEventBlockingSync . . . . . . .1. . . . .3 Enumeration Type Documentation . . . . . . . . . 138 4. . . . . . . . . . . 135 4. . . . . . .1 cudaArrayDefault . . . . .10 cudaDeviceScheduleYield . . . .23. . . . .23. . . . . . . . . .12 cudaEventDefault . . . . . . . . . . . . . .2 cudaArraySurfaceLoadStore . . . . . . . . . . . 131 4. . . . .2 Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . .viii CONTENTS 4.7 cudaDevicePropDontCare . . . . . . .23. . . . . .2. . . . . .2. 139 4. . . . .3. . . . . .1. . 132 4. . . . . .23. . . . . . . . . . .2. . . . . . . . . . .2 cudaComputeMode . . . . . . . . . . . . . . . . . .23.23. . . . . . . . . . . . . . . . . . . . . . . . 140 4. . . . . . . . . . . 139 4. . . . . . . . . . . . . . . 140 4. . . . .23. . . . . . . . . . . . . . . . . . . . . .23. . . . . . . . .23. . . . 139 4. . . .3.2 cudaEvent_t . .1. . . . . . . .6 cudaGraphicsMapFlags .1. . . . . 141 4. . . .23. . . . . . . . . . . . . . .23. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23. . . . . . . . 138 4. . . . . .23. . . . . . . . . . . .2. . . . . . . .23. . . . . . . . . . . . . . . . 140 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Generated for NVIDIA CUDA Library by Doxygen . . .1. .23. . 144 4. . . . . .16 cudaHostAllocPortable . . . . . . . . . . . . . . . . . . 138 4. . . . . . . . 133 4. . 138 4. . . . . . . . . . . . . . . . . . .5 cudaGraphicsCubeFace .23. . . . . . . . . .23. . .3 cudaDeviceBlockingSync . . . . . . . . . . . .22.1. 140 4. . . . . . . . . . . . .3 cudaGraphicsResource_t . . . . . . 139 4. . . . . .23. . . . . . . . . . . .23. . . . . . . . .23. . . . . . . . . .1. . . 140 4. . . . .23. . . . . . . . . .22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . .23. . . . 139 4.1. . . . . . . . . . . . . . . . . . .23. . . . . .3. 138 4. 139 4. . .1. 140 4. 139 4. . . . . . . . . . . . . . . . . . . . .1. . . . . . . . . . . . . . . . . . . . . .23. . . . . . . . . . . . . . . . . . . . . . . . . .6 cudaDeviceMask . . .15 cudaHostAllocMapped . .1 cudaChannelFormatKind . . . . . . . . . . . . . . . . . . . . .3. . . . . . .22. . . .2. . . . . . . . . . . . . . . . . . 139 4. . . . . . . . . . . . .1. . . . . . . . . . . . . . . . . . . . . . . . . . . . .23.3 cudaGLRegisterBufferObject . . . . . . . . . . . . . . . .23. 139 4. . . .1 cudaError_t . . . . . . . . .5 cudaGLUnmapBufferObject . . .1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23. 138 4. . . . . 139 4. . . . . . .23. . . . . . . . . . . . . . . . . .3. . . . . . .14 cudaHostAllocDefault . .7 cudaGLUnregisterBufferObject . . . . . .5 cudaDeviceMapHost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 4.1. . . . . . . .3 cudaError . . . . . . . . . . . . . . . . . . . . . . . . 144 4. . . . 140 4. . . . .17 cudaHostAllocWriteCombined . . . .3. . . . . . . . . .1 Define Documentation . . . .23 Data types used by CUDA Runtime . . . . . . . . .23. . . . . . . . . . . . . .2. .22. . . . . . . . . . . .4 cudaStream_t . . . .1. . . . . . . . . . . .2. . . . . . .1. .2.13 cudaEventDisableTiming . . . . . . . . . . . . . . .6 cudaGLUnmapBufferObjectAsync . . . . . .4 cudaDeviceLmemResizeToMax . . . 139 4. .

8 cudaLimit . . . . . . . . . . . . . . . . . . . . . . .24. . 155 4. . . . . .25.25.13 cudaTextureFilterMode . . .2 CU_MEMHOSTALLOC_PORTABLE . . 154 4. . . . . . . . . .24 CUDA Driver API . . . . . . . . . . . . . . . . . . . 153 4. . 153 4. . . . .23. .25. . . . . 145 4. . . . . . .2. . . . .25. . 154 4. . . . . .3. . . . . . .2.25. . . . . . . . . . . . . . . . . 147 4. . . . . . . .25. . . . . . . . . . . . . . . . . . . . . . . . . .1. . . . 154 4. . .3. . . .3. . . . . . . . . . .23. . . . . . . . . . . . . . . . . . . . . . . . . .25. .25 Data types used by CUDA driver .12 cudaTextureAddressMode . . . . . . . . . . . . . . .2. . . .11 cudaSurfaceFormatMode . . . . . .10 CUDA_ARRAY3D_SURFACE_LDST . . . . . . . . . . . . .CONTENTS ix 4.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6 CU_TRSF_NORMALIZED_COORDINATES . . . . .2. . 154 4. . . . . . . . . .11 CUDA_MEMCPY3D . . . . . .2. .3. 154 4. . . . . . . . . . .2. . . 154 4. . 145 4.1. . . . . .8 CUDA_ARRAY3D_DESCRIPTOR . . . . . .1.1. . . .14 cudaTextureReadMode . . . . . . . . .1 CU_MEMHOSTALLOC_DEVICEMAP . . . . . . . . . . . .25. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25. . . . . . . . . . . 154 4. . . . .7 cudaGraphicsRegisterFlags . . . 154 4. . . . . . . . . . . . . .25. . . . . .1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23. . . . . . . . . . . . . 155 4. . . . . . . . . . . . . . . . . . . . . 153 4. . . . . .25. . .2. . .10 cudaSurfaceBoundaryMode . . 147 4. . . . . . . . . . . . . .2.3 CU_MEMHOSTALLOC_WRITECOMBINED . . . . . . . . . . . . . . . . . . . . . .25. . . . . . . . .1 Define Documentation . . . . . . . . . . . . . . . . . .25. . . . . . . .25. . . . . . . . . . . 154 4. . . .1. . . . . . . . . . . . . . . . . . . . . . . .25. . . . . . . . . . . . . . . . .3 CUarray_cubemap_face .3. . . . . .13 CUdevice_attribute . . . . . . . . . . . . . . . . . 153 4. . . . . . . . . .3. . . . . . . . . . . . . . . . . . . . . .9 CUDA_ARRAY_DESCRIPTOR . . .1 Detailed Description . 146 4. . . . . . .4 CUarray_format . . . . . 153 4. . .25. . . . . . . . . . . . . . . . . . . . . . .11 CUDA_VERSION .6 CUcontext .1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 4. . . . . . . . .1 CUaddress_mode . . . .23. . . . . . . .25. . . . . . . .25. . . . . . . . . . . .23. . . . . . . . . . 153 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25. 145 4. . .8 CU_TRSF_SRGB . . . . . . . . . . . . . . . . . . . . . . 153 4. . . .1. . . . . . . .10 CUDA_MEMCPY2D . . . . . . . 153 4. . . . . . . . . . . . . . . . .9 CUDA_ARRAY3D_2DARRAY .7 CUctx_flags . . 154 4. . . . . .1. . . . . . . . .2. . . . . .2 CUarray . . . 155 Generated for NVIDIA CUDA Library by Doxygen . . . 154 4. .25. . . .4 CU_PARAM_TR_DEFAULT . . . . . . . . . . . . . . . . . . 145 4. .25. . . . . . . . . . . .25. .25. . . . . .25. . . .23. . . . . . . . 145 4. . . . . . . . . . 154 4. . . . .2 Typedef Documentation . . . .12 CUdevice . . . . . . . . . . . . 146 4. . . . . .1. . . . 144 4. . . . . . . . . . . .7 CU_TRSF_READ_AS_INTEGER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5 CUcomputemode . . . . . . . . . . . . . . . . .23. . . . . . . . . . . . . . . . . . . . .23. . . . . . . . . . . .25. 153 4. .2. . . . . . . .2. .1. . 148 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9 cudaMemcpyKind . . . . .2. . .25. . . . 153 4. . . . . . . . . . . . . . . . . . . . .2. .3. . . . . . . . . . . . . . . . . . . . . . .5 CU_TRSA_OVERRIDE_FORMAT . . . . .

. . . . . . . . . . . 155 4. . . . . . . . . . . .15 CUjit_option_enum . . . . . . . . . . . .3.25. 157 4. . . .25. . . . . . . 161 4. . . . .2 CUarray_cubemap_face_enum . . . . . . . . . 156 4. . . . . . . . .2.25. . . . . . . . . .14 CUdeviceptr . . . . .2. . . 155 4. . . . . . . 156 4. . .14 CUjit_fallback_enum . . . . . . . . .3. . . .25. . .8 CUevent_flags_enum . . 156 4. . . . . . . . . . . . . . . . . . . . . . . . 157 4. . .25. . . . . . .30 CUmodule . . . . . . . . . . . . . . . 161 4. . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . .3. . . .2. . .3. . . .25. . .32 CUstream . . . . . . . . . . . . . . . . . .6 cudaError_enum . . . . . .3. . . . . . . . 156 4.25. 158 4. . . . . . . . . .34 CUtexref . . . . . . . . . . . . . . .25. . . . . . . .7 CUdevice_attribute_enum . .3. . . . . . . . . . . . .3.17 CUevent_flags . . . 155 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 CUdevprop . . . . . 156 4. .3. . . . . . . . . . . . . 157 4. . . . .25 CUjit_fallback .25. . . . . . . . . . . . . . . . . . .2. .25. . . . . . . . . . . . . . .25. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25. . . . . . . . . . . . . . . . . . . . . . . . . 156 4. . . . . . . . . . . . . . . . . . . . . . . . .25. . . . . . . . . . . . . . . . 158 4. . . . . . . .25. . . . . . . . . . . . . .2. . . . . . . . . .16 CUevent . .3. . . . .3. . . . . . . . . . . . . . . . . . . . .25. . . . . . .31 CUresult .3. . . . . 162 4.3. . . . . . . . . . .25. . . . . . . . . . . . . . . . . . . . . . .25. . . . . . . .25. . . . . . . . . . . .22 CUgraphicsMapResourceFlags . . . . . . 156 4. . 156 4. .3. . 156 4. . . . . . . . . . . . . . . . .25. . . . . . . . .2.25. .25. . . . . . . . . .24 CUgraphicsResource . . . . . . .25. . . . . . . .25. . .2. . . . . . . .x CONTENTS 4. . . . . . . . . . . . .25.25. .2. . . . . . . . . . . . . . . . . . . . . . . . . .2. .2. . . . . . .11 CUfunction_attribute_enum . . . . . .19 CUfunc_cache . . 157 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 4. . . . . . . 162 4. . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . .1 CUaddress_mode_enum . . .3 Enumeration Type Documentation .3.2.25. . . . . . . . . . . . . . . 160 4. .2. .2. . . . . . . . 162 Generated for NVIDIA CUDA Library by Doxygen .5 CUctx_flags_enum . . . . . . . . . . . . . . . . . . . .25. . .2. . . . . . . . . . . . . . . 156 4.28 CUlimit . . . .25. . . . . . . . . . . . . . . . 155 4. . . . . . . . . . . . . . . . . 156 4. 155 4. . . . . . . 157 4. . . . . . . . . .25. 155 4. . . . . . .25. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23 CUgraphicsRegisterFlags . . . . 155 4. .12 CUgraphicsMapResourceFlags_enum . . . . .2. . . . .21 CUfunction_attribute . . . . . . . . . . . . . . . . . . . .33 CUsurfref . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25. . . .25. . . . . . . .20 CUfunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 4. . . .25. . . . . . . . . 162 4. . . . . . . . . . . . . . . . . .25.10 CUfunc_cache_enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 CUgraphicsRegisterFlags_enum . . . . . . . . . . . . . . . . 162 4. . . . . . . . . . . . . . . . . . . . . . . . . . .2.26 CUjit_option . .2. . . . . . . . . . .4 CUcomputemode_enum .2. . . .3. . . . . . . . . .25. . . . . . .18 CUfilter_mode . . . . . . . . . . . . . . . . . . . . . . .9 CUfilter_mode_enum . . . . . 156 4. .25. . . . . 155 4. . . . . . . . .2. . . . . . . . . . . . . . . . .29 CUmemorytype . . . . . . . . . . . . . .27 CUjit_target . . . . . . . . . . . . . . . .25. . . . . . . . . . . . . . . . . . . . . .3 CUarray_format_enum . . . . . . . . . . .

. . . . . . . . . . . . 165 4. . . . . 174 4. . . . . . . . . . . . . . . . . . . 178 4. . . . . . . . . . . . . . . . . .4 cuDeviceGetCount .28. . . . . . . .28. . . .2.2. .2 Function Documentation . . . . . . . . . . . . . . . .1 Detailed Description . . . . . .28.16 CUjit_target_enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 Function Documentation . . . . .7 cuDeviceTotalMem . .26. . . . . . .29. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29. .2. . . . . . . .2. . . . . .5 cuCtxGetApiVersion . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . .27 Version Management . . . . . .3 cuCtxDestroy . . . .29. . . . . .2. . . . . . . . . . . . . . . 173 4. .2. . . .2. . . . . . . . . . . . . . . . . .11 cuCtxSetCacheConfig . . . . .29. . . . . . . . . .29. . . . . . . . . . . . .2. . . . . . . . . .28. . 179 4.6 cuDeviceGetProperties .2. . . . . . .17 CUlimit_enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29. . . . . .7 cuCtxGetDevice . . . . . . . . . . . . . 165 4. . . . . . . . . . . . . . .3 cuDeviceGetAttribute . . . . . . . . . . . . . . . . . .25. . . . . . . . . . . . . . . . . 167 4. . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . . . . .4 cuCtxDetach . . . 170 4. . .8 cuCtxGetLimit . . . . . . 166 4. . . . . . .6 cuCtxGetCacheConfig .27. . . . . . . . . . . .29. . . . . 167 4. .2. . . . . . . . . . . . . . 163 4. . . . . . . 181 Generated for NVIDIA CUDA Library by Doxygen . . . . . . 164 4. . . . . . .29. .3. . .3. . . . . . . . . . . . . . . . . . . . .1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2. . . . . 166 4.2. . . .18 CUmemorytype_enum . . . . . . . . 165 4. . . . . . . . . . . . . . . . . .27. . .25. . . . . . .2 Function Documentation .26 Initialization . . . . .1 cuCtxAttach . . . . . . . . . . . . . 166 4. . . 170 4. . . . . . . . . . . . . . . . . . . . . . . . . .29. . . . . . . . . . . . . . . . . . . . . . . . . . . 171 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10 cuCtxPushCurrent . . . . .1 Detailed Description . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . 164 4. .28. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3. . . . . . . . . . . . . . . . . .13 cuCtxSynchronize . . 167 4. . . . . . . . . .29 Context Management . . . . . . . . . . . . . . . . . . . . .2 Function Documentation . . . . . . . . . . . . . . . . . .28.29. . . . . .28. . . . . . . . . 165 4. . . . . . . . . . 180 4. .26. . . . . . . . . . . . . . . . 173 4. . . . . .25.12 cuCtxSetLimit . . . . . . 176 4. . . . . . . . . . . . . . . . . 179 4. . . . . . . . . . . . . . .CONTENTS xi 4. . . 174 4. . . . . . .28. . . 177 4. . . . . . . . . 175 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . .29. . . . . . . . . . . . . . . . . . . . . .2. . . 166 4. . . . . . . . .1 cuDeviceComputeCapability . . . 176 4. . 168 4. .27. . . . . . . . . . 177 4. . . . . . . . . . . . . . . .1 Detailed Description . .29. . . .5 cuDeviceGetName .1 cuDriverGetVersion . . . . . .28. . . . . . .2 cuDeviceGet . . . . . . . . . . . . .26. . . . .2 cuCtxCreate . . . . . . . . . . . 174 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 4. . . . . . . . . . . . . . . . 168 4. . . . . . . . . . . . . . . 172 4.9 cuCtxPopCurrent . . . . . . . . . . . . 167 4.1 cuInit . .29. .2. . . . . . . . . . . . . . .29. . . . . . . . . . . . . . . . . . . . . . .29. .28 Device Management . .2. .2. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31. . . . . . . . . . . .7 cuMemAllocHost . . . .31.30 Module Management . . . . . . .30. . . 207 4. . . . .31.31. .31. . . . . .20 cuMemcpyDtoDAsync .2. . . . . . . . 196 4. . .31. . . . . . . . . . . 213 4. . . . . . . . . . . . . . . . . . . .2. . .31. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 cuMemcpy3DAsync . .31. . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . 182 4. . . .2. . . . . . . .7 cuModuleLoadDataEx . 209 4. . . . . . . . . . . .31. . . . . . . . . . . . . . . . . . . . . 210 4. . .31 Memory Management . . . . . . . . . . . . .30. . . . . . .31. .31. . . . . . . . . 192 4.14 cuMemcpyAtoA . . . . . . . .2. . . . . . . . . . .2. .2. . . . . . . . . . .19 cuMemcpyDtoD . . . . . . .31. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 cuMemcpy2DUnaligned . . .22 cuMemcpyDtoHAsync . .31. . . . . . . . . . . . . . . . . . . . . . .4 cuModuleGetTexRef . . . . . . . . . . 182 4. .31.2. . . . . . . . .2. . .30. . . . . . 184 4. . . . . .2. . . . . . .30. . . . . 200 4. . . . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . .4 cuArrayDestroy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6 cuMemAlloc . . . . . . . . . . .2. . . . . . . . . .2. . . . . .2. .2. . 193 4. . . .30. . . .31. . . .1 cuArray3DCreate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 cuModuleGetSurfRef . . .17 cuMemcpyAtoHAsync . .8 cuMemAllocPitch . . . . . . .31. . . . . . . . . .8 cuModuleLoadFatBinary . . . . . . 183 4. . . . . . .30. . . . . . . . . .16 cuMemcpyAtoH . . . . . . . . . . . . . .15 cuMemcpyAtoD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xii CONTENTS 4. .31. . . . . . . . . . . . .2. . . . . . . 185 4. . . . . .2. . . . . . . . . . .1 Detailed Description . . .2 Function Documentation . . . . . . . . . . . . .31. . . . . . . . . . . .2. . . . . . . . . . . . . . . . .2. . . . . . . . .2. . .2. . . . . . . . . . . . . . . . .31. . . . . . . . . . . . . . . . .21 cuMemcpyDtoH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 4. . 214 Generated for NVIDIA CUDA Library by Doxygen . . . . . . . . . . . . . . . . . .31. . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.1 cuModuleGetFunction . . . . . . . .30. 184 4. . 183 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 4. . . . . . . . . . .30. . . . 182 4. . . . . . . . . . . . . . . . . . . . . . . . .2. . . .2. . . . . . . . . . . . . . . 195 4. . . . . . . . . . . .31. 213 4. . .10 cuMemcpy2DAsync . . .30. . .2 cuArray3DGetDescriptor . . . . . . . .2. . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . 211 4. . . . .31. . . . . . . 197 4. . . . . . . . . . . . . . . . . . . . . . . . . . . .30. . . . . . . . . . . . . . . . . . . . . . . 195 4. . 187 4. . . . . . . 196 4. . . 198 4. . . . . . . . . . . . . . . . .1 Detailed Description . . 210 4. . . . . . . . 202 4. . . . . .2. . . . 191 4. . . 191 4. 211 4. . . . . . . . . . . . .2. . . . . .9 cuMemcpy2D . 185 4. . . . . .12 cuMemcpy3D . . . . . . . . . .3 cuArrayCreate . . . . . . . .2. . .31. . . . . . . . . . .9 cuModuleUnload . 191 4. .2 Function Documentation . . .18 cuMemcpyDtoA . . . . . . . . . . . . . . . 187 4. . . . . . . . . . .2. . . . . . . .5 cuModuleLoad . . . . . . . . . . . . . . . . . . . . . . 204 4. . . . .5 cuArrayGetDescriptor . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . .30. . . . . . . . . . . . .6 cuModuleLoadData . . . . . . . . .2 cuModuleGetGlobal . . . . . . . .31. . . . . . . 182 4. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . .31. . . . . . . . . . . . . . . . . . . . . . . .41 cuMemsetD2D8Async . . . . 225 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 4. . . 221 4. .2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 4. . . . . . . . .2. . . . . . . . . . . .4 cuStreamSynchronize . . .31. . . . . . . . . . . . . . . . . . .31. . . 228 4. . . . . . . .33. . . .2. . . . . . . . . . .3 cuStreamQuery . . . . . . . . . . . . . . . . . .31. . . .2. . . . . . . . . . . . . . . . . . . . . . . 224 4. . . . . . . . . . . . . .31. . . 227 4. . . .2. . . 217 4. . . . . . .43 cuMemsetD32Async . . . . . . . . . . . . . . . . .2. . . . . . . . .2. . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 4. .2. . . . .31. . . . . . . . . . . . . . . . . . . . . . .32.2. . . . . . . . . . . . . . . . . . . . . . . .33. . . . . . .2. . . . . . . . . . . . . . . . 233 4. . . 222 4.2. . . . .2. . . . .33 Event Management . . . . . 231 4.26 cuMemcpyHtoDAsync . . . . . . . . . . . . . . . . . . . . . . . . . . 230 4. . . . . . . . . . . 233 4. . . . . . . . . .32 Stream Management . . . . . . . . . . . . . .1 cuEventCreate . . . . . . .29 cuMemGetAddressRange . . . . . . . . . . .31. . . . .38 cuMemsetD2D32 . . .2. . . . . .2. . . . . .2. . . .2. . . . 216 4. . . . . . . . .27 cuMemFree . . . . . . . . . . .1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .2. . .31 cuMemHostAlloc . . . . . . . . . . . . 232 4. 221 4. . . . . . . . . . . . . . . . . . . . . .2. . . . .31. . . . . 226 4. . . . . . .31. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31. . . . . . . . . . . . . . . . . . . . 216 4. . . . . .2 cuEventDestroy . . .2 Function Documentation .5 cuStreamWaitEvent . 230 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31. . .32. . . . . . . 233 4. . . . . . . . . . . . . . . . . . 230 4. .2 Function Documentation . . . . . . . . .33. . . . . . . 231 4. . . . . . . . 233 4. . 215 4. . . . . . .32. . .2. . . . . . . . . . . . . . . .2. . . . . . .31. .23 cuMemcpyHtoA . . . .34 cuMemsetD16 . .2. . . . . . . . . . . .33. . . . . . . . . . . . . . . 231 4. . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . . .31. . . . . . . . . . . .2. . . . . . . . . . . .32. . . . . 222 4. . . 219 4. . . . . . . .33. . . . . . . . . . . . . .35 cuMemsetD16Async . . . . . .31. . . .36 cuMemsetD2D16 . . . .1 Detailed Description . . . .31. . . . . . . .44 cuMemsetD8 . . .2 cuStreamDestroy .39 cuMemsetD2D32Async . . . . . . . . . . .28 cuMemFreeHost . . . . . .32. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 4. . . . . .31. . . . . . . . . . . . . . . . . . . . . . . . . . 234 4. . . . . . . . . . . . . .32. . .3 cuEventElapsedTime .2. . . . . 230 4. . . .42 cuMemsetD32 . . . . . . . . . . . . . . . . . . . . . . . . 214 4. . 218 4. . . .25 cuMemcpyHtoD . . .31. . . . . . . .2. . . . . . . . .2.31. .31. . . .32. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31. . . . . . . .31. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 4. . . . . . . . .32 cuMemHostGetDevicePointer . 224 4. . . . . . . . . . . . .33 cuMemHostGetFlags . . .31. . . . . . . . . . . . . . . . .31. . . . . .2. . . . . . . . . . . .24 cuMemcpyHtoAAsync . . . . . . . . . . . . . . . . .40 cuMemsetD2D8 . . . 223 4. . . . .2. . . . . . .2. . . . . . . . . . . 234 Generated for NVIDIA CUDA Library by Doxygen . . . . . . . . . . . . . . . . . . . . . . . .CONTENTS xiii 4. . . . . .45 cuMemsetD8Async . . .1 cuStreamCreate . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . .30 cuMemGetInfo . . . . . . . . . . .37 cuMemsetD2D16Async . . .

. . 246 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35.1 cuParamSetTexRef . . . . . . . . . . . . . . . . . . . . . . . 247 4. . . . . . . . . . . . . 237 4. . . . . 244 4. . . . . . .12 cuTexRefSetFlags . . . . . . . . . . . . . . .2. . . . . . 242 4. . . . . 246 4. . . . . .34. . . . .34 Execution Control . . . . . . . . . . .2.10 cuParamSetSize . . . . . . . . . . . . . .36. . . . . . .2.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . .33. . . . . . . . . . . . . . . . . . .36. . . . . . .3 cuTexRefGetArray . . . . . . . . . . . . . . . . . . . 250 4. . . . . . . . . . . .9 cuParamSeti . . . . .11 cuParamSetv . . . . . . . . . . . . . . . . . . . . . . . 235 4. . . . . . . . . . .2. . . . . . . . . .36.1 Detailed Description . . . . . . . . . . . . . . .2. . . . 240 4. . . . . . . . .13 cuTexRefSetFormat . . . . . . .36. . . . 241 4.2. . . . . . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . .1 cuTexRefGetAddress . . . . . . . .2. . . . . . . . . . . . .2. . . . .35 Execution Control [DEPRECATED] . . . . . .1 Detailed Description . .33. . . . . . . . . . . . . . . . 246 4. . . . .34. . . . . . . . .2. . . . . . . . . . . . . . . .2 cuTexRefGetAddressMode . .6 cuLaunchGrid . .8 cuTexRefSetAddress2D . . . . . . . . . . . . . . . .8 cuParamSetf . . . . . . . . . . . . . 239 4.2 Function Documentation . . . . . . . . . . 251 Generated for NVIDIA CUDA Library by Doxygen .34. . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 4. . . . . . . . 247 4. . .2. . . . . . . . . . . . 248 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . .35. . . . . . . . . . . .36. .11 cuTexRefSetFilterMode . . .4 cuFuncSetSharedSize . . .4 cuTexRefGetFilterMode . . . . . . . . . . . 249 4. . . . . . . . .3 cuFuncSetCacheConfig . . . . . . . . . . . . . . . . . . . . . .2. . . . .2. . . . . . . . . . . . . . . . . . . . . . . .9 cuTexRefSetAddressMode . . . . . . 245 4. . . .36.36. . . . . . . . . . . .2. . . . . .2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5 cuLaunch . . . .2. . . . . . 240 4. . . . . . . . . . . . . . . .36 Texture Reference Management . . . . . . . . . . . . . .34. . . . . . . 237 4.1 Detailed Description . . . .7 cuLaunchGridAsync . . .33. .2. . . . . . . . . . . . 242 4. . . 244 4. . . . . . . . . . . . . . .2. .36.36. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34.2 cuFuncSetBlockShape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36. . . . . . .34. . . . . . . . . .xiv CONTENTS 4. . . 243 4. . . . . . . . . . . . . 244 4. . . . . . . . . . . . . . . . .2. . . .2. . . . . . . . . . . .2. . . . 241 4. . . . . .34. . . . . . . 246 4. . . . . . . . . . . . . . . . . . . . . . . . . .34. . . 235 4. . . .2. . . . . . . . . . . . . . . . . 236 4.36. .34. .2 Function Documentation . . . . . . 250 4. . . .4 cuEventQuery . . . . . . . . . . 251 4. . . . . . . . .34. . . . . . 238 4. . . .36. . . .2. . . . . . . . . 239 4. . . . . . 247 4. . . . . . . . . . . . . . . .2. . . . . .5 cuEventRecord .2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 4. .1 cuFuncGetAttribute . . . . . . . . . . . . . . . . . . . .7 cuTexRefSetAddress . . . . . . . . . . . . . . . . .2. . . . . 248 4. . . . .6 cuEventSynchronize . . . .2. . . . . . . . . . . . . . . .5 cuTexRefGetFlags . . . . .36.10 cuTexRefSetArray . . . . . . .35. . . . . . . . . . . . . . . . . . .36. . . . 243 4. . . . . . . . . . . . .6 cuTexRefGetFormat . . . . .34. . . . . . . . 249 4. . . .34. . . . . . . . . . . . .34. . . .

. . . . . . . . . .4 Function Documentation . . 253 4. . . . . . . .1 cuGraphicsMapResources . . . . . . . 265 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 4. . .41. . . . . . 262 4. . . . . . . . . . .2 cuTexRefDestroy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 4. . . . . . . . .41. . . . .37. . . . . . . 253 4. . . . . . . . . . . . . . . . . . . .40. . . .40. . . . . . . . . .41. . . . . . . . . . .38. . . . .2.41. . . . . . . . . . . . . . . . . . . 255 4. . . . . . . . . . . . . . . . . . . . . . .41. . . . . .1 CUGLmap_flags_enum . . . . . . . . . . . . . . . .2 Function Documentation . . 257 4.40.2 cuGraphicsGLRegisterBuffer . . . . . . . . . . . . 265 4. .40. 253 4. . . . . . . . . . . . . . . . . . . . . . 255 4. . . .2 Typedef Documentation . . . . . . . . . . . .1 Detailed Description . . . . . . 257 4. . . . .4 cuGraphicsSubResourceGetMappedArray . . . . . . . . . . . 266 4. . . . .2. . . .41. .5 cuGraphicsUnmapResources . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . .3 cuGraphicsResourceSetMapFlags . . . . . . . . 263 4. . . . . . . .2. . . . . . 258 4.39.38. . . . . . . . . . . . . . 264 4. . . . . . . . . . . . . . . . . . . . .1 cuGLCtxCreate . . . . . . . . . . . . .37. . . . .2 cuGLMapBufferObject . . . . . 267 4. . . . . . . . . . 255 4. . . . . . . . . . . . . . . . . . . . . . .2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . .38 Surface Reference Management . .2.1 cuSurfRefGetArray . . . . . . . .41. . . . . . . .1 Detailed Description . . . . .2. . . . .3 Enumeration Type Documentation . . . . .1 Detailed Description . . . . . . . . . . . .1 Detailed Description . . . . . . . . . . . . . . . . . . . . .41 OpenGL Interoperability [DEPRECATED] . . . . . . . . . . . . . . . . . . .1 CUGLmap_flags . . . .6 cuGraphicsUnregisterResource . . . . 253 4. . . . .40. . . . . . . .2. . . . . . . . . . . . . . . . . .39. . . . . . . . . .3 cuGLMapBufferObjectAsync . . . . . . . . . .2. 253 4. . . . . . . . . . . .39. . . . . . . . . . 255 4. . . . . . . . . . . . . . . . . . . . . . . . .4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39. . . . . . . 259 4. . . . . . . . . . . . . . . . . . .39. . . . . . . . . . . . . . . . . . . . . . . 260 4. . . . .40 OpenGL Interoperability . . .39. . . . . . . . . . . . . . 265 4. . . . . . . . .4 cuWGLGetDevice . . . . .40. . . . . . . . . . .39. .2. . . . . . . . . . . 266 4. .2. . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . . . . .37. . . .2. . . . . . .2.1 cuGLInit . . . . . . . . . . . .3 cuGraphicsGLRegisterImage . . 262 4. . 266 4. . . . . . . . . . . . . . . . . . .39. . . . . . . . . . . . . . . . 263 4. .1 cuTexRefCreate . . . . . . . . . . . . . . . . . 258 4. . . . . . . . . .37 Texture Reference Management [DEPRECATED] . . . . . . .2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 4. . . . .4. . . . . . .2. . . . . . . . . . . . .38. . . . . . .2 Function Documentation . .41. . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . .37. . . . . . .4. . . 267 Generated for NVIDIA CUDA Library by Doxygen . . .38. . . . . . . . .41. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 cuGLRegisterBufferObject . . . . . .2 cuSurfRefSetArray . . . .41. . . . . . . .2 cuGraphicsResourceGetMappedPointer . . . . . . . . . . . .39 Graphics Interoperability . .3. . 260 4. 265 4. . . . . . . . . . . . . . 257 4. . .CONTENTS xv 4. . . . . . . . . . . . . . .4. . . . . . . . . . 266 4. . .1 Detailed Description . . . . . . . . 266 4. . . . . . . . . . . . . . . . . . . . . . . . . . 257 4. . . . . . .

. . . . . . . . . . . . . . . . . . . . .6 cuD3D9ResourceGetMappedSize . . . . . . . . .42. . . . . . . . . . . . . . . . 280 4. . . . . .42. . . . . . . . . . . .4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8 cuD3D9ResourceSetMapFlags . . . . . . . 270 4. . . . . . . . . . . . . . . 272 4. . . . . . . . . .4. .4. . .43. . . . . . . . . . . .4. . . . . . . . .3 cuD3D9ResourceGetMappedArray . . . . . . . . . . . . . . . . .43. 275 4. . . . . . 278 4. . . . . . .4. . . . . . . . . 272 4. .43. . 283 4. .43. . . . . . . . . . . .6 cuGraphicsD3D9RegisterResource . . . . . . .4. . . . . . . . . . . . . . .8 cuGLUnregisterBufferObject . . . . . . . . . . 272 4. .42. . . .4 cuD3D9GetDevices . . . . . . . . . . . . . . . . . . . . . . . . . 282 4. . .3 Enumeration Type Documentation . . . . . . . . . . . . . . . .1 CUd3d9DeviceList_enum . . . .4 Function Documentation . . .2 cuD3D9RegisterResource . .2 CUd3d9register_flags . . . . . . . . . . . . . . . .9 cuD3D9UnmapResources . . . . . 268 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 4. . . . . . .42. . . . . . . . . . . . . . . . . .7 cuGLUnmapBufferObjectAsync . . . . . . . . . . . . . . . . . . . .4 Function Documentation . . . . . . . . .2 CUd3d9register_flags_enum . . . 278 4. . .42. . . . . . . . . . . .2 cuD3D9CtxCreateOnDevice . . . . . . . . . . .4. . . . . . . . . .43. . . 277 4. . . .4. . . . . .7 cuD3D9ResourceGetSurfaceDimensions . . . . . 286 Generated for NVIDIA CUDA Library by Doxygen . . . . . 273 4. . . .4. .3 cuD3D9GetDevice . . . . . . .44 Direct3D 10 Interoperability . .2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4. . . . . . . . . . . . . . . . . . . . . . . . . .43. . . . . . . . . . . . . . 278 4. . . . . . .4. . 272 4. . . . . 274 4. .42 Direct3D 9 Interoperability . . .4. . . . .5 cuD3D9ResourceGetMappedPointer . . . . . . . . . . . .41. . . . . . . .41. . . .1 cuD3D9MapResources .5 cuD3D9GetDirect3DDevice . . . . . .6 cuGLUnmapBufferObject . . . . . . . . . . . . . . . .42. . .41.4. . . . . . . . . . . .1 CUd3d9map_flags . . . . . . . .4. . . . . . . . .43. . . . . . . . . 274 4. . . . . .43. . .42. . . . . . . 285 4. . . .43. . . .41. . . . . . . . . . . . .1 CUd3d9DeviceList . . . . . 269 4. . . . . .2 Typedef Documentation . . . . . . . . . . . . . . . . . . .4. . . . . . 281 4. . . . . . . . . . . . . . . . . . . . . . . . . . . .4. . . . . . . . . . . . . . . . . . . 272 4. . . 269 4. . . . . 279 4. . . . . . 278 4. . . . . . . 284 4. . . . . . . .3 Enumeration Type Documentation . . . .2. . . . .43. .2. . . . . . . . .xvi CONTENTS 4. . . .1 cuD3D9CtxCreate . . 278 4. . .42. . . . . . . . . . . . . . . . . . . .43. . . . . . . . . . . . . . . . . 271 4. . .42. . .4. .3. . . . . 278 4. . . . . . . . .42. . . . . . . . . . . . . 271 4. . . . . . . . . . . . . . . . . . . . . . .5 cuGLSetBufferObjectMapFlags . . . . . .42. . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 Detailed Description . . . . . . . . . . . . . . . . .4. . . .1 Detailed Description . . . . .43. . . . .3. . . . . . . . . . . . .1 CUd3d9map_flags_enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 4. . . . . . . . . . . . . . . . . . . . . .4.3. . . . .43. . . . . . . . .43. . .42. . . . . . . . 278 4. . . . . . . . . . . . .4.43 Direct3D 9 Interoperability [DEPRECATED] . . . . . . . .43. . . . . . . .10 cuD3D9UnregisterResource . . . . . . . . .43. 273 4. . . 272 4. . .43. . . . .2 Typedef Documentation . . . . . . . . . . . . . . . . . . . .43. . . . . . . .4 cuD3D9ResourceGetMappedPitch . . . . .

. . . . . . . . . . . . . . . . . . . .44. . . . . . 290 4.46. . . . . . . . . . . .4. . . .4. . . . . . . .44. . . . . . . . . . . . . . . . . . . . . . . . . . . . .45 Direct3D 10 Interoperability [DEPRECATED] . . . . .4. . . . . . . . . . . . . 292 4. . . . . . . . . . .1 cuD3D10MapResources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.45. . . .45. . 293 4. . . 302 Generated for NVIDIA CUDA Library by Doxygen . . . . . . . . . . . . . . . . . 302 4.4. . . . . . . . . . . . . . . . . .4. . . . . . . . 287 4. . . . . . . . . .8 cuD3D10ResourceSetMapFlags . .3. . . . . . . . . . .45. . . . . . . . . . . . . . . . . . . . . . . . . . . . .10 cuD3D10UnregisterResource .2 Typedef Documentation . . . . . . . . .45. . . . . . . . . . . . . . . . . 293 4. . .2 cuD3D10RegisterResource . .45. . . .3. . . . . . . . . . . . . . . . . . . . . . . . . . . .45. . . . . . . . . . . . . 301 4. . . . . .4 cuD3D10ResourceGetMappedPitch . . . . . . . .44. . . . . . . . . . . . . . . .45. 294 4. . . . . . . . . .4. . . . . . . . . . .4. . . . . . . . . .4. . . . 287 4. . . . .1 Detailed Description . . . . .44. . .2. .6 cuGraphicsD3D10RegisterResource . . . . . . 296 4. . . . . . . . . . . . . . .1 CUD3D10map_flags_enum . . . . . . . . . . . .2 CUD3D10register_flags_enum . . . . . . . . . . . . . . . . . . . .1 cuD3D10CtxCreate . . . . . . . . . . . . . . . . . . . . . 297 4. . . . . . . . . . . . . . . . . 286 4. . . . .4. . . . . . .4. . . . . . . . . . . . . . . . . . .46 Direct3D 11 Interoperability . . . . . . . .4 Function Documentation . . . . . . .3. . . . . .45. . . . . . .4. . . . . . . .45. . . . . . . . .4. . . . . . . . . . . . . .44. . .3. . . . . . . . . . . . . .4. . . . .45. . . . . . . .1 CUd3d11DeviceList_enum . . .45. . . . .2 Typedef Documentation . . .2 cuD3D10CtxCreateOnDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46. . . . . . . . . . . . . . . . . . 289 4. . . . . 289 4. . . . . . . . . . 287 4. . . . . .4 cuD3D10GetDevices . . .46. . 293 4. 298 4. . . . . 293 4.1 Detailed Description . 293 4. .3 Enumeration Type Documentation . . . . . . 287 4. . 297 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 4. . . . . . . . . . . . . . . . . .1 CUD3D10map_flags . . . . . . . . . . . . . . . . . . 293 4. . 288 4.2 Typedef Documentation . . . . . . . . . . . . .1 Detailed Description . . . . . . . . .3 cuD3D10GetDevice . . . 293 4. . .4. . . . . .3 Enumeration Type Documentation . . . . . .44. . . . . . . . .45. . . . . . . . . . . . . . . . . . . . . . . . .CONTENTS xvii 4. . . . . . . . . .4. .5 cuD3D10ResourceGetMappedPointer . . . . . . . .1 CUd3d10DeviceList_enum . . . . . .46. . . . . . .7 cuD3D10ResourceGetSurfaceDimensions . . . . . .46. . . . . . . . . . . . . .44. . . . . . . . .44. . .3 Enumeration Type Documentation . . . . . . . . . . . . . .44. . . . . . . . . 301 4. . .44. . . . . . . . . . . . . . . .45. . .44. . . . . . . . . . . . . . 287 4.9 cuD3D10UnmapResources . . . . . . . . .45. . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 4. . .2. . . . . . . . . . . . . . . . .4.45. . . . . . . . 293 4. . . . . . . . 299 4. . . . . .1 CUd3d11DeviceList . . . . . . . . . . . .2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 4. . . . . . . .45. . . 300 4. . . . . . . . . . . . . . 299 4. . . . 301 4. . . . . . . . . . . . . . . . .4 Function Documentation . . . . . . . . . . . . . .44. . . . 301 4. . . . . . . . . . . . .5 cuD3D10GetDirect3DDevice . . . . . . . .6 cuD3D10ResourceGetMappedSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 4. . .1 CUd3d10DeviceList . . . . . .45. . .3 cuD3D10ResourceGetMappedArray . . . . . . . . . . . . . . . .45. . . . . . . . . . . .2 CUD3D10register_flags . .

xviii

CONTENTS 4.46.4 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 4.46.4.1 cuD3D11CtxCreate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 4.46.4.2 cuD3D11CtxCreateOnDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 4.46.4.3 cuD3D11GetDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 4.46.4.4 cuD3D11GetDevices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 4.46.4.5 cuD3D11GetDirect3DDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 4.46.4.6 cuGraphicsD3D11RegisterResource . . . . . . . . . . . . . . . . . . . . . . . . . 305

4.47 VDPAU Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 4.47.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 4.47.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 4.47.2.1 cuGraphicsVDPAURegisterOutputSurface . . . . . . . . . . . . . . . . . . . . . . 307 4.47.2.2 cuGraphicsVDPAURegisterVideoSurface . . . . . . . . . . . . . . . . . . . . . . . 308 4.47.2.3 cuVDPAUCtxCreate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 4.47.2.4 cuVDPAUGetDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 5 Data Structure Documentation 5.1 311

CUDA_ARRAY3D_DESCRIPTOR_st Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . 311 5.1.1 5.1.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 5.1.2.1 5.1.2.2 5.1.2.3 5.1.2.4 5.1.2.5 5.1.2.6 Depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 Height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 NumChannels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 Width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312

5.2

CUDA_ARRAY_DESCRIPTOR_st Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 313 5.2.1 5.2.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 5.2.2.1 5.2.2.2 5.2.2.3 5.2.2.4 Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 Height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 NumChannels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 Width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313

5.3

CUDA_MEMCPY2D_st Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 5.3.1 5.3.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 5.3.2.1 5.3.2.2 dstArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 dstDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Generated for NVIDIA CUDA Library by Doxygen

CONTENTS 5.3.2.3 5.3.2.4 5.3.2.5 5.3.2.6 5.3.2.7 5.3.2.8 5.3.2.9

xix dstHost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 dstMemoryType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 dstPitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 dstXInBytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 dstY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 Height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 srcArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315

5.3.2.10 srcDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 5.3.2.11 srcHost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 5.3.2.12 srcMemoryType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 5.3.2.13 srcPitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 5.3.2.14 srcXInBytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 5.3.2.15 srcY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 5.3.2.16 WidthInBytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 5.4 CUDA_MEMCPY3D_st Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 5.4.1 5.4.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 5.4.2.1 5.4.2.2 5.4.2.3 5.4.2.4 5.4.2.5 5.4.2.6 5.4.2.7 5.4.2.8 5.4.2.9 Depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 dstArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 dstDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 dstHeight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 dstHost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 dstLOD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 dstMemoryType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 dstPitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 dstXInBytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317

5.4.2.10 dstY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 5.4.2.11 dstZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 5.4.2.12 Height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 5.4.2.13 reserved0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 5.4.2.14 reserved1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 5.4.2.15 srcArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 5.4.2.16 srcDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 5.4.2.17 srcHeight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 5.4.2.18 srcHost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 5.4.2.19 srcLOD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 5.4.2.20 srcMemoryType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Generated for NVIDIA CUDA Library by Doxygen

xx

CONTENTS 5.4.2.21 srcPitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 5.4.2.22 srcXInBytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 5.4.2.23 srcY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 5.4.2.24 srcZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 5.4.2.25 WidthInBytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 5.5 cudaChannelFormatDesc Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 5.5.1 5.5.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 5.5.2.1 5.5.2.2 5.5.2.3 5.5.2.4 5.5.2.5 5.6 f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319

cudaDeviceProp Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 5.6.1 5.6.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 5.6.2.1 5.6.2.2 5.6.2.3 5.6.2.4 5.6.2.5 5.6.2.6 5.6.2.7 5.6.2.8 5.6.2.9 canMapHostMemory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 clockRate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 computeMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 concurrentKernels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 deviceOverlap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 ECCEnabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 integrated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 kernelExecTimeoutEnabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 major . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

5.6.2.10 maxGridSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 5.6.2.11 maxTexture1D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 5.6.2.12 maxTexture2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 5.6.2.13 maxTexture2DArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 5.6.2.14 maxTexture3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 5.6.2.15 maxThreadsDim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 5.6.2.16 maxThreadsPerBlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 5.6.2.17 memPitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 5.6.2.18 minor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 5.6.2.19 multiProcessorCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 5.6.2.20 name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 5.6.2.21 pciBusID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Generated for NVIDIA CUDA Library by Doxygen

CONTENTS

xxi 5.6.2.22 pciDeviceID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 5.6.2.23 regsPerBlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 5.6.2.24 sharedMemPerBlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 5.6.2.25 surfaceAlignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 5.6.2.26 tccDriver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 5.6.2.27 textureAlignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 5.6.2.28 totalConstMem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 5.6.2.29 totalGlobalMem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 5.6.2.30 warpSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323

5.7

cudaExtent Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 5.7.1 5.7.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 5.7.2.1 5.7.2.2 5.7.2.3 depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324

5.8

cudaFuncAttributes Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 5.8.1 5.8.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 5.8.2.1 5.8.2.2 5.8.2.3 5.8.2.4 5.8.2.5 5.8.2.6 5.8.2.7 binaryVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 constSizeBytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 localSizeBytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 maxThreadsPerBlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 numRegs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 ptxVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 sharedSizeBytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326

5.9

cudaMemcpy3DParms Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 5.9.1 5.9.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 5.9.2.1 5.9.2.2 5.9.2.3 5.9.2.4 5.9.2.5 5.9.2.6 5.9.2.7 5.9.2.8 dstArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 dstPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 dstPtr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 extent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 kind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 srcArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 srcPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 srcPtr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328

5.10 cudaPitchedPtr Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Generated for NVIDIA CUDA Library by Doxygen

xxii

CONTENTS 5.10.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 5.10.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 5.10.2.1 pitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 5.10.2.2 ptr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 5.10.2.3 xsize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 5.10.2.4 ysize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329

5.11 cudaPos Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 5.11.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 5.11.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 5.11.2.1 x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 5.11.2.2 y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 5.11.2.3 z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 5.12 CUdevprop_st Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 5.12.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 5.12.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 5.12.2.1 clockRate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 5.12.2.2 maxGridSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 5.12.2.3 maxThreadsDim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 5.12.2.4 maxThreadsPerBlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 5.12.2.5 memPitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 5.12.2.6 regsPerBlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 5.12.2.7 sharedMemPerBlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 5.12.2.8 SIMDWidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 5.12.2.9 textureAlign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 5.12.2.10 totalConstantMemory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 5.13 surfaceReference Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 5.13.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 5.13.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 5.13.2.1 channelDesc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 5.14 textureReference Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 5.14.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 5.14.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 5.14.2.1 addressMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 5.14.2.2 channelDesc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 5.14.2.3 filterMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 5.14.2.4 normalized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334

Generated for NVIDIA CUDA Library by Doxygen

Chapter 1

Deprecated List
Global cudaD3D9MapResources This function is deprecated as of Cuda 3.0.

Global cudaD3D9RegisterResource This function is deprecated as of Cuda 3.0.

Global cudaD3D9ResourceGetMappedArray This function is deprecated as of Cuda 3.0.

Global cudaD3D9ResourceGetMappedPitch This function is deprecated as of Cuda 3.0.

Global cudaD3D9ResourceGetMappedPointer This function is deprecated as of Cuda 3.0.

Global cudaD3D9ResourceGetMappedSize This function is deprecated as of Cuda 3.0.

Global cudaD3D9ResourceGetSurfaceDimensions This function is deprecated as of Cuda 3.0.

Global cudaD3D9ResourceSetMapFlags This function is deprecated as of Cuda 3.0.

Global cudaD3D9UnmapResources This function is deprecated as of Cuda 3.0.

Global cudaD3D9UnregisterResource This function is deprecated as of Cuda 3.0.

Global cudaD3D10MapResources This function is deprecated as of Cuda 3.0.

Global cudaD3D10RegisterResource This function is deprecated as of Cuda 3.0.

Global cudaD3D10ResourceGetMappedArray This function is deprecated as of Cuda 3.0.

2 Global cudaD3D10ResourceGetMappedPitch This function is deprecated as of Cuda 3.0.

Deprecated List

Global cudaD3D10ResourceGetMappedPointer This function is deprecated as of Cuda 3.0.

Global cudaD3D10ResourceGetMappedSize This function is deprecated as of Cuda 3.0.

Global cudaD3D10ResourceGetSurfaceDimensions This function is deprecated as of Cuda 3.0.

Global cudaD3D10ResourceSetMapFlags This function is deprecated as of Cuda 3.0.

Global cudaD3D10UnmapResources This function is deprecated as of Cuda 3.0.

Global cudaD3D10UnregisterResource This function is deprecated as of Cuda 3.0.

Global cudaGLMapBufferObject This function is deprecated as of Cuda 3.0.

Global cudaGLMapBufferObjectAsync This function is deprecated as of Cuda 3.0.

Global cudaGLRegisterBufferObject This function is deprecated as of Cuda 3.0.

Global cudaGLSetBufferObjectMapFlags This function is deprecated as of Cuda 3.0.

Global cudaGLUnmapBufferObject This function is deprecated as of Cuda 3.0.

Global cudaGLUnmapBufferObjectAsync This function is deprecated as of Cuda 3.0.

Global cudaGLUnregisterBufferObject This function is deprecated as of Cuda 3.0.

Global cudaErrorPriorLaunchFailure This error return is deprecated as of CUDA 3.1. Device emulation mode was removed with the CUDA 3.1 release.

Global cudaErrorAddressOfConstant This error return is deprecated as of CUDA 3.1. Variables in constant memory may now have their address taken by the runtime via cudaGetSymbolAddress().

Global cudaErrorTextureFetchFailed This error return is deprecated as of CUDA 3.1. Device emulation mode was removed with the CUDA 3.1 release.

Generated for NVIDIA CUDA Library by Doxygen

1 release. Global cuGLUnregisterBufferObject This function is deprecated as of Cuda 3. Global cudaErrorMemoryValueTooLarge This error return is deprecated as of CUDA 3.0.0. Global cudaErrorSynchronizationError This error return is deprecated as of CUDA 3. It is no longer an error to attempt to push the active context via cuCtxPushCurrent(). Global cuParamSetTexRef Global cuTexRefCreate Global cuTexRefDestroy Global cuGLInit This function is deprecated as of Cuda 3.2.1 release.0. Device emulation mode was removed with the CUDA 3. Global cuGLMapBufferObjectAsync This function is deprecated as of Cuda 3.0. Generated for NVIDIA CUDA Library by Doxygen . Device emulation mode was removed with the CUDA 3. Global CUDA_ERROR_CONTEXT_ALREADY_CURRENT This error return is deprecated as of CUDA 3. Global cuGLMapBufferObject This function is deprecated as of Cuda 3.1. Global cudaErrorMixedDeviceExecution This error return is deprecated as of CUDA 3. Global cuGLUnmapBufferObjectAsync This function is deprecated as of Cuda 3.2.1.0.1.1.0.0.1 release. Device emulation mode was removed with the CUDA 3. Global cudaErrorCudartUnloading This error return is deprecated as of CUDA 3. Global cuGLUnmapBufferObject This function is deprecated as of Cuda 3. Device emulation mode was removed with the CUDA 3.1 release. Global cuGLSetBufferObjectMapFlags This function is deprecated as of Cuda 3.0.3 Global cudaErrorTextureNotBound This error return is deprecated as of CUDA 3. Global cuGLRegisterBufferObject This function is deprecated as of Cuda 3.

0.0. Global cuD3D9ResourceGetMappedPointer This function is deprecated as of Cuda 3. Global cuD3D9UnregisterResource This function is deprecated as of Cuda 3.0. Global cuD3D9ResourceSetMapFlags This function is deprecated as of Cuda 3. Deprecated List Generated for NVIDIA CUDA Library by Doxygen .0. Global cuD3D10ResourceGetMappedPitch This function is deprecated as of Cuda 3. Global cuD3D9ResourceGetSurfaceDimensions This function is deprecated as of Cuda 3.0. Global cuD3D10ResourceGetMappedArray This function is deprecated as of Cuda 3. Global cuD3D10UnregisterResource This function is deprecated as of Cuda 3.0. Global cuD3D9ResourceGetMappedPitch This function is deprecated as of Cuda 3.0. Global cuD3D10UnmapResources This function is deprecated as of Cuda 3. Global cuD3D10ResourceGetMappedPointer This function is deprecated as of Cuda 3. Global cuD3D10ResourceSetMapFlags This function is deprecated as of Cuda 3.0.0.0.0.0. Global cuD3D10ResourceGetMappedSize This function is deprecated as of Cuda 3. Global cuD3D9ResourceGetMappedArray This function is deprecated as of Cuda 3.0.0.0. Global cuD3D10MapResources This function is deprecated as of Cuda 3.0.0. Global cuD3D9UnmapResources This function is deprecated as of Cuda 3. Global cuD3D9ResourceGetMappedSize This function is deprecated as of Cuda 3. Global cuD3D9RegisterResource This function is deprecated as of Cuda 3. Global cuD3D10RegisterResource This function is deprecated as of Cuda 3.0.4 Global cuD3D9MapResources This function is deprecated as of Cuda 3.0. Global cuD3D10ResourceGetSurfaceDimensions This function is deprecated as of Cuda 3.0.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . Data types used by CUDA Runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Module Management . . . . . . . . . . . . . . . Direct3D 9 Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . Event Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CUDA Driver API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Direct3D 10 Interoperability . . . . . . . . . . . . . . . Version Management . . . . . . . . . . . . . . . . . .Chapter 2 Module Index 2. . . . . . . . . . . . . . Texture Reference Management . . . . . . . . . . . . . . . Initialization . . . . . . . . . . . . . Stream Management . . . . . . Interactions with the CUDA Driver API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C++ API Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 11 15 17 23 26 30 34 66 130 70 114 75 122 80 84 87 91 96 98 99 112 135 147 148 165 166 167 173 182 188 230 233 Here is a list of all modules: CUDA Runtime API . . . . . . . . . . OpenGL Interoperability [DEPRECATED] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Version Management . . . . . . . . . . . . . . . . . . . . . . . . . . Device Management . . . . . . . . . . . . . . . . . . . . Direct3D 9 Interoperability [DEPRECATED] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Memory Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Device Management . . . Direct3D 11 Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Context Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Error Handling . . . . . . . . . . . . . . . Event Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data types used by CUDA driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Memory Management . . . . . . . . . Execution Control . . . . . . Stream Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Direct3D 10 Interoperability [DEPRECATED] . . . . Graphics Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Thread Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VDPAU Interoperability . . . . . . . . . . . . . . . . . . . . . . Surface Reference Management . . . . . . . . . . . . . . . . . . . . . . OpenGL Interoperability . . . . . . . . . . . . . . . . . . . . .

. OpenGL Interoperability [DEPRECATED] . . . . . . . . . . . . . . . . . . . . . . . . . . . . OpenGL Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6 Execution Control . . 237 244 245 253 255 257 262 265 271 277 286 292 301 307 Generated for NVIDIA CUDA Library by Doxygen . . . . . . . . . . . . . . . . . . . . . Texture Reference Management [DEPRECATED] Surface Reference Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Direct3D 9 Interoperability [DEPRECATED] . . . . . . . . . . . . . . . . . . . . . . . . . . . Direct3D 9 Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . Texture Reference Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Direct3D 11 Interoperability . . . . . . . . . . . . . . . . . . . . . . Graphics Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Direct3D 10 Interoperability [DEPRECATED] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Execution Control [DEPRECATED] . . . . . . . . . . . . . . . . . . . Direct3D 10 Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Module Index . . . . . . . . . . . . . VDPAU Interoperability . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 313 314 316 319 320 324 325 327 329 330 331 333 334 Here are the data structures with brief descriptions: CUDA_ARRAY3D_DESCRIPTOR_st CUDA_ARRAY_DESCRIPTOR_st . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaExtent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaMemcpy3DParms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaDeviceProp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CUDA_MEMCPY2D_st . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . textureReference . . . . . . . . . . . . . . cudaPitchedPtr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CUdevprop_st . . . . . . . . . . . . . . . . . . . . . . . . CUDA_MEMCPY3D_st . . . . . . . . . . cudaFuncAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter 3 Data Structure Index 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaChannelFormatDesc . . . . . . . . . . . . . surfaceReference . . . . . .

8 Data Structure Index Generated for NVIDIA CUDA Library by Doxygen .

• Data types used by CUDA Runtime Defines • #define CUDART_VERSION 3020 . • Interactions with the CUDA Driver API Interactions between the CUDA Driver API and the CUDA Runtime API.1 CUDA Runtime API Modules • • • • • • • • • • • • • • • • • Thread Management Error Handling Device Management Stream Management Event Management Execution Control Memory Management OpenGL Interoperability Direct3D 9 Interoperability Direct3D 10 Interoperability Direct3D 11 Interoperability VDPAU Interoperability Graphics Interoperability Texture Reference Management Surface Reference Management Version Management C++ API Routines C++-style interface built on top of CUDA runtime API.Chapter 4 Module Documentation 4.

1. the execution configuration syntax to invoke kernels is only available in source code compiled with nvcc. textures. These wrappers require the use of nvcc because they depend on code being generated by the compiler.1. and device functions. 4. It wraps some of the C API routines. using overloading.1 Detailed Description There are two levels for the runtime API. These wrappers can be used from C++ code and can be compiled with any C++ compiler. references and default arguments.1 Define Documentation #define CUDART_VERSION 3020 CUDA Runtime API Version 3.1.h) is a C++-style interface built on top of the C API.h) is a C-style interface that does not require compiling with nvcc.2.2 Generated for NVIDIA CUDA Library by Doxygen . The C++ API (cuda_runtime. The C++ API also has some CUDA-specific wrappers that wrap C API routines that deal with symbols. For example. The C API (cuda_runtime_api.2 4.10 Module Documentation 4.

2. • cudaError_t cudaThreadGetCacheConfig (enum cudaFuncCache ∗pCacheConfig) Returns the preferred cache configuration for the current host thread.2 4.2.2 Thread Management Functions • cudaError_t cudaThreadExit (void) Exit and clean up from CUDA launches. Returns: cudaSuccess Note: Note that this function may also return error codes from previous. enum cudaLimit limit) Returns resource limits. • cudaError_t cudaThreadSetLimit (enum cudaLimit limit. 4.2.2 Thread Management 11 4. size_t value) Set resource limits. Any subsequent API call reinitializes the runtime. • cudaError_t cudaThreadGetLimit (size_t ∗pValue. See also: cudaThreadSynchronize Generated for NVIDIA CUDA Library by Doxygen .2.1 Function Documentation cudaError_t cudaThreadExit (void) Explicitly cleans up all runtime-related resources associated with the calling host thread. asynchronous launches.1 Detailed Description This section describes the thread management functions of the CUDA runtime application programming interface. • cudaError_t cudaThreadSetCacheConfig (enum cudaFuncCache cacheConfig) Sets the preferred cache configuration for the current host thread. • cudaError_t cudaThreadSynchronize (void) Wait for compute device to finish. cudaThreadExit() is implicitly called on host thread exit. 4.4.

but it is free to choose a different configuration if required to execute functions. The supported cudaLimit values are: • cudaLimitStackSize: stack size of each GPU thread. cudaErrorInitializationError Note: Note that this function may also return error codes from previous. The supported cache configurations are: • cudaFuncCachePreferNone: no preference for shared memory or L1 (default) • cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache • cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory Parameters: pCacheConfig . cudaFuncSetCacheConfig (C++ API) 4.2 Module Documentation cudaError_t cudaThreadGetCacheConfig (enum cudaFuncCache ∗ pCacheConfig) On devices where the L1 cache and shared memory use the same hardware resources. The runtime will use the requested configuration if possible. See also: cudaThreadSetLimit Generated for NVIDIA CUDA Library by Doxygen . this returns through pCacheConfig the preferred cache configuration for the current host thread.Limit to query pValue . cudaErrorInvalidValue Note: Note that this function may also return error codes from previous. • cudaLimitMallocHeapSize: size of the heap used by the malloc() and free() device system calls. cudaErrorUnsupportedLimit. asynchronous launches. cudaFuncSetCacheConfig (C API).2. See also: cudaThreadSetCacheConfig.Returned cache configuration Returns: cudaSuccess.Returned size in bytes of limit Returns: cudaSuccess.2. • cudaLimitPrintfFifoSize: size of the FIFO used by the printf() device system call.3 cudaError_t cudaThreadGetLimit (size_t ∗ pValue.12 4. This will return a pCacheConfig of cudaFuncCachePreferNone on devices where the size of the L1 cache and shared memory are fixed. Parameters: limit .2. asynchronous launches. enum cudaLimit limit) Returns in ∗pValue the current size of limit. This is only a preference.2.

0 will result in the error cudaErrorUnsupportedLimit being returned.4.4 cudaError_t cudaThreadSetCacheConfig (enum cudaFuncCache cacheConfig) 13 On devices where the L1 cache and shared memory use the same hardware resources. this sets through cacheConfig the preferred cache configuration for the current host thread. Generated for NVIDIA CUDA Library by Doxygen .2. cudaFuncSetCacheConfig (C API). See also: cudaThreadGetCacheConfig.0 and higher.2. • cudaLimitStackSize controls the stack size of each GPU thread.0 and higher. cudaFuncSetCacheConfig (C++ API) 4. The driver is free to modify the requested value to meet h/w requirements (this could be clamping to minimum or maximum values. Setting the thread-wide cache configuration to cudaFuncCachePreferNone will cause subsequent kernel launches to prefer to not change the cache configuration unless required to launch the kernel. so each is discussed here. Any function preference set via cudaFuncSetCacheConfig (C API) or cudaFuncSetCacheConfig (C++ API) will be preferred over this thread-wide setting. size_t value) Setting limit to value is a request by the application to update the current limit maintained by the thread. This is only a preference. Setting each cudaLimit has its own specific restrictions. Attempting to set this limit on devices of compute capability less than 2. The supported cache configurations are: • cudaFuncCachePreferNone: no preference for shared memory or L1 (default) • cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache • cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory Parameters: cacheConfig . Setting cudaLimitPrintfFifoSize must be performed before launching any kernel that uses the printf() device system call. otherwise cudaErrorInvalidValue will be returned. The runtime will use the requested configuration if possible. asynchronous launches.2. cudaErrorInitializationError Note: Note that this function may also return error codes from previous. Attempting to set this limit on devices of compute capability less than 2.Requested cache configuration Returns: cudaSuccess. This limit is only applicable to devices of compute capability 2. • cudaLimitPrintfFifoSize controls the size of the FIFO used by the printf() device system call.5 cudaError_t cudaThreadSetLimit (enum cudaLimit limit.2 Thread Management 4. but it is free to choose a different configuration if required to execute the function. This limit is only applicable to devices of compute capability 2. Launching a kernel with a different preference than the most recent preference setting may insert a device-side synchronization point. rounding up to nearest element size.0 will result in the error cudaErrorUnsupportedLimit being returned. This setting does nothing on devices where the size of the L1 cache and shared memory are fixed. The application can use cudaThreadGetLimit() to find out exactly what the limit has been set to.2. etc).

If the cudaDeviceBlockingSync flag was set for this device.Limit to set value . asynchronous launches.2. See also: cudaThreadExit Generated for NVIDIA CUDA Library by Doxygen . cudaErrorInvalidValue Note: Note that this function may also return error codes from previous.2. This limit is only applicable to devices of compute capability 2. cudaThreadSynchronize() returns an error if one of the preceding tasks has failed. cudaErrorUnsupportedLimit. See also: cudaThreadGetLimit 4. otherwise cudaErrorInvalidValue will be returned.Size in bytes of limit Returns: cudaSuccess.0 will result in the error cudaErrorUnsupportedLimit being returned. Parameters: limit . Returns: cudaSuccess Note: Note that this function may also return error codes from previous. Attempting to set this limit on devices of compute capability less than 2.14 Module Documentation • cudaLimitMallocHeapSize controls the size of the heap used by the malloc() and free() device system calls. the host thread will block until the device has finished its work. Setting cudaLimitMallocHeapSize must be performed before launching any kernel that uses the malloc() or free() device system calls. asynchronous launches.0 and higher.6 cudaError_t cudaThreadSynchronize (void) Blocks until the device has completed all preceding requested tasks.

cudaErrorLaunchOutOfResources. • cudaError_t cudaGetLastError (void) Returns the last error from a runtime call.3 Error Handling 15 4.Error code to convert to string Returns: char∗ pointer to a NULL-terminated string See also: cudaGetLastError. cudaErrorApiFailureBase Generated for NVIDIA CUDA Library by Doxygen . cudaErrorInvalidSymbol. cudaErrorUnknown.4.3.3 Error Handling Functions • const char ∗ cudaGetErrorString (cudaError_t error) Returns the message string from an error code. cudaErrorInvalidDevicePointer. cudaErrorInvalidMemcpyDirection.3.2. cudaErrorLaunchTimeout. cudaErrorInvalidValue. 4. cudaError 4.2 cudaError_t cudaGetLastError (void) Returns the last error that has been produced by any of the runtime calls in the same host thread and resets it to cudaSuccess.3. cudaErrorUnmapBufferObjectFailed. cudaErrorInvalidNormSetting. cudaPeekAtLastError.2. Returns: cudaSuccess. cudaErrorInvalidPitchValue.2 4. cudaErrorSetOnActiveProcess. cudaErrorStartupFailure. cudaErrorLaunchFailure. cudaErrorInvalidFilterSetting. cudaErrorNotYetImplemented. cudaErrorMissingConfiguration. cudaErrorInvalidHostPointer. cudaErrorInvalidDevice. Parameters: error .3.1 Function Documentation const char∗ cudaGetErrorString (cudaError_t error) Returns the message string from an error code. cudaErrorInsufficientDriver. 4.1 Detailed Description This section describes the error handling functions of the CUDA runtime application programming interface. cudaErrorInvalidChannelDescriptor. cudaErrorInvalidTextureBinding. cudaErrorInvalidConfiguration. cudaErrorMemoryAllocation. • cudaError_t cudaPeekAtLastError (void) Returns the last error from a runtime call. cudaErrorInitializationError. cudaErrorInvalidTexture. cudaErrorInvalidDeviceFunction. cudaErrorInvalidResourceHandle.

2. cudaError Generated for NVIDIA CUDA Library by Doxygen . cudaErrorSetOnActiveProcess. cudaErrorNotYetImplemented. cudaErrorInvalidMemcpyDirection. cudaErrorMissingConfiguration. asynchronous launches. cudaError 4. cudaErrorInsufficientDriver.3 cudaError_t cudaPeekAtLastError (void) Returns the last error that has been produced by any of the runtime calls in the same host thread. cudaErrorLaunchTimeout. cudaErrorInvalidTexture. cudaErrorInitializationError. cudaErrorApiFailureBase Note: Note that this function may also return error codes from previous. cudaErrorInvalidResourceHandle. cudaErrorUnknown. cudaGetErrorString. cudaErrorStartupFailure. cudaErrorInvalidDeviceFunction. Note that this call does not reset the error to cudaSuccess like cudaGetLastError(). cudaErrorLaunchFailure. cudaErrorInvalidDevice.3. cudaErrorInvalidConfiguration. cudaErrorInvalidFilterSetting.16 Note: Module Documentation Note that this function may also return error codes from previous. cudaErrorInvalidValue. cudaErrorInvalidDevicePointer. cudaErrorInvalidHostPointer. Returns: cudaSuccess. cudaErrorInvalidPitchValue. cudaErrorMemoryAllocation. asynchronous launches. cudaErrorLaunchOutOfResources. cudaErrorInvalidChannelDescriptor. cudaGetErrorString. cudaErrorInvalidSymbol. cudaErrorInvalidTextureBinding. See also: cudaGetLastError. cudaErrorInvalidNormSetting. See also: cudaPeekAtLastError. cudaErrorUnmapBufferObjectFailed.

• cudaError_t cudaGetDeviceCount (int ∗count) Returns the number of compute-capable devices.4 Device Management Functions • cudaError_t cudaChooseDevice (int ∗device. cudaErrorInvalidValue Note: Note that this function may also return error codes from previous. • cudaError_t cudaGetDeviceProperties (struct cudaDeviceProp ∗prop. • cudaError_t cudaSetDeviceFlags (unsigned int flags) Sets flags to be used for device executions. const struct cudaDeviceProp ∗prop) Select compute-device which best matches criteria. cudaGetDevice. • cudaError_t cudaSetDevice (int device) Set device to be used for GPU executions.4. 4. cudaGetDeviceProperties Generated for NVIDIA CUDA Library by Doxygen . • cudaError_t cudaSetValidDevices (int ∗device_arr.Device with best match prop .2 4.4.1 Detailed Description This section describes the device management functions of the CUDA runtime application programming interface.4 Device Management 17 4. See also: cudaGetDeviceCount.4.Desired device properties Returns: cudaSuccess. cudaSetDevice.2. int len) Set a list of devices that can be used for CUDA.1 Function Documentation cudaError_t cudaChooseDevice (int ∗ device. • cudaError_t cudaGetDevice (int ∗device) Returns which device is currently being used.4. const struct cudaDeviceProp ∗ prop) Returns in ∗device the device which has properties that best match ∗prop. int device) Returns information about the compute-device. asynchronous launches. Parameters: device . 4.

Returns: cudaSuccess Note: Note that this function may also return error codes from previous. cudaGetDeviceProperties. Since this device will be able to emulate all hardware features. cudaGetDeviceProperties.2 cudaError_t cudaGetDevice (int ∗ device) Module Documentation Returns in ∗device the device on which the active host thread executes the device code.4.4.Returns the number of devices with compute capability greater or equal to 1.4. asynchronous launches. See also: cudaGetDevice. cudaChooseDevice 4. asynchronous launches.0 that are available for execution.2.3 cudaError_t cudaGetDeviceCount (int ∗ count) Returns in ∗count the number of devices with compute capability greater or equal to 1. int device) Returns in ∗prop the properties of device dev. Parameters: count .2. See also: cudaGetDeviceCount. int maxGridSize[3]. int warpSize. int maxThreadsDim[3]. cudaSetDevice. size_t sharedMemPerBlock. Generated for NVIDIA CUDA Library by Doxygen . cudaGetDeviceCount() returns 1 and device 0 only supports device emulation mode. size_t memPitch. cudaChooseDevice 4. cudaSetDevice.2. this device will report major and minor compute capability versions of 9999. int regsPerBlock. If there is no such device. The cudaDeviceProp structure is defined as: struct cudaDeviceProp { char name[256]. int maxThreadsPerBlock. Parameters: device . size_t totalGlobalMem.Returns the device on which the active host thread executes the device code.0 Returns: cudaSuccess Note: Note that this function may also return error codes from previous.4 cudaError_t cudaGetDeviceProperties (struct cudaDeviceProp ∗ prop.18 4.

int integrated. • integrated is 1 if the device is an integrated (motherboard) GPU and 0 if it is a discrete (card) component. int pciDeviceID. int pciBusID. int clockRate. or 0 if not.4. this number is shared by all thread blocks simultaneously resident on a multiprocessor. int ECCEnabled. int computeMode. • maxGridSize[3] contains the maximum size of each dimension of a grid. int concurrentKernels. • kernelExecTimeoutEnabled is 1 if there is a run time limit for kernels executed on the device. int deviceOverlap. int canMapHostMemory. • canMapHostMemory is 1 if the device can map host memory into the CUDA address space for use with cudaHostAlloc()/cudaHostGetDevicePointer(). • sharedMemPerBlock is the maximum amount of shared memory available to a thread block in bytes.4 Device Management size_t totalConstMem. • maxThreadsDim[3] contains the maximum size of each dimension of a block. • deviceOverlap is 1 if the device can concurrently copy memory between host and device while executing a kernel. • totalConstMem is the total amount of constant memory available on the device in bytes. • major. int minor. minor are the major and minor revision numbers defining the device’s compute capability. texture base addresses that are aligned to textureAlignment bytes do not need an offset applied to texture fetches. or 0 if not. • totalGlobalMem is the total amount of global memory available on the device in bytes. • computeMode is the compute mode that the device is currently in. int multiProcessorCount. } 19 where: • name[256] is an ASCII string identifying the device. or 0 if not. • regsPerBlock is the maximum number of 32-bit registers available to a thread block. • clockRate is the clock frequency in kilohertz. • textureAlignment is the alignment requirement. Available modes are as follows: Generated for NVIDIA CUDA Library by Doxygen . this amount is shared by all thread blocks simultaneously resident on a multiprocessor. int major. int kernelExecTimeoutEnabled. int tccDriver. • warpSize is the warp size in threads. • memPitch is the maximum pitch in bytes allowed by the memory copy functions that involve memory regions allocated through cudaMallocPitch(). size_t textureAlignment. • multiProcessorCount is the number of multiprocessors on the device. • maxThreadsPerBlock is the maximum number of threads per block.

Device number to get properties for Returns: cudaSuccess.Only one thread will be able to use cudaSetDevice() with this device. At that time.Properties for the specified device device .20 Module Documentation – cudaComputeModeDefault: Default mode . • pciDeviceID is the PCI device (sometimes called slot) identifier of the device. cudaGetDevice. cudaErrorInvalidDevice. – cudaComputeModeProhibited: Compute-prohibited mode . • concurrentKernels is 1 if the device supports executing multiple kernels within the same context simultaneously. • ECCEnabled is 1 if the device has ECC support turned on. If the host thread has already initialized the CUDA runtime by calling non-device management runtime functions or if there exists a CUDA driver context active on the host thread.No threads can use cudaSetDevice() with this device.4. or 0 if not.2.Device on which the active host thread should execute the device code. cudaGetDevice. Parameters: prop . See also: cudaGetDeviceCount. • tccDriver is 1 if the device is using a TCC driver or 0 if not. It is not guaranteed that multiple kernels will be resident on the device concurrently so this feature should not be relied upon for correctness. cudaErrorSetOnActiveProcess Note: Note that this function may also return error codes from previous. or 0 if not. cudaErrorInvalidDevice See also: cudaGetDeviceCount. – cudaComputeModeExclusive: Compute-exclusive mode . then this call returns cudaErrorSetOnActiveProcess. • pciBusID is the PCI bus identifier of the device. cudaGetDeviceProperties. asynchronous launches. cudaChooseDevice 4. Returns: cudaSuccess.Device is not restricted and multiple threads can use cudaSetDevice() with this device.5 cudaError_t cudaSetDevice (int device) Records device as the device on which the active host thread executes the device code. cudaChooseDevice Generated for NVIDIA CUDA Library by Doxygen . Any errors from calling cudaSetDevice() with an exclusive (and occupied) or prohibited device will only show up after a non-device management runtime function is called. cudaErrorNoDevice will be returned. Parameters: device . cudaSetDevice.

The parameter len specifies the number of elements in the list.6 cudaError_t cudaSetDeviceFlags (unsigned int flags) 21 Records flags as the flags to use when the active host thread executes device code. If this flag is not set. but may lower the performance of CPU threads if they are performing work in parallel with the CUDA thread. Parameters: flags . Parameters: device_arr . cudaSetDevice.2.Parameters for device operation Returns: cudaSuccess. but can increase the performance of CPU threads performing work in parallel with the device. or if it is called with a len of 0. cudaHostGetDevicePointer() will always return a failure code. cudaGetDevice. CUDA will try devices from the list sequentially until it finds one that works.4. int len) Sets a list of devices for CUDA execution in priority order using device_arr.7 cudaError_t cudaSetValidDevices (int ∗ device_arr. then this call returns cudaErrorSetOnActiveProcess. This can decrease latency when waiting for the device.4. This can prevent thrashing by local memory allocations when launching many kernels with high local memory usage at the cost of potentially increased memory usage. • cudaDeviceLmemResizeToMax: Instruct CUDA to not reduce local memory after resizing local memory for a kernel. The two LSBs of the flags parameter can be used to control how the CPU thread interacts with the OS scheduler when waiting for results from the device.4. • cudaDeviceBlockingSync: Instruct CUDA to block the CPU thread on a synchronization primitive when waiting for the device to finish work. If this function is not called. this function will return cudaErrorInvalidDevice. cudaErrorSetOnActiveProcess See also: cudaGetDeviceCount. If C > P. • cudaDeviceScheduleAuto: The default value if the flags parameter is zero. This can increase latency when waiting for the device. then cudaErrorInvalidValue is returned. cudaGetDeviceProperties.List of devices to try Generated for NVIDIA CUDA Library by Doxygen . If a specified device ID in the list does not exist. If the host thread has already initialized the CUDA runtime by calling non-device management runtime functions or if there exists a CUDA driver context active on the host thread. cudaChooseDevice 4. then CUDA will yield to other OS threads when waiting for the device. • cudaDeviceScheduleSpin: Instruct CUDA to actively spin when waiting for results from the device. • cudaDeviceMapHost: This flag must be set in order to allocate pinned host memory that is accessible to the device.2. then CUDA will go back to its default behavior of trying devices sequentially from a default list containing all of the available CUDA devices in the system. If len is not 0 and device_arr is NULL or if len exceeds the number of devices in the system. otherwise CUDA will not yield while waiting for results and actively spin on the processor. • cudaDeviceScheduleYield: Instruct CUDA to yield its thread when waiting for results from the device. cudaErrorInvalidDevice.4 Device Management 4. uses a heuristic based on the number of active CUDA contexts in the process C and the number of logical processors in the system P. cudaSetValidDevices.

22 len . cudaGetDeviceProperties. cudaSetDevice. cudaSetDeviceFlags. asynchronous launches.Number of devices in specified list Returns: cudaSuccess. cudaErrorInvalidValue. cudaErrorInvalidDevice Note: Module Documentation Note that this function may also return error codes from previous. See also: cudaGetDeviceCount. cudaChooseDevice Generated for NVIDIA CUDA Library by Doxygen .

cudaStreamSynchronize. unsigned int flags) Make a compute stream wait on an event. Parameters: pStream .5. • cudaError_t cudaStreamDestroy (cudaStream_t stream) Destroys and cleans up an asynchronous stream.5 Stream Management Functions • cudaError_t cudaStreamCreate (cudaStream_t ∗pStream) Create an asynchronous stream.1 Detailed Description This section describes the stream management functions of the CUDA runtime application programming interface. asynchronous launches. 4.1 Function Documentation cudaError_t cudaStreamCreate (cudaStream_t ∗ pStream) Creates a new asynchronous stream. 4. See also: cudaStreamQuery. cudaStreamWaitEvent.2.2 4.2.5. • cudaError_t cudaStreamQuery (cudaStream_t stream) Queries an asynchronous stream for completion status.5. Generated for NVIDIA CUDA Library by Doxygen .5 Stream Management 23 4. cudaEvent_t event. • cudaError_t cudaStreamSynchronize (cudaStream_t stream) Waits for stream tasks to complete.4. cudaStreamDestroy 4.2 cudaError_t cudaStreamDestroy (cudaStream_t stream) Destroys and cleans up the asynchronous stream specified by stream.5. • cudaError_t cudaStreamWaitEvent (cudaStream_t stream. cudaErrorInvalidValue Note: Note that this function may also return error codes from previous.Pointer to new stream identifier Returns: cudaSuccess.

cudaStreamQuery. or cudaErrorNotReady if not. Parameters: stream . cudaStreamDestroy 4. cudaStreamSynchronize 4. cudaStreamWaitEvent. cudaStreamDestroy Generated for NVIDIA CUDA Library by Doxygen . cudaErrorInvalidResourceHandle Note: Note that this function may also return error codes from previous. asynchronous launches. asynchronous launches. See also: cudaStreamCreate. Parameters: stream .5. cudaStreamSynchronize. If the cudaDeviceBlockingSync flag was set for this device.Stream identifier Returns: cudaSuccess.2. cudaStreamWaitEvent.Stream identifier Returns: cudaSuccess.3 cudaError_t cudaStreamQuery (cudaStream_t stream) Returns cudaSuccess if all operations in stream have completed. cudaStreamWaitEvent. cudaStreamQuery. asynchronous launches. cudaErrorNotReady cudaErrorInvalidResourceHandle Note: Note that this function may also return error codes from previous.5.24 Parameters: stream .2. See also: cudaStreamCreate.Stream identifier Returns: cudaSuccess. cudaErrorInvalidResourceHandle Note: Module Documentation Note that this function may also return error codes from previous. the host thread will block until the stream is finished with all of its tasks. See also: cudaStreamCreate.4 cudaError_t cudaStreamSynchronize (cudaStream_t stream) Blocks until stream has completed all operations.

Event to wait on flags . This effectively creates a barrier for all future work submitted to the device on this thread. Once this call has returned. any future work submitted in any stream will wait for event to complete before beginning execution. If cudaEventRecord() has not been called on event. cudaStreamSynchronize. and so is a functional no-op. unsigned int flags) 25 Makes all future work submitted to stream wait until event reports completion before beginning execution.5.5 cudaError_t cudaStreamWaitEvent (cudaStream_t stream.Stream to wait event .Parameters for the operation (must be 0) Returns: cudaSuccess. The stream stream will wait only for the completion of the most recent host call to cudaEventRecord() on event. cudaStreamDestroy Generated for NVIDIA CUDA Library by Doxygen .2. Parameters: stream . See also: cudaStreamCreate. this call acts as if the record has already completed. This synchronization will be performed efficiently on the device.4. asynchronous launches. cudaEvent_t event. cudaStreamQuery.5 Stream Management 4. cudaErrorInvalidResourceHandle Note: Note that this function may also return error codes from previous. If stream is NULL. and the subsequent calls will not have any effect on stream. any functions (including cudaEventRecord() and cudaEventDestroy()) may be called on event again.

2. unsigned int flags) Creates an event object with the specified flags. cudaEventElapsedTime. Parameters: event .Newly created event Returns: cudaSuccess. cudaErrorInitializationError. • cudaError_t cudaEventElapsedTime (float ∗ms.6 Event Management Functions • cudaError_t cudaEventCreate (cudaEvent_t ∗event) Creates an event object. cudaEvent_t start. cudaEventCreateWithFlags. cudaStream_t stream=0) Records an event. cudaErrorInvalidValue.1 Detailed Description This section describes the event management functions of the CUDA runtime application programming interface.1 Function Documentation cudaError_t cudaEventCreate (cudaEvent_t ∗ event) Creates an event object using cudaEventDefault. • cudaError_t cudaEventRecord (cudaEvent_t event. cudaEvent_t end) Computes the elapsed time between events. • cudaError_t cudaEventCreateWithFlags (cudaEvent_t ∗event. 4. cudaEventDestroy. See also: cudaEventCreate (C++ API). • cudaError_t cudaEventDestroy (cudaEvent_t event) Destroys an event object.6. cudaEventSynchronize. cudaEventRecord.26 Module Documentation 4. cudaStreamWaitEvent Generated for NVIDIA CUDA Library by Doxygen . cudaErrorLaunchFailure. 4. • cudaError_t cudaEventSynchronize (cudaEvent_t event) Waits for an event to complete. cudaEventQuery. cudaErrorMemoryAllocation Note: Note that this function may also return error codes from previous.6.6. • cudaError_t cudaEventQuery (cudaEvent_t event) Queries an event’s status.2 4. asynchronous launches.

Newly created event flags . cudaErrorLaunchFailure Note: Note that this function may also return error codes from previous. cudaEventRecord. Valid flags include: • cudaEventDefault: Default event creation flag. cudaErrorMemoryAllocation Note: Note that this function may also return error codes from previous. cudaEventQuery. cudaEventCreateWithFlags. asynchronous launches. • cudaEventBlockingSync: Specifies that event should use blocking synchronization. cudaEventSynchronize. Parameters: event .2. cudaErrorInvalidValue. cudaErrorInitializationError.Event to destroy Returns: cudaSuccess.6. See also: cudaEventCreate (C API). asynchronous launches. cudaEventSynchronize. A host thread that uses cudaEventSynchronize() to wait on an event created with this flag will block until the event actually completes. unsigned int flags) 27 Creates an event object with the specified flags. Events created with this flag specified and the cudaEventBlockingSync flag not specified will provide the best performance when used with cudaStreamWaitEvent() and cudaEventQuery(). cudaEventElapsedTime Generated for NVIDIA CUDA Library by Doxygen .Flags for new event Returns: cudaSuccess. cudaEventDestroy. cudaEventElapsedTime. cudaErrorLaunchFailure.2.4. • cudaEventDisableTiming: Specifies that the created event does not need to record timing data. Parameters: event .6. cudaErrorInitializationError.2 cudaError_t cudaEventCreateWithFlags (cudaEvent_t ∗ event. cudaStreamWaitEvent 4.3 cudaError_t cudaEventDestroy (cudaEvent_t event) Destroys the event specified by event. See also: cudaEventCreate (C API).6 Event Management 4. cudaErrorInvalidValue.

cudaEventDestroy. cudaErrorNotReady is returned. validResourceHandle. If cudaEventRecord() has been called on both events but one or both of them has not yet been completed (that is. or if cudaEventRecord() has not been called on event. asynchronous launches. cudaErrorNotReady. as specified by the arguments to cudaEventRecord()). cudaEventSynchronize. Any number of other different stream operations could execute in between the two measured events. cudaErrorIn- Generated for NVIDIA CUDA Library by Doxygen . cudaErrorInvalidValue. cudaEventCreateWithFlags.6. cudaEventCreateWithFlags.Time between start and end in ms start . See also: cudaEventCreate (C API).6. cudaEventDestroy. cudaErrorLaunchFailure Note: Note that this function may also return error codes from previous.5 microseconds).Starting event end . cudaErrorInitializationError. validResourceHandle.2. cudaEvent_t start. the resulting time may be greater than expected (even if both used the same stream handle).28 4. If either event was last recorded in a non-NULL stream. cudaEventElapsedTime cudaErrorInvalidValue. then this function will return cudaErrorInvalidResourceHandle.5 cudaError_t cudaEventQuery (cudaEvent_t event) Query the status of all device work preceding the most recent call to cudaEventRecord() (in the appropriate compute streams. This happens because the cudaEventRecord() operation takes place asynchronously and there is no guarantee that the measured latency is actually just between the two events. cudaEventQuery() would return cudaErrorNotReady on at least one of the events). cudaEventQuery. See also: cudaEventCreate (C API). If this work has successfully been completed by the device. cudaEventRecord cudaErrorInitializationError.Ending event Returns: cudaSuccess. asynchronous launches. then cudaSuccess is returned.Event to query Returns: cudaSuccess. If cudaEventRecord() has not been called on either event. cudaErrorNotReady.4 Module Documentation cudaError_t cudaEventElapsedTime (float ∗ ms. If either event was created with the cudaEventDisableTiming flag. cudaErrorLaunchFailure Note: Note that this function may also return error codes from previous.2. If this work has not yet been completed by the device then cudaErrorNotReady is returned. cudaErrorIn- 4. cudaEventRecord. cudaEvent_t end) Computes the elapsed time between two events (in milliseconds with a resolution of around 0. then cudaErrorInvalidResourceHandle is returned. Parameters: event . cudaEventSynchronize. thus altering the timing in a significant way. Parameters: ms .

Event to record stream . cudaEventCreateWithFlags.Stream in which to record event Returns: cudaSuccess. cudaErrorInvalidValue. Parameters: event . cudaEventDestroy. cudaSuccess is returned immediately. the event is recorded after all preceding operations in stream have been completed.4. cudaEventSynchronize. cudaEventElapsedTime. cudaEventDestroy. If cudaEventRecord() has not been called on event. Since operation is asynchronous. otherwise. cudaErrorInitializationError. cudaEventCreateWithFlags. cudaErrorInvalidValue. cudaEventQuery.6. Waiting for an event that was created with the cudaEventBlockingSync flag will cause the calling CPU thread to block until the event has been completed by the device. as specified by the arguments to cudaEventRecord()). it is recorded after all preceding operations in the CUDA context have been completed.2. cudaEventElapsedTime Generated for NVIDIA CUDA Library by Doxygen .Event to wait for Returns: cudaSuccess. cudaErrorInvalidResourceHandle. then this call will overwrite any existing state in event.6 Event Management 4.7 cudaError_t cudaEventSynchronize (cudaEvent_t event) Wait until the completion of all device work preceding the most recent call to cudaEventRecord() (in the appropriate compute streams. then the CPU thread will busy-wait until the event has been completed by the device. cudaEventQuery. cudaErrorInvalidResourceHandle. Any subsequent calls which examine the status of event will only examine the completion of this most recent call to cudaEventRecord().6. cudaEventQuery() and/or cudaEventSynchronize() must be used to determine when the event has actually been recorded.2. asynchronous launches. See also: cudaEventCreate (C API). cudaErrorInitializationError.6 cudaError_t cudaEventRecord (cudaEvent_t event. cudaStream_t stream = 0) 29 Records an event. Parameters: event . If the cudaEventBlockingSync flag has not been set. See also: cudaEventCreate (C API). cudaErrorLaunchFailure Note: Note that this function may also return error codes from previous. cudaStreamWaitEvent 4. If cudaEventRecord() has previously been called on event. cudaErrorLaunchFailure Note: Note that this function may also return error codes from previous. asynchronous launches. cudaEventRecord. If stream is non-zero.

dim3 blockDim. enum cudaFuncCache cacheConfig) Sets the preferred cache configuration for a device function. • cudaError_t cudaFuncSetCacheConfig (const char ∗func. This data contains the dimension for the grid and thread blocks. cudaStream_t stream=0) Configure a device-launch. cudaStream_t stream = 0) Specifies the grid and block dimensions for the device call to be executed similar to the execution configuration syntax. Parameters: gridDim .2 4. • cudaError_t cudaSetDoubleForHost (double ∗d) Converts a double argument after execution on a device.Grid dimensions blockDim . size_t sharedMem = 0. 4.30 Module Documentation 4. dim3 blockDim. • cudaError_t cudaSetDoubleForDevice (double ∗d) Converts a double argument to be executed on a device.7. 4.1 Detailed Description This section describes the execution control functions of the CUDA runtime application programming interface.7 Execution Control Functions • cudaError_t cudaConfigureCall (dim3 gridDim.7. Each call pushes data on top of an execution stack. • cudaError_t cudaLaunch (const char ∗entry) Launches a device function.Stream identifier Returns: cudaSuccess.1 Function Documentation cudaError_t cudaConfigureCall (dim3 gridDim. const char ∗func) Find out attributes for a given function.2. cudaConfigureCall() is stack based. together with any arguments for the call. size_t sharedMem=0.7.Shared memory stream . size_t offset) Configure a device launch. • cudaError_t cudaSetupArgument (const void ∗arg. • cudaError_t cudaFuncGetAttributes (struct cudaFuncAttributes ∗attr. size_t size. cudaErrorInvalidConfiguration Generated for NVIDIA CUDA Library by Doxygen .Block dimensions sharedMem .

cudaSetupArgument (C API). The parameter specified by func must be declared as a __global__ function. If the specified function does not exist. cudaSetDoubleForDevice.2. The parameter specified by func must be declared as a __global__ function. then cudaErrorInvalidDeviceFunction is returned. Note that some function attributes such as maxThreadsPerBlock may vary based on the device that is currently being used. cudaSetDoubleForDevice. cudaSetupArgument (C API) 4. This is only a preference.Return pointer to function’s attributes func .Function to get attributes of Returns: cudaSuccess. The supported cache configurations are: • cudaFuncCachePreferNone: no preference for shared memory or L1 (default) • cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache Generated for NVIDIA CUDA Library by Doxygen . then cudaErrorInvalidDeviceFunction is returned. 4.2.2 cudaError_t cudaFuncGetAttributes (struct cudaFuncAttributes ∗ attr. cudaFuncSetCacheConfig (C API). asynchronous launches. func is a character string that specifies the fully-decorated (C++) name for a function that executes on the device. this sets through cacheConfig the preferred cache configuration for the function specified via func.7 Execution Control Note: Note that this function may also return error codes from previous. const char ∗ func) This function obtains the attributes of a function specified via func. cudaLaunch (C API). cudaFuncGetAttributes (C API). enum cudaFuncCache cacheConfig) On devices where the L1 cache and shared memory use the same hardware resources. which is a character string that specifies the fully-decorated (C++) name for a function that executes on the device. Parameters: attr . See also: cudaConfigureCall. cudaErrorInitializationError. cudaSetDoubleForHost.7. See also: 31 cudaFuncSetCacheConfig (C API). The fetched attributes are placed in attr. cudaErrorInvalidDeviceFunction Note: Note that this function may also return error codes from previous.3 cudaError_t cudaFuncSetCacheConfig (const char ∗ func. The runtime will use the requested configuration if possible.4. This setting does nothing on devices where the size of the L1 cache and shared memory are fixed. cudaLaunch (C API).7. Launching a kernel with a different preference than the most recent preference setting may insert a device-side synchronization point. but it is free to choose a different configuration if required to execute func. asynchronous launches. cudaFuncGetAttributes (C++ API). cudaSetDoubleForHost. If the specified function does not exist.

cudaErrorSharedObjectInitFailed Note: Note that this function may also return error codes from previous. cudaSetupArgument (C API). Parameters: entry . cudaSetDoubleForDevice. If the device does natively support doubles. cudaThreadGetCacheConfig. The parameter entry must be a character string naming a function that executes on the device. See also: cudaConfigureCall.7.Requested cache configuration Returns: cudaSuccess. cudaFuncGetAttributes (C API). cudaErrorLaunchFailure. cudaSetDoubleForDevice.Device char string naming device function to execute Returns: cudaSuccess.Double to convert Converts the double value of d to an internal float representation if the device does not support double arithmetic. cudaErrorLaunchTimeout. then this function does nothing. cudaThreadSetCacheConfig 4. cudaThreadGetCacheConfig.2.2. cudaErrorInvalidConfiguration.Char string naming device function cacheConfig . Generated for NVIDIA CUDA Library by Doxygen . The parameter specified by entry must be declared as a __global__ function. cudaErrorInvalidDeviceFunction Note: Module Documentation Note that this function may also return error codes from previous. See also: cudaConfigureCall. cudaErrorInvalidDeviceFunction.5 cudaError_t cudaSetDoubleForDevice (double ∗ d) Parameters: d . cudaSetupArgument (C API). cudaThreadSetCacheConfig 4. cudaLaunch() must be preceded by a call to cudaConfigureCall() since it pops the data that was pushed by cudaConfigureCall() from the execution stack. asynchronous launches. cudaLaunch (C++ API).7. cudaFuncGetAttributes (C API). cudaErrorInitializationError. cudaFuncSetCacheConfig (C API). cudaSetDoubleForHost.4 cudaError_t cudaLaunch (const char ∗ entry) Launches the function entry on the device. cudaErrorLaunchOutOfResources. cudaSetDoubleForHost.32 • cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory Parameters: func . asynchronous launches. cudaFuncSetCacheConfig (C++ API). cudaLaunch (C API).

7. See also: cudaConfigureCall.6 cudaError_t cudaSetDoubleForHost (double ∗ d) Converts the double value of d from a potentially internal float representation if the device does not support double arithmetic. cudaFuncGetAttributes (C API). cudaSetDoubleForHost. asynchronous launches. cudaFuncGetAttributes (C API). cudaFuncSetCacheConfig (C API). cudaSetupArgument (C API) 4. then this function does nothing. which starts at offset 0.7 Execution Control Returns: cudaSuccess Note: Note that this function may also return error codes from previous. cudaSetDoubleForHost. cudaLaunch (C API). cudaFuncSetCacheConfig (C API).Double to convert Returns: cudaSuccess Note: Note that this function may also return error codes from previous. cudaSetupArgument() must be preceded by a call to cudaConfigureCall(). asynchronous launches.Argument to push for a kernel launch size . asynchronous launches.7 cudaError_t cudaSetupArgument (const void ∗ arg. Parameters: arg .4. cudaSetDoubleForDevice. cudaSetupArgument (C++ API). See also: 33 cudaConfigureCall. cudaLaunch (C API). cudaSetDoubleForDevice. cudaLaunch (C API). cudaFuncGetAttributes (C API). size_t offset) Pushes size bytes of the argument pointed to by arg at offset bytes from the start of the parameter passing area. cudaFuncSetCacheConfig (C API).Size of argument offset . cudaSetupArgument (C API) 4.Offset in argument stack to push new arg Returns: cudaSuccess Note: Note that this function may also return error codes from previous. Parameters: d . Generated for NVIDIA CUDA Library by Doxygen .2.7. If the device does natively support doubles. The arguments are stored in the top of the execution stack.2. size_t size. See also: cudaConfigureCall.

• cudaError_t cudaMalloc (void ∗∗devPtr. • cudaError_t cudaMallocHost (void ∗∗ptr. • cudaError_t cudaHostGetDevicePointer (void ∗∗pDevice. struct cudaExtent extent. • cudaError_t cudaFreeHost (void ∗ptr) Frees page-locked memory. • cudaError_t cudaMallocArray (struct cudaArray ∗∗array. • cudaError_t cudaMemcpy (void ∗dst. const struct cudaChannelFormatDesc ∗desc. Generated for NVIDIA CUDA Library by Doxygen . void ∗pHost. unsigned int flags=0) Allocate an array on the device. size_t width.8 Memory Management Functions • cudaError_t cudaFree (void ∗devPtr) Frees memory on the device. • cudaError_t cudaMalloc3D (struct cudaPitchedPtr ∗pitchedDevPtr. const struct cudaChannelFormatDesc ∗desc. size_t count. or 3D memory objects on the device. • cudaError_t cudaHostAlloc (void ∗∗pHost. unsigned int flags=0) Allocate an array on the device. struct cudaExtent extent) Allocates logical 1D. • cudaError_t cudaGetSymbolAddress (void ∗∗devPtr. • cudaError_t cudaMallocPitch (void ∗∗devPtr. const char ∗symbol) Finds the size of the object associated with a CUDA symbol. size_t height) Allocates pitched memory on the device. void ∗pHost) Passes back flags used to allocate pinned host memory allocated by cudaHostAlloc(). size_t size. const void ∗src. size_t ∗pitch. size_t size) Allocate memory on the device. const char ∗symbol) Finds the address associated with a CUDA symbol. • cudaError_t cudaMalloc3DArray (struct cudaArray ∗∗array. size_t height=0. size_t size) Allocates page-locked memory on the host. • cudaError_t cudaFreeArray (struct cudaArray ∗array) Frees an array on the device. • cudaError_t cudaGetSymbolSize (size_t ∗size.34 Module Documentation 4. enum cudaMemcpyKind kind) Copies data between host and device. • cudaError_t cudaHostGetFlags (unsigned int ∗pFlags. unsigned int flags) Allocates page-locked memory on the host. unsigned int flags) Passes back device pointer of mapped host memory allocated by cudaHostAlloc(). size_t width. 2D.

size_t height. • cudaError_t cudaMemcpyFromArrayAsync (void ∗dst. enum cudaMemcpyKind kind) Copies data between host and device. const struct cudaArray ∗src. enum cudaMemcpyKind kind. size_t width. • cudaError_t cudaMemcpy2DFromArrayAsync (void ∗dst. size_t dpitch. size_t width. enum cudaMemcpyKind kind=cudaMemcpyDeviceToDevice) Copies data between host and device. size_t spitch. size_t hOffsetSrc. cudaStream_t stream=0) Copies data between host and device. size_t height. const void ∗src. • cudaError_t cudaMemcpyArrayToArray (struct cudaArray ∗dst. size_t dpitch. size_t spitch. const void ∗src. size_t width. cudaStream_t stream=0) Copies data between host and device. enum cudaMemcpyKind kind. size_t height. size_t height. cudaStream_t stream=0) Generated for NVIDIA CUDA Library by Doxygen . size_t hOffset. size_t hOffsetDst. • cudaError_t cudaMemcpy2DArrayToArray (struct cudaArray ∗dst. enum cudaMemcpyKind kind. const struct cudaArray ∗src. • cudaError_t cudaMemcpy3DAsync (const struct cudaMemcpy3DParms ∗p. size_t dpitch. size_t width. size_t height. const struct cudaArray ∗src. enum cudaMemcpyKind kind) Copies data between host and device. size_t hOffset. size_t height. size_t width. size_t wOffset. size_t wOffsetDst. enum cudaMemcpyKind kind. • cudaError_t cudaMemcpy2DAsync (void ∗dst. size_t wOffset. size_t hOffset. cudaStream_t stream=0) Copies data between host and device. cudaStream_t stream=0) Copies data between 3D objects. size_t spitch. size_t count. • cudaError_t cudaMemcpy3D (const struct cudaMemcpy3DParms ∗p) Copies data between 3D objects. const void ∗src. const struct cudaArray ∗src. size_t count. size_t wOffsetDst. size_t hOffset. size_t count. enum cudaMemcpyKind kind. size_t wOffset. • cudaError_t cudaMemcpyFromArray (void ∗dst. size_t wOffset. size_t hOffset. size_t hOffset. • cudaError_t cudaMemcpyAsync (void ∗dst. size_t wOffsetSrc. enum cudaMemcpyKind kind) Copies data between host and device. size_t height. size_t hOffsetSrc. • cudaError_t cudaMemcpy2DToArray (struct cudaArray ∗dst. cudaStream_t stream=0) Copies data between host and device. const void ∗src. size_t wOffsetSrc. size_t hOffsetDst. • cudaError_t cudaMemcpy2DFromArray (void ∗dst. size_t width. size_t wOffset. size_t width. size_t dpitch.8 Memory Management 35 • cudaError_t cudaMemcpy2D (void ∗dst. const void ∗src. enum cudaMemcpyKind kind) Copies data between host and device. const struct cudaArray ∗src. • cudaError_t cudaMemcpy2DToArrayAsync (struct cudaArray ∗dst. size_t count. enum cudaMemcpyKind kind=cudaMemcpyDeviceToDevice) Copies data between host and device.4. size_t wOffset. size_t spitch. const struct cudaArray ∗src.

size_t count. int value. cudaStream_t stream=0) Copies data from the given symbol on the device. Module Documentation • cudaError_t cudaMemcpyFromSymbol (void ∗dst. size_t offset. • cudaError_t cudaMemset (void ∗devPtr. • cudaError_t cudaMemset2D (void ∗devPtr. size_t width. • cudaError_t cudaMemGetInfo (size_t ∗free. • cudaError_t cudaMemcpyToArrayAsync (struct cudaArray ∗dst. size_t height. const void ∗src. size_t count. size_t wOffset. size_t count. enum cudaMemcpyKind kind. struct cudaExtent extent) Initializes or sets device memory to a value. int value. • cudaError_t cudaMemset3D (struct cudaPitchedPtr pitchedDevPtr. • cudaError_t cudaMemcpyToArray (struct cudaArray ∗dst. size_t count) Initializes or sets device memory to a value. • cudaError_t cudaMemcpyToSymbol (const char ∗symbol. size_t count. cudaStream_t stream=0) Initializes or sets device memory to a value. size_t pitch.36 Copies data between host and device. • struct cudaExtent make_cudaExtent (size_t w. enum cudaMemcpyKind kind=cudaMemcpyDeviceToHost) Copies data from the given symbol on the device. size_t h. size_t d) Returns a cudaExtent based on input parameters. size_t count. enum cudaMemcpyKind kind) Copies data between host and device. • cudaError_t cudaMemcpyFromSymbolAsync (void ∗dst. struct cudaExtent extent. • cudaError_t cudaMemsetAsync (void ∗devPtr. enum cudaMemcpyKind kind. size_t offset=0. int value. enum cudaMemcpyKind kind=cudaMemcpyHostToDevice) Copies data to the given symbol on the device. size_t height) Initializes or sets device memory to a value. size_t offset=0. • cudaError_t cudaMemcpyToSymbolAsync (const char ∗symbol. const void ∗src. const char ∗symbol. • cudaError_t cudaMemset3DAsync (struct cudaPitchedPtr pitchedDevPtr. const void ∗src. int value. size_t width. cudaStream_t stream=0) Copies data to the given symbol on the device. size_t count. size_t offset. size_t pitch. int value. size_t hOffset. const void ∗src. Generated for NVIDIA CUDA Library by Doxygen . cudaStream_t stream=0) Initializes or sets device memory to a value. const char ∗symbol. enum cudaMemcpyKind kind. cudaStream_t stream=0) Copies data between host and device. • cudaError_t cudaMemset2DAsync (void ∗devPtr. size_t ∗total) Gets free and total device memory. cudaStream_t stream=0) Initializes or sets device memory to a value. size_t count. int value. size_t wOffset. size_t hOffset.

2 cudaError_t cudaFreeArray (struct cudaArray ∗ array) Frees the CUDA array array.4. size_t y.2 4. which must have been returned by a previous call to cudaMalloc() or cudaMallocPitch(). cudaErrorInitializationError Note: Note that this function may also return error codes from previous.8 Memory Management 37 • struct cudaPitchedPtr make_cudaPitchedPtr (void ∗d. Parameters: devPtr . cudaHostAlloc 4. cudaErrorInitializationError Note: Note that this function may also return error codes from previous.2.8. size_t z) Returns a cudaPos based on input parameters. cudaErrorInvalidValue is returned. cudaFreeHost.Pointer to array to free Returns: cudaSuccess. 4. If cudaFreeArray(array) has already been called before. which must have been ∗ returned by a previous call to cudaMallocArray().1 Function Documentation cudaError_t cudaFree (void ∗ devPtr) Frees the memory space pointed to by devPtr. no operation is performed. 4.8. size_t ysz) Returns a cudaPitchedPtr based on input parameters. or if cudaFree(devPtr) has already been called before. cudaFreeArray. cudaMalloc3DArray. cudaErrorInvalidValue. Otherwise. Generated for NVIDIA CUDA Library by Doxygen .Device pointer to memory to free Returns: cudaSuccess. asynchronous launches. cudaMallocPitch. size_t xsz. • struct cudaPos make_cudaPos (size_t x. no operation is performed. cudaErrorInvalidDevicePointer.1 Detailed Description This section describes the memory management functions of the CUDA runtime application programming interface.8. cudaMallocArray. cudaMalloc3D. cudaMallocHost (C API). an error is returned. See also: cudaMalloc.8. If devPtr is 0. size_t p. cudaFree() returns cudaErrorInvalidDevicePointer in case of failure.2. asynchronous launches. Parameters: array . If devPtr is 0.

Parameters: ptr . cudaFree. cudaMallocArray.Global variable or string symbol to search for Returns: cudaSuccess. If there are multiple global or constant variables with the same string name (from separate files) and the lookup is done via character string.38 See also: Module Documentation cudaMalloc. See also: cudaGetSymbolAddress (C++ API) cudaGetSymbolSize (C API) Generated for NVIDIA CUDA Library by Doxygen .3 cudaError_t cudaFreeHost (void ∗ ptr) Frees the memory space pointed to by hostPtr. const char ∗ symbol) Returns in ∗devPtr the address of symbol symbol on the device. asynchronous launches. cudaFreeArray. ∗devPtr is unchanged and the error cudaErrorInvalidSymbol is returned. cudaErrorDuplicateVariableName is returned. cudaFree. symbol can either be a variable that resides in global or constant memory space.Pointer to memory to free Returns: cudaSuccess. See also: cudaMalloc. cudaMallocArray.8. cudaMallocPitch. cudaMallocPitch. cudaMallocHost (C API). Parameters: devPtr . or if symbol is not declared in the global or constant memory space. which must have been returned by a previous call to cudaMallocHost() or cudaHostAlloc().2. cudaHostAlloc 4.8. cudaMalloc3DArray. cudaMallocHost (C API). asynchronous launches. cudaErrorInvalidSymbol.2.Return device pointer associated with symbol symbol . cudaMalloc3D.4 cudaError_t cudaGetSymbolAddress (void ∗∗ devPtr. If symbol cannot be found. naming a variable that resides in global or constant memory space. cudaErrorInitializationError Note: Note that this function may also return error codes from previous. or it can be a character string. cudaFreeHost. cudaErrorDuplicateVariableName Note: Note that this function may also return error codes from previous. cudaHostAlloc 4.

Global variable or string symbol to find size of Returns: cudaSuccess. const char ∗ symbol) 39 Returns in ∗size the size of symbol symbol. unsigned int flags) Allocates size bytes of host memory that is page-locked and accessible to the device. this function is best used sparingly to allocate staging areas for data exchange between host and device. ∗size is unchanged and the error cudaErrorInvalidSymbol is returned. The driver tracks the virtual memory ranges allocated with this function and automatically accelerates calls to functions such as cudaMemcpy(). not just the one that performed the allocation. it can be read or written with much higher bandwidth than pageable memory obtained with functions such as malloc(). Since the memory can be accessed directly by the device. • cudaHostAllocMapped: Maps the allocation into the CUDA address space. cudaErrorInvalidSymbol Note: Note that this function may also return error codes from previous.2. WC memory is a good option for buffers that will be written by the CPU and read by the device via mapped pinned memory or host->device transfers.4.2. • cudaHostAllocDefault: This flag’s value is defined to be 0 and causes cudaHostAlloc() to emulate cudaMallocHost(). as follows. Generated for NVIDIA CUDA Library by Doxygen . asynchronous launches. • cudaHostAllocPortable: The memory returned by this call will be considered as pinned memory by all CUDA contexts. cudaSetDeviceFlags() must have been called with the cudaDeviceMapHost flag in order for the cudaHostAllocMapped flag to have any effect.5 cudaError_t cudaGetSymbolSize (size_t ∗ size.6 cudaError_t cudaHostAlloc (void ∗∗ pHost. or if symbol is not declared in global or constant memory space. • cudaHostAllocWriteCombined: Allocates the memory as write-combined (WC). WC memory can be transferred across the PCI Express bus more quickly on some system configurations.Size of object associated with symbol symbol . See also: cudaGetSymbolAddress (C API) cudaGetSymbolSize (C++ API) 4. Allocating excessive amounts of pinned memory may degrade system performance. As a result. or it can be a character string. All of these flags are orthogonal to one another: a developer may allocate memory that is portable. The flags parameter enables different options to be specified that affect the allocation. mapped and/or write-combined with no restrictions. If symbol cannot be found. since it reduces the amount of memory available to the system for paging.8. naming a variable that resides in global or constant memory space.8. symbol can either be a variable that resides in global or constant memory space.8 Memory Management 4. The device pointer to the memory may be obtained by calling cudaHostGetDevicePointer(). but cannot be read efficiently by most CPUs. Parameters: size . size_t size.

40 Module Documentation The cudaHostAllocMapped flag may be specified on CUDA contexts for devices that do not support mapped pinned memory. or if called on a device that does not support mapped.Returned device pointer for mapped memory pHost . The failure is deferred to cudaHostGetDevicePointer() because the memory may be mapped into other CUDA contexts via the cudaHostAllocPortable flag.Requested allocation size in bytes flags . For now. cudaMallocHost (C API). Parameters: pDevice . unsigned int flags) Passes back the device pointer corresponding to the mapped. Memory allocated by this function must be freed with cudaFreeHost(). cudaFreeHost 4. asynchronous launches.Device pointer to allocated memory size . pinned host buffer allocated by cudaHostAlloc(). Parameters: pHost .Flags for extensions (must be 0 for now) Returns: cudaSuccess. cudaHostAlloc Generated for NVIDIA CUDA Library by Doxygen . asynchronous launches.Requested host pointer mapping flags . flags provides for future releases. cudaErrorMemoryAllocation Note: Note that this function may also return error codes from previous.2. cudaErrorInvalidValue.7 cudaError_t cudaHostGetDevicePointer (void ∗∗ pDevice.8. See also: cudaSetDeviceFlags. pinned memory. void ∗ pHost.Requested properties of allocated memory Returns: cudaSuccess. See also: cudaSetDeviceFlags. cudaHostGetDevicePointer() will fail if the cudaDeviceMapHost flag was not specified before deferred context creation occurred. it must be set to 0. cudaErrorMemoryAllocation Note: Note that this function may also return error codes from previous.

10 cudaError_t cudaMalloc3D (struct cudaPitchedPtr ∗ pitchedDevPtr. Due to alignment restrictions in the hardware. cudaMalloc3D. this is especially true if the application will be performing memory copies involving 2D or 3D objects (whether linear memory or CUDA arrays). See also: cudaHostAlloc 4.Pointer to allocated device memory size . cudaHostAlloc 4. cudaFreeArray. The allocated memory is suitably aligned for any kind of variable. struct cudaExtent extent) Allocates at least width ∗ height ∗ depth bytes of linear memory on the device and returns a cudaPitchedPtr in which ptr is a pointer to the allocated memory. cudaFree. cudaErrorMemoryAllocation See also: cudaMallocPitch. The function may pad the allocation to ensure hardware alignment requirements are met. cudaMallocArray. cudaMalloc() returns cudaErrorMemoryAllocation in case of failure. which are equivalent to the width and height extent parameters provided by the programmer during allocation. cudaMalloc3DArray. void ∗ pHost) 41 cudaHostGetFlags() will fail if the input pointer does not reside in an address range allocated by cudaHostAlloc().2. cudaErrorInvalidValue Note: Note that this function may also return error codes from previous. cudaMallocHost (C API).2.8.4. Parameters: devPtr .8. the logical width and height of the allocation. The returned cudaPitchedPtr contains additional fields xsize and ysize. it is highly recommended that programmers perform allocations using cudaMalloc3D() or cudaMallocPitch().8. The memory is not cleared. Generated for NVIDIA CUDA Library by Doxygen .Host pointer Returns: cudaSuccess. For allocations of 2D and 3D objects. size_t size) Allocates size bytes of linear memory on the device and returns in ∗devPtr a pointer to the allocated memory.8 Memory Management 4.2. Parameters: pFlags .Requested allocation size in bytes Returns: cudaSuccess. The pitch returned in the pitch field of pitchedDevPtr is the width in bytes of the allocation. asynchronous launches.9 cudaError_t cudaMalloc (void ∗∗ devPtr. cudaFreeHost.Returned flags word pHost .8 cudaError_t cudaHostGetFlags (unsigned int ∗ pFlags.

2048). where cudaChannelFormatKind is one of cudaChannelFormatKindSigned. flags provides for future releases. Note: Due to the differing extent limits. 32768).42 Parameters: pitchedDevPtr . Parameters: array . (1. 0. struct cudaExtent extent. cudaMalloc3DArray() is able to allocate 1D. cudaMallocArray. 2D. For 1D arrays valid extent ranges are {(1. make_cudaPitchedPtr. cudaErrorMemoryAllocation Note: Module Documentation Note that this function may also return error codes from previous. 8192).8. }. • A 3D array is allocated if all three extents are non-zero.11 cudaError_t cudaMalloc3DArray (struct cudaArray ∗∗ array. cudaMemcpy3D. (1. cudaFreeArray. const struct cudaChannelFormatDesc ∗ desc.Pointer to allocated pitched device memory extent . unsigned int flags = 0) Allocates a CUDA array according to the cudaChannelFormatDesc structure desc and returns a handle to the new CUDA array in ∗array. cudaMallocHost (C API). asynchronous launches. For 3D arrays valid extent ranges are {(1. y. The cudaChannelFormatDesc is defined as: struct cudaChannelFormatDesc { int x. For 2D arrays valid extent ranges are {(1. cudaChannelFormatKindUnsigned. cudaFreeHost. or 3D arrays.Pointer to allocated array in device memory Generated for NVIDIA CUDA Library by Doxygen . make_cudaExtent 4. z. For instance. it may be advantageous to use a degenerate array (with unused dimensions set to one) of higher dimensionality. 2048). 2048)}. • A 2D array is allocated if only the depth extent is zero. 0}. (1. cudaMemset3D. For now. or cudaChannelFormatKindFloat. • A 1D array is allocated if the height and depth extent are both zero. cudaHostAlloc.2. w. 0}. cudaMalloc3DArray. See also: cudaMallocPitch.Requested allocation size (width field in bytes) Returns: cudaSuccess. 65536). enum cudaChannelFormatKind f. a degenerate 2D array allows for significantly more linear storage than a 1D array. cudaFree. it must be set to 0.

Requested allocation size (width field in elements) flags .Pointer to allocated array in device memory desc .Requested array allocation height flags . make_cudaExtent 4. y. unsigned int flags = 0) Allocates a CUDA array according to the cudaChannelFormatDesc structure desc and returns a handle to the new CUDA array in ∗array.Requested channel format extent . cudaFreeArray. asynchronous launches.12 cudaError_t cudaMallocArray (struct cudaArray ∗∗ array. cudaHostAlloc. cudaMalloc3DArray. as follows. The cudaChannelFormatDesc is defined as: struct cudaChannelFormatDesc { int x.8.4. cudaErrorMemoryAllocation Note: Note that this function may also return error codes from previous. cudaFree. where cudaChannelFormatKind is one of cudaChannelFormatKindSigned. cudaMallocPitch. asynchronous launches. cudaMalloc. }. See also: cudaMalloc. cudaFreeHost. cudaHostAlloc Generated for NVIDIA CUDA Library by Doxygen .Requested array allocation width height . z. cudaFree. or cudaChannelFormatKindFloat.8 Memory Management desc . cudaMallocHost (C API). cudaErrorMemoryAllocation Note: Note that this function may also return error codes from previous. cudaChannelFormatKindUnsigned. cudaMallocPitch. cudaMallocHost (C API). See also: 43 cudaMalloc3D. enum cudaChannelFormatKind f. cudaMalloc3D. The flags parameter enables different options to be specified that affect the allocation.2. w. size_t height = 0.Requested properties of allocated array Returns: cudaSuccess. const struct cudaChannelFormatDesc ∗ desc. cudaFreeArray. • cudaArrayDefault: This flag’s value is defined to be 0 and provides default array allocation • cudaArraySurfaceLoadStore: Allocates an array that can be read from or written to using a surface reference Parameters: array .Requested channel format width . cudaFreeHost.Flags for extensions (must be 0 for now) Returns: cudaSuccess. size_t width.

8. used to compute addresses within the 2D array. cudaMallocPitch.13 cudaError_t cudaMallocHost (void ∗∗ ptr. cudaHostAlloc 4. Allocating excessive amounts of memory with cudaMallocHost() may degrade system performance. Parameters: devPtr . it can be read or written with much higher bandwidth than pageable memory obtained with functions such as malloc(). it is recommended that programmers consider performing pitch allocations using cudaMallocPitch(). The function may pad the allocation to ensure that corresponding pointers in any given row will continue to meet the alignment requirements for coalescing as the address is updated from row to row. cudaMallocArray. cudaMalloc3DArray. The intended usage of pitch is as a separate parameter of the allocation. cudaFreeHost. cudaMalloc3D.Requested pitched allocation height Returns: cudaSuccess. cudaMallocHost (C++ API). Parameters: ptr .2. this function is best used sparingly to allocate staging areas for data exchange between host and device. cudaErrorMemoryAllocation Generated for NVIDIA CUDA Library by Doxygen .Pointer to allocated pitched device memory pitch . the address is computed as: T* pElement = (T*)((char*)BaseAddress + Row * pitch) + Column. The pitch returned in ∗pitch by cudaMallocPitch() is the width in bytes of the allocation. See also: cudaMalloc. this is especially true if the application will be performing 2D memory copies between different regions of device memory (whether linear memory or CUDA arrays). As a result.Requested allocation size in bytes Returns: cudaSuccess. Given the row and column of an array element of type T.2. Due to pitch alignment restrictions in the hardware. The driver tracks the virtual memory ranges allocated with this function and automatically accelerates calls to functions such as cudaMemcpy∗().14 cudaError_t cudaMallocPitch (void ∗∗ devPtr. cudaFree.44 4.Requested pitched allocation width (in bytes) height . size_t width. size_t height) Allocates at least width (in bytes) ∗ height bytes of linear memory on the device and returns in ∗devPtr a pointer to the allocated memory. For allocations of 2D arrays.8. cudaFreeArray.Pointer to allocated host memory size . Since the memory can be accessed directly by the device. size_t ∗ pitch. cudaErrorMemoryAllocation Note: Note that this function may also return error codes from previous. since it reduces the amount of memory available to the system for paging. size_t size) Module Documentation Allocates size bytes of host memory that is page-locked and accessible to the device. asynchronous launches.Pitch for allocation width . cudaHostAlloc.

cudaMemcpyDeviceToHost. Calling cudaMemcpy() with dst and src pointers that do not match the direction of the copy results in an undefined behavior. See also: 45 cudaMalloc.15 cudaError_t cudaMemcpy (void ∗ dst. size_t width. The memory areas may not overlap.Destination memory address Generated for NVIDIA CUDA Library by Doxygen .Source memory address count . cudaMemcpyArrayToArray. cudaFree. cudaMemcpyFromArrayAsync. cudaErrorInvalidValue. or cudaMemcpyDeviceToDevice. cudaMemcpy2DFromArrayAsync.Size in bytes to copy kind .Type of transfer Returns: cudaSuccess.4. cudaMemcpyToArrayAsync. cudaMemcpyToSymbolAsync. Parameters: dst . cudaMemcpyHostToDevice. cudaHostAlloc 4. cudaMemcpyToSymbol. cudaMalloc3DArray. size_t dpitch. cudaMallocArray.Destination memory address src . cudaMemcpyFromArray. The memory areas may not overlap. cudaMemcpyAsync.2. Calling cudaMemcpy2D() with dst and src pointers that do not match the direction of the copy results in an undefined behavior.8. cudaMemcpy2DAsync. asynchronous launches. or cudaMemcpyDeviceToDevice. cudaMemcpy2DToArray. where kind is one of cudaMemcpyHostToHost. cudaFreeArray. asynchronous launches. cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous. and specifies the direction of the copy. Parameters: dst . cudaMallocHost (C API). const void ∗ src. cudaErrorInvalidDevicePointer. enum cudaMemcpyKind kind) Copies a matrix (height rows of width bytes each) from the memory area pointed to by src to the memory area pointed to by dst. cudaMemcpy2DFromArray. size_t spitch. size_t count. cudaMemcpyDeviceToHost.2. cudaMalloc3D. dpitch and spitch are the widths in memory in bytes of the 2D arrays pointed to by dst and src. and specifies the direction of the copy. cudaMemcpyHostToDevice. cudaFreeHost. const void ∗ src. width must not exceed either dpitch or spitch. cudaMemcpyToArray. cudaMemcpyFromSymbolAsync 4. size_t height. cudaMemcpy2DArrayToArray.16 cudaError_t cudaMemcpy2D (void ∗ dst. where kind is one of cudaMemcpyHostToHost. including any padding added to the end of each row. cudaMemcpyFromSymbol. enum cudaMemcpyKind kind) Copies count bytes from the memory area pointed to by src to the memory area pointed to by dst.8. See also: cudaMemcpy2D. cudaMemcpy2DToArrayAsync.8 Memory Management Note: Note that this function may also return error codes from previous. cudaMemcpy2D() returns an error if dpitch or spitch exceeds the maximum allowed.

const struct cudaArray ∗ src.Source memory address wOffsetSrc . cudaErrorInvalidPitchValue. cudaMemcpyFromSymbol. cudaMemcpyDeviceToHost. cudaMemcpyArrayToArray. size_t width. cudaMemcpy2DFromArray. cudaMemcpyFromSymbolAsync 4. cudaMemcpy2DArrayToArray.17 cudaError_t cudaMemcpy2DArrayToArray (struct cudaArray ∗ dst.2.Height of matrix transfer (rows) kind . cudaMemcpyToSymbol.8.Type of transfer Returns: cudaSuccess.Width of matrix transfer (columns in bytes) height . wOffsetSrc + width must not exceed the width of the CUDA array src.Pitch of destination memory src .Source starting X offset hOffsetSrc . cudaMemcpyToArrayAsync. cudaErrorInvalidDevicePointer. cudaMemcpy2DFromArrayAsync.Destination starting Y offset src . cudaErrorInvalidMemcpyDirection Generated for NVIDIA CUDA Library by Doxygen .Pitch of source memory width . hOffsetDst).Destination memory address wOffsetDst . and specifies the direction of the copy. size_t wOffsetSrc.Type of transfer Returns: Module Documentation cudaSuccess. asynchronous launches. cudaMemcpyFromArrayAsync.Width of matrix transfer (columns in bytes) height . size_t hOffsetDst. cudaMemcpy2DAsync. cudaMemcpy2DToArray. or cudaMemcpyDeviceToDevice. cudaErrorInvalidValue. See also: cudaMemcpy. cudaMemcpyToSymbolAsync.Source memory address spitch . cudaMemcpy2DToArrayAsync. cudaMemcpyAsync. cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous. cudaMemcpyFromArray.Height of matrix transfer (rows) kind . size_t height. size_t hOffsetSrc. enum cudaMemcpyKind kind = cudaMemcpyDeviceToDevice) Copies a matrix (height rows of width bytes each) from the CUDA array srcArray starting at the upper left corner (wOffsetSrc. wOffsetDst + width must not exceed the width of the CUDA array dst. hOffsetSrc) to the CUDA array dst starting at the upper left corner (wOffsetDst. Parameters: dst .Source starting Y offset width .46 dpitch . where kind is one of cudaMemcpyHostToHost. cudaErrorInvalidValue. cudaMemcpyToArray. size_t wOffsetDst. cudaMemcpyHostToDevice.Destination starting X offset hOffsetDst .

cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous. enum cudaMemcpyKind kind. cudaMemcpy2DFromArray.Destination memory address dpitch . cudaMemcpyAsync. cudaMemcpyFromArrayAsync. so the call may return before the copy is complete. dpitch and spitch are the widths in memory in bytes of the 2D arrays pointed to by dst and src. cudaMemcpyDeviceToHost. cudaMemcpyToSymbol. size_t width. If kind is cudaMemcpyHostToDevice or cudaMemcpyDeviceToHost and stream is non-zero. cudaMemcpyFromArrayAsync. asynchronous launches. cudaMemcpyToArrayAsync.4.Source memory address spitch . cudaMemcpy2DAsync. size_t dpitch. cudaMemcpyAsync. cudaMemcpyFromSymbolAsync Generated for NVIDIA CUDA Library by Doxygen . cudaMemcpyFromArray. cudaMemcpy2DArrayToArray. See also: 47 cudaMemcpy. cudaMemcpyFromArray. The copy can optionally be associated to a stream by passing a non-zero stream argument. cudaMemcpy2DToArrayAsync. and specifies the direction of the copy. cudaMemcpyHostToDevice.18 cudaError_t cudaMemcpy2DAsync (void ∗ dst. cudaMemcpy2DAsync() is asynchronous with respect to the host. cudaMemcpy2D. See also: cudaMemcpy. cudaMemcpy2DFromArrayAsync. cudaMemcpy2DToArray. cudaMemcpy2DAsync() returns an error if dpitch or spitch is greater than the maximum allowed.Stream identifier Returns: cudaSuccess. Parameters: dst . cudaMemcpyFromSymbol.8. cudaErrorInvalidDevicePointer. cudaMemcpy2DFromArray. The memory areas may not overlap. cudaMemcpyToSymbolAsync. size_t spitch. cudaMemcpyToArray. the copy may overlap with operations in other streams. It only works on page-locked host memory and returns an error if a pointer to pageable memory is passed as input. cudaMemcpyToArray. cudaMemcpyArrayToArray. Calling cudaMemcpy2DAsync() with dst and src pointers that do not match the direction of the copy results in an undefined behavior.Height of matrix transfer (rows) kind . where kind is one of cudaMemcpyHostToHost. cudaMemcpyToSymbolAsync. cudaMemcpyToSymbol. or cudaMemcpyDeviceToDevice.Width of matrix transfer (columns in bytes) height .Pitch of destination memory src . cudaMemcpy2DToArray. width must not exceed either dpitch or spitch. cudaMemcpyToArrayAsync.8 Memory Management Note: Note that this function may also return error codes from previous. including any padding added to the end of each row.Type of transfer stream . cudaMemcpy2DToArrayAsync. cudaErrorInvalidValue. cudaStream_t stream = 0) Copies a matrix (height rows of width bytes each) from the memory area pointed to by src to the memory area pointed to by dst.Pitch of source memory width . cudaMemcpy2D. cudaMemcpyFromSymbol. cudaMemcpyArrayToArray. cudaErrorInvalidPitchValue. size_t height. cudaMemcpyFromSymbolAsync 4. const void ∗ src. asynchronous launches. cudaMemcpy2DFromArrayAsync.2.

cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous.20 cudaError_t cudaMemcpy2DFromArrayAsync (void ∗ dst. cudaMemcpyToSymbol. size_t wOffset. width must not exceed dpitch. wOffset + width must not exceed the width of the CUDA array src.Height of matrix transfer (rows) kind . See also: cudaMemcpy. cudaMemcpy2DToArrayAsync.Source starting Y offset width .2.2. cudaMemcpyToSymbolAsync. cudaMemcpy2DAsync. cudaMemcpyFromArrayAsync. or cudaMemcpyDeviceToDevice. Parameters: dst . the copy may overlap with operations in other streams. cudaMemcpyDeviceToHost. enum cudaMemcpyKind kind. so the call may return before the copy is complete.48 4. and specifies the direction of the copy. and specifies the direction of the copy. cudaMemcpyDeviceToHost. cudaMemcpyFromSymbolAsync 4. including any padding added to the end of each row.Pitch of destination memory src . including any padding added to the end of each row. cudaMemcpy2D.Width of matrix transfer (columns in bytes) height . cudaStream_t stream = 0) Copies a matrix (height rows of width bytes each) from the CUDA array srcArray starting at the upper left corner (wOffset. dpitch is the width in memory in bytes of the 2D array pointed to by dst. size_t width. cudaMemcpyArrayToArray.Type of transfer Returns: cudaSuccess. cudaMemcpy2DArrayToArray.Source memory address wOffset . size_t dpitch. asynchronous launches. cudaMemcpyFromArray. cudaErrorInvalidPitchValue. size_t hOffset. cudaMemcpy2DFromArrayAsync() returns an error if dpitch exceeds the maximum allowed. cudaMemcpyHostToDevice. size_t width.Source starting X offset hOffset . or cudaMemcpyDeviceToDevice. cudaErrorInvalidDevicePointer. cudaErrorInvalidValue. size_t dpitch.Destination memory address dpitch . where kind is one of cudaMemcpyHostToHost. It only works on page-locked host memory and returns an error if a pointer to pageable memory is passed as input. size_t wOffset.19 Module Documentation cudaError_t cudaMemcpy2DFromArray (void ∗ dst. cudaMemcpyToArray. const struct cudaArray ∗ src. cudaMemcpyToArrayAsync. hOffset) to the memory area pointed to by dst. If kind is cudaMemcpyHostToDevice or cudaMemcpyDeviceToHost and stream is non-zero. width must not exceed dpitch. cudaMemcpyAsync. dpitch is the width in memory in bytes of the 2D array pointed to by dst.8. size_t hOffset. cudaMemcpy2DFromArrayAsync. where kind is one of cudaMemcpyHostToHost. cudaMemcpyFromSymbol. size_t height. const struct cudaArray ∗ src. hOffset) to the memory area pointed to by dst. size_t height. cudaMemcpy2DToArray.8. Generated for NVIDIA CUDA Library by Doxygen . enum cudaMemcpyKind kind) Copies a matrix (height rows of width bytes each) from the CUDA array srcArray starting at the upper left corner (wOffset. cudaMemcpy2DFromArray() returns an error if dpitch exceeds the maximum allowed. cudaMemcpyHostToDevice. cudaMemcpy2DFromArrayAsync() is asynchronous with respect to the host. The copy can optionally be associated to a stream by passing a non-zero stream argument. wOffset + width must not exceed the width of the CUDA array src.

Destination memory address wOffset . cudaMemcpyToArrayAsync. including any padding added to the end of each row. cudaMemcpyFromSymbol. hOffset) where kind is one of cudaMemcpyHostToHost.Width of matrix transfer (columns in bytes) height . cudaMemcpy2DToArray. cudaMemcpyAsync. cudaMemcpyDeviceToHost. cudaMemcpyToSymbolAsync.Source memory address wOffset .Source memory address spitch .Type of transfer stream .21 cudaError_t cudaMemcpy2DToArray (struct cudaArray ∗ dst. and specifies the direction of the copy. cudaMemcpyToSymbol. cudaErrorInvalidValue.Destination memory address dpitch .4. Parameters: dst . size_t hOffset. cudaMemcpyFromArray.8 Memory Management Parameters: dst .Destination starting X offset hOffset .8. cudaMemcpyToArray.Type of transfer Generated for NVIDIA CUDA Library by Doxygen .Destination starting Y offset src . cudaMemcpy2DToArrayAsync. width must not exceed spitch. cudaErrorInvalidDevicePointer. cudaMemcpyArrayToArray. enum cudaMemcpyKind kind) Copies a matrix (height rows of width bytes each) from the memory area pointed to by src to the CUDA array dst starting at the upper left corner (wOffset. cudaMemcpy2D. size_t wOffset. cudaMemcpyFromArrayAsync. cudaMemcpyHostToDevice. cudaMemcpy2DArrayToArray.Height of matrix transfer (rows) kind . wOffset + width must not exceed the width of the CUDA array dst. cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous. or cudaMemcpyDeviceToDevice. See also: cudaMemcpy. cudaMemcpy2DAsync. spitch is the width in memory in bytes of the 2D array pointed to by src. size_t width. cudaErrorInvalidPitchValue.Stream identifier Returns: 49 cudaSuccess.Source starting X offset hOffset .Pitch of destination memory src . size_t spitch.Source starting Y offset width . cudaMemcpy2DToArray() returns an error if spitch exceeds the maximum allowed. asynchronous launches. cudaMemcpyFromSymbolAsync 4.Pitch of source memory width .Width of matrix transfer (columns in bytes) height .2.Height of matrix transfer (rows) kind . size_t height. cudaMemcpy2DFromArray. const void ∗ src.

cudaStream_t stream = 0) Copies a matrix (height rows of width bytes each) from the memory area pointed to by src to the CUDA array dst starting at the upper left corner (wOffset. It only works on page-locked host memory and returns an error if a pointer to pageable memory is passed as input. See also: cudaMemcpy.Height of matrix transfer (rows) kind . cudaErrorInvalidValue.8. cudaMemcpyToArrayAsync. If kind is cudaMemcpyHostToDevice or cudaMemcpyDeviceToHost and stream is non-zero. cudaErrorInvalidPitchValue. cudaMemcpyFromSymbolAsync 4. cudaMemcpyHostToDevice. cudaMemcpyFromArray. cudaMemcpy2DFromArray.22 cudaError_t cudaMemcpy2DToArrayAsync (struct cudaArray ∗ dst. const void ∗ src. or cudaMemcpyDeviceToDevice. hOffset) where kind is one of cudaMemcpyHostToHost. spitch is the width in memory in bytes of the 2D array pointed to by src. and specifies the direction of the copy. size_t spitch.Stream identifier Returns: cudaSuccess.Source memory address spitch . cudaErrorInvalidDevicePointer. size_t width. cudaMemcpyToArray.Destination memory address wOffset . cudaMemcpy2D.Type of transfer stream . Generated for NVIDIA CUDA Library by Doxygen . size_t hOffset. wOffset + width must not exceed the width of the CUDA array dst.Width of matrix transfer (columns in bytes) height . cudaMemcpy2DToArrayAsync. size_t height. including any padding added to the end of each row. cudaMemcpyDeviceToHost. enum cudaMemcpyKind kind. cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous. cudaErrorInvalidValue.2. the copy may overlap with operations in other streams. cudaMemcpyArrayToArray. cudaMemcpy2DArrayToArray. cudaMemcpy2DToArrayAsync() returns an error if spitch exceeds the maximum allowed. cudaMemcpyToSymbolAsync. cudaMemcpy2DAsync. size_t wOffset. The copy can optionally be associated to a stream by passing a non-zero stream argument. cudaErrorInvalidPitchValue. width must not exceed spitch. asynchronous launches.50 Returns: Module Documentation cudaSuccess. cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous. so the call may return before the copy is complete.Destination starting Y offset src . cudaMemcpyFromArrayAsync. cudaMemcpyToSymbol. Parameters: dst . cudaMemcpy2DFromArrayAsync. cudaMemcpyAsync.Pitch of source memory width . cudaMemcpyFromSymbol.Destination starting X offset hOffset . cudaErrorInvalidDevicePointer. cudaMemcpy2DToArrayAsync() is asynchronous with respect to the host. asynchronous launches.

The source and destination objects may be in either host memory. cudaMemcpyToSymbolAsync. The extent field defines the dimensions of the transferred area in elements. size_t depth. cudaMemcpy2DArrayToArray.4. cudaMemcpyToArrayAsync. cudaMemcpyToArray. cudaMemcpyFromArray. struct cudaMemcpy3DParms { struct cudaArray *srcArray. struct cudaExtent make_cudaExtent(size_t w. If a CUDA array is participating in the copy. struct cudaPos { size_t x.2. The kind field defines the direction of the copy. the extent is defined in terms of that array’s elements. struct cudaPitchedPtr srcPtr. enum cudaMemcpyKind kind. cudaMemcpyArrayToArray. If the source and destination are both arrays. size_t height. }. size_t y. size_t d). struct cudaPitchedPtr dstPtr. cudaMemcpyHostToDevice. size_t z). If overlapping source and destination objects are specified. cudaMemcpyFromArrayAsync. cudaMemcpy3D() copies data betwen two 3D objects. }. If no CUDA array is participating in the copy then the extents are defined in elements of unsigned char. struct cudaPos srcPos. Passing more than one non-zero source or destination will cause cudaMemcpy3D() to return an error. cudaMemcpyDeviceToHost. cudaMemcpyAsync. extent. device memory.8 Memory Management See also: 51 cudaMemcpy. undefined behavior will result. The struct passed to cudaMemcpy3D() must specify one of srcArray or srcPtr and one of dstArray or dstPtr. struct cudaArray *dstArray. cudaMemcpy2DToArray. size_t h. size_t y.23 cudaError_t cudaMemcpy3D (const struct cudaMemcpy3DParms ∗ p) struct cudaExtent { size_t width. or a CUDA array. struct cudaPos make_cudaPos(size_t x. destination. cudaMemcpyToSymbol. Generated for NVIDIA CUDA Library by Doxygen . The source. The srcPos and dstPos fields are optional offsets into the source and destination objects and are defined in units of each object’s elements. struct cudaPos dstPos. }. cudaMemcpyFromSymbol. positions must be in the range [0. cudaMemcpy2DFromArrayAsync. and kind of copy performed is specified by the cudaMemcpy3DParms struct which should be initialized to zero before use: cudaMemcpy3DParms myParms = {0}. 2048) for any dimension. or cudaMemcpyDeviceToDevice. It must be one of cudaMemcpyHostToHost. The source and destination object may not overlap. The element for a host or device pointer is assumed to be unsigned char. cudaMemcpy3D() will return an error if they do not have the same element size. cudaMemcpy2DFromArray. cudaMemcpyFromSymbolAsync 4. struct cudaExtent extent. cudaMemcpy2DAsync. cudaMemcpy2D.8. size_t z. For CUDA arrays.

struct cudaExtent make_cudaExtent(size_t w. cudaErrorInvalidValue. struct cudaMemcpy3DParms { struct cudaArray *srcArray. cudaMemcpy2DToArrayAsync. struct cudaExtent extent. cudaMemcpy2DFromArray. size_t y. cudaMemcpy2DToArray. cudaMemcpyAsync. }. struct cudaPitchedPtr dstPtr. struct cudaPos srcPos. struct cudaPos dstPos. or a CUDA array. cudaMemcpy2DArrayToArray. size_t y.3D memory copy parameters Returns: cudaSuccess. cudaMemcpyFromSymbol. See also: cudaMalloc3D. The source and destination objects may be in either host memory. struct cudaPitchedPtr srcPtr. size_t z. enum cudaMemcpyKind kind. cudaMemcpyToArrayAsync. cudaMemcpyToArray. cudaMemcpy2DFromArrayAsync. cudaMemset3D. size_t depth. The pitch of a cudaPitchedPtr allocated with cudaMalloc3D() will always be valid. cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous. cudaMemcpy3D() returns an error if the pitch of srcPtr or dstPtr exceeds the maximum allowed.8. cudaMemcpyFromSymbolAsync. The source. cudaMemcpyFromArray. asynchronous launches. Parameters: p . struct cudaArray *dstArray. destination. cudaMemcpyArrayToArray. size_t d). device memory. size_t h. struct cudaPos { size_t x.2. cudaMalloc3DArray. size_t z). size_t height. cudaErrorInvalidDevicePointer. cudaErrorInvalidPitchValue. cudaMemcpyToSymbol.24 cudaError_t cudaMemcpy3DAsync (const struct cudaMemcpy3DParms ∗ p. cudaStream_t stream = 0) struct cudaExtent { size_t width. cudaMemcpyToSymbolAsync. }. struct cudaPos make_cudaPos(size_t x.52 Module Documentation The source object must lie entirely within the region defined by srcPos and extent. The destination object must lie entirely within the region defined by dstPos and extent. cudaMemcpyFromArrayAsync. cudaMemcpy. cudaMemcpy3DAsync() copies data betwen two 3D objects. and kind of copy performed is specified by the cudaMemcpy3DParms struct which should be initialized to zero before use: Generated for NVIDIA CUDA Library by Doxygen . make_cudaExtent. }. cudaMemcpy2DAsync. extent. make_cudaPos 4. cudaMemcpy2D. cudaMemcpy3DAsync.

make_cudaExtent. make_cudaPos Generated for NVIDIA CUDA Library by Doxygen . cudaMemcpy. For CUDA arrays. cudaMemcpy3DAsync() returns an error if the pitch of srcPtr or dstPtr exceeds the maximum allowed. undefined behavior will result. cudaMemcpyHostToDevice. cudaMemcpyToArrayAsync. The pitch of a cudaPitchedPtr allocated with cudaMalloc3D() will always be valid.4. cudaMemcpyAsync. It only works on page-locked host memory and returns an error if a pointer to pageable memory is passed as input. cudaMemcpy3D. The extent field defines the dimensions of the transferred area in elements. cudaMemcpy2D. The destination object must lie entirely within the region defined by dstPos and extent. cudaMemcpy2DArrayToArray. The source and destination object may not overlap. cudaMemcpy2DAsync. cudaMemcpyToSymbol. so the call may return before the copy is complete. If no CUDA array is participating in the copy then the extents are defined in elements of unsigned char. The source object must lie entirely within the region defined by srcPos and extent. Passing more than one non-zero source or destination will cause cudaMemcpy3DAsync() to return an error. The element for a host or device pointer is assumed to be unsigned char. cudaMemcpy2DToArray. cudaMemcpy2DFromArray. cudaMemcpy2DFromArrayAsync. cudaErrorInvalidDevicePointer.3D memory copy parameters stream . cudaMemcpyToArray. If the source and destination are both arrays. cudaMemcpy3DAsync() is asynchronous with respect to the host.8 Memory Management cudaMemcpy3DParms myParms = {0}. cudaMemcpyDeviceToHost. the extent is defined in terms of that array’s elements. The srcPos and dstPos fields are optional offsets into the source and destination objects and are defined in units of each object’s elements. The copy can optionally be associated to a stream by passing a non-zero stream argument.Stream identifier Returns: cudaSuccess. If overlapping source and destination objects are specified. Parameters: p . If kind is cudaMemcpyHostToDevice or cudaMemcpyDeviceToHost and stream is non-zero. cudaMemcpyFromSymbolAsync. the copy may overlap with operations in other streams. cudaErrorInvalidPitchValue. cudaMemcpyArrayToArray. 2048) for any dimension. positions must be in the range [0. cudaMemcpyToSymbolAsync. cudaErrorInvalidValue. It must be one of cudaMemcpyHostToHost. cudaMemset3D. 53 The struct passed to cudaMemcpy3DAsync() must specify one of srcArray or srcPtr and one of dstArray or dstPtr. cudaMemcpyFromArray. cudaMemcpy3DAsync() will return an error if they do not have the same element size. The kind field defines the direction of the copy. cudaMemcpyFromArrayAsync. If a CUDA array is participating in the copy. cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous. See also: cudaMalloc3D. cudaMemcpy2DToArrayAsync. cudaMemcpyFromSymbol. or cudaMemcpyDeviceToDevice. cudaMalloc3DArray. asynchronous launches.

8. cudaMemcpy2DFromArrayAsync. cudaMemcpyToSymbolAsync.2. size_t hOffsetDst. cudaMemcpy2DToArrayAsync.2. The copy can optionally be associated to a stream by passing a non-zero stream argument.8.Destination starting X offset hOffsetDst . cudaMemcpyFromSymbol. enum cudaMemcpyKind kind = cudaMemcpyDeviceToDevice) Copies count bytes from the CUDA array src starting at the upper left corner (wOffsetSrc.25 Module Documentation cudaError_t cudaMemcpyArrayToArray (struct cudaArray ∗ dst. Calling cudaMemcpyAsync() with dst and src pointers that do not match the direction of the copy results in an undefined behavior.54 4. and specifies the direction of the copy. cudaMemcpyHostToDevice. size_t hOffsetSrc. size_t wOffsetDst.Type of transfer Returns: cudaSuccess. The memory areas may not overlap. cudaMemcpyAsync. cudaStream_t stream = 0) Copies count bytes from the memory area pointed to by src to the memory area pointed to by dst. and specifies the direction of the copy. hOffsetDst) where kind is one of cudaMemcpyHostToHost. cudaMemcpyFromSymbolAsync 4. cudaMemcpy2DArrayToArray. cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous.Source starting X offset hOffsetSrc .Destination memory address Generated for NVIDIA CUDA Library by Doxygen . cudaMemcpyDeviceToHost. or cudaMemcpyDeviceToDevice. cudaMemcpyToArrayAsync. cudaMemcpyDeviceToHost. cudaMemcpyAsync() is asynchronous with respect to the host. cudaMemcpyFromArray. cudaMemcpyFromArrayAsync.Size in bytes to copy kind . where kind is one of cudaMemcpyHostToHost.Destination starting Y offset src . cudaMemcpy2D. hOffsetSrc) to the CUDA array dst starting at the upper left corner (wOffsetDst. cudaMemcpyToArray. const struct cudaArray ∗ src. size_t count. size_t count. the copy may overlap with operations in other streams. or cudaMemcpyDeviceToDevice. enum cudaMemcpyKind kind. If kind is cudaMemcpyHostToDevice or cudaMemcpyDeviceToHost and the stream is non-zero. cudaErrorInvalidValue. cudaMemcpyHostToDevice.26 cudaError_t cudaMemcpyAsync (void ∗ dst.Source starting Y offset count . Parameters: dst . See also: cudaMemcpy. size_t wOffsetSrc. const void ∗ src.Destination memory address wOffsetDst .Source memory address wOffsetSrc . cudaMemcpy2DToArray. It only works on page-locked host memory and returns an error if a pointer to pageable memory is passed as input. cudaMemcpy2DAsync. cudaMemcpyToSymbol. cudaMemcpy2DFromArray. so the call may return before the copy is complete. Parameters: dst . asynchronous launches.

8. cudaMemcpy2DFromArray. cudaMemcpyArrayToArray. See also: 55 cudaMemcpy. const struct cudaArray ∗ src. size_t hOffset. cudaMemcpy2DFromArrayAsync.Stream identifier Returns: cudaSuccess.Size in bytes to copy kind . cudaMemcpy2DToArray. cudaMemcpyToArrayAsync. See also: cudaMemcpy.Source memory address count . cudaMemcpy2DArrayToArray. cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous. cudaMemcpyHostToDevice. cudaMemcpy2DFromArrayAsync.Destination memory address src . cudaMemcpyToSymbolAsync. cudaMemcpyFromSymbolAsync Generated for NVIDIA CUDA Library by Doxygen . cudaMemcpyFromSymbol. cudaErrorInvalidValue.Type of transfer stream . cudaMemcpyFromArrayAsync. cudaMemcpy2DAsync.Source starting Y offset count . where kind is one of cudaMemcpyHostToHost. cudaMemcpyToSymbol. hOffset) to the memory area pointed to by dst. cudaMemcpy2DArrayToArray. cudaMemcpyAsync. and specifies the direction of the copy. cudaMemcpy2DToArrayAsync. cudaMemcpyFromArray. cudaMemcpy2DFromArray.8 Memory Management src .Size in bytes to copy kind . size_t wOffset.27 cudaError_t cudaMemcpyFromArray (void ∗ dst. cudaMemcpyFromSymbolAsync 4. cudaMemcpyFromArrayAsync. cudaMemcpy2DAsync. cudaMemcpyToArray. cudaMemcpy2DToArrayAsync.2. cudaMemcpyArrayToArray. cudaMemcpyToArrayAsync. cudaErrorInvalidValue.Source memory address wOffset . cudaMemcpy2DToArray.4. cudaMemcpyFromSymbol. cudaErrorInvalidDevicePointer. enum cudaMemcpyKind kind) Copies count bytes from the CUDA array src starting at the upper left corner (wOffset. size_t count. cudaMemcpy2D. cudaMemcpyToSymbol. asynchronous launches. Parameters: dst . or cudaMemcpyDeviceToDevice. cudaMemcpyDeviceToHost.Type of transfer Returns: cudaSuccess. asynchronous launches. cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous. cudaMemcpyToSymbolAsync. cudaErrorInvalidDevicePointer. cudaMemcpyToArray.Source starting X offset hOffset . cudaMemcpy2D.

8. size_t offset = 0. cudaMemcpy2DArrayToArray. cudaMemcpyFromSymbolAsync 4. cudaMemcpy2D. so the call may return before the copy is complete.29 cudaError_t cudaMemcpyFromSymbol (void ∗ dst. cudaMemcpy2DFromArray.2. or cudaMemcpyDeviceToDevice. cudaMemcpyToArray. Parameters: dst . cudaMemcpyDeviceToHost. enum cudaMemcpyKind kind = cudaMemcpyDeviceToHost) Copies count bytes from the memory area pointed to by offset bytes from the start of symbol symbol to the memory area pointed to by dst.Destination memory address src . cudaErrorInvalidValue.Size in bytes to copy Generated for NVIDIA CUDA Library by Doxygen .Stream identifier Returns: cudaSuccess. symbol can either be a variable that resides in global or constant memory space. size_t count.Source starting X offset hOffset . See also: cudaMemcpy. where kind is one of cudaMemcpyHostToHost. If kind is cudaMemcpyHostToDevice or cudaMemcpyDeviceToHost and stream is non-zero. the copy may overlap with operations in other streams. size_t count. The memory areas may not overlap. cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous. asynchronous launches. cudaMemcpyFromArray. cudaMemcpyHostToDevice.Source starting Y offset count .Size in bytes to copy kind . cudaMemcpy2DFromArrayAsync. cudaMemcpyFromSymbol. or it can be a character string. It only works on page-locked host memory and returns an error if a pointer to pageable memory is passed as input. and specifies the direction of the copy. cudaMemcpyToSymbolAsync.28 Module Documentation cudaError_t cudaMemcpyFromArrayAsync (void ∗ dst.2.Destination memory address symbol . Parameters: dst .Type of transfer stream . enum cudaMemcpyKind kind.Source memory address wOffset . cudaMemcpyFromArrayAsync() is asynchronous with respect to the host. cudaMemcpyToSymbol.56 4. hOffset) to the memory area pointed to by dst. const struct cudaArray ∗ src. cudaStream_t stream = 0) Copies count bytes from the CUDA array src starting at the upper left corner (wOffset. kind can be either cudaMemcpyDeviceToHost or cudaMemcpyDeviceToDevice. size_t wOffset. const char ∗ symbol. size_t hOffset. cudaMemcpyArrayToArray. cudaMemcpy2DToArray.Symbol source from device count . naming a variable that resides in global or constant memory space. cudaMemcpyToArrayAsync. cudaMemcpyAsync. cudaMemcpy2DToArrayAsync.8. cudaErrorInvalidDevicePointer. cudaMemcpy2DAsync. The copy can optionally be associated to a stream by passing a non-zero stream argument.

cudaMemcpy2DToArrayAsync. cudaMemcpy2DFromArrayAsync.Type of transfer Returns: 57 cudaSuccess.30 cudaError_t cudaMemcpyFromSymbolAsync (void ∗ dst. The copy can optionally be associated to a stream by passing a non-zero stream argument. naming a variable that resides in global or constant memory space. cudaMemcpy2D. so the call may return before the copy is complete. See also: cudaMemcpy. cudaErrorInvalidSymbol. cudaMemcpyAsync. See also: cudaMemcpy. the copy may overlap with operations in other streams. enum cudaMemcpyKind kind. cudaMemcpy2DAsync. kind can be either cudaMemcpyDeviceToHost or cudaMemcpyDeviceToDevice. asynchronous launches.Offset from start of symbol in bytes kind . size_t count. cudaMemcpyFromSymbolAsync 4. cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous.Destination memory address symbol . cudaMemcpyToSymbol. cudaMemcpyAsync. It only works on page-locked host memory and returns an error if a pointer to pageable memory is passed as input.2.Offset from start of symbol in bytes kind . cudaMemcpy2DFromArrayAsync. cudaMemcpyToArrayAsync. cudaMemcpy2D. cudaMemcpyToArrayAsync. cudaMemcpyFromArrayAsync. cudaMemcpyToSymbol. cudaMemcpy2DArrayToArray. cudaMemcpyToSymbolAsync Generated for NVIDIA CUDA Library by Doxygen . cudaMemcpy2DAsync.8 Memory Management offset . cudaErrorInvalidValue. cudaErrorInvalidDevicePointer. cudaMemcpy2DToArrayAsync.8. cudaMemcpyArrayToArray. cudaMemcpy2DToArray. cudaErrorInvalidDevicePointer. cudaErrorInvalidSymbol. cudaMemcpy2DFromArray. cudaMemcpy2DArrayToArray.Stream identifier Returns: cudaSuccess. cudaMemcpyFromArray.4. cudaMemcpy2DToArray. If kind is cudaMemcpyDeviceToHost and stream is non-zero. cudaMemcpy2DFromArray. The memory areas may not overlap. cudaMemcpyToSymbolAsync.Size in bytes to copy offset . or it can be a character string.Type of transfer stream . const char ∗ symbol. cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous.Symbol source from device count . cudaStream_t stream = 0) Copies count bytes from the memory area pointed to by offset bytes from the start of symbol symbol to the memory area pointed to by dst. cudaMemcpyToArray. cudaMemcpyToArray. cudaMemcpyFromArray. symbol can either be a variable that resides in global or constant memory space. asynchronous launches. cudaMemcpyFromArrayAsync. cudaMemcpyFromSymbol. cudaMemcpyArrayToArray. cudaErrorInvalidValue. size_t offset. cudaMemcpyFromSymbolAsync() is asynchronous with respect to the host. Parameters: dst .

so the call may return before the copy is complete. cudaErrorInvalidDevicePointer. cudaMemcpyFromArray.Destination starting Y offset src . cudaMemcpyAsync.8. where kind is one of cudaMemcpyHostToHost.Type of transfer Returns: cudaSuccess. Parameters: dst . const void ∗ src. size_t hOffset. cudaMemcpy2DAsync. asynchronous launches.Destination starting X offset hOffset . cudaMemcpyToSymbolAsync.2. cudaMemcpyToArrayAsync.Source memory address count . size_t count. cudaMemcpy2D. enum cudaMemcpyKind kind) Copies count bytes from the memory area pointed to by src to the CUDA array dst starting at the upper left corner (wOffset.Source memory address count .Destination memory address wOffset . size_t count.8. hOffset). cudaMemcpyToArrayAsync() is asynchronous with respect to the host. const void ∗ src. cudaMemcpy2DArrayToArray. cudaMemcpyFromArrayAsync. cudaMemcpyFromSymbol. cudaMemcpyHostToDevice.Destination starting X offset hOffset . See also: cudaMemcpy. cudaMemcpyFromSymbolAsync 4. where kind is one of cudaMemcpyHostToHost.31 Module Documentation cudaError_t cudaMemcpyToArray (struct cudaArray ∗ dst. cudaMemcpyToSymbol. cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous. the copy may overlap with operations in other streams. and specifies the direction of the copy. or cudaMemcpyDeviceToDevice.2. enum cudaMemcpyKind kind. cudaErrorInvalidValue. cudaMemcpyDeviceToHost.Destination starting Y offset src . cudaMemcpy2DToArrayAsync. size_t wOffset. cudaMemcpy2DFromArray. It only works on page-locked host memory and returns an error if a pointer to pageable memory is passed as input.Destination memory address wOffset .Size in bytes to copy Generated for NVIDIA CUDA Library by Doxygen . or cudaMemcpyDeviceToDevice.32 cudaError_t cudaMemcpyToArrayAsync (struct cudaArray ∗ dst.58 4. hOffset). size_t hOffset. cudaMemcpy2DToArray. cudaMemcpy2DFromArrayAsync. cudaMemcpyHostToDevice. cudaMemcpyDeviceToHost. cudaStream_t stream = 0) Copies count bytes from the memory area pointed to by src to the CUDA array dst starting at the upper left corner (wOffset. and specifies the direction of the copy. size_t wOffset.Size in bytes to copy kind . The copy can optionally be associated to a stream by passing a non-zero stream argument. cudaMemcpyArrayToArray. Parameters: dst . If kind is cudaMemcpyHostToDevice or cudaMemcpyDeviceToHost and stream is non-zero.

The memory areas may not overlap. or it can be a character string. cudaMemcpy2DToArray. const void ∗ src. See also: cudaMemcpy. cudaMemcpyToSymbolAsync. cudaMemcpy2DToArray. cudaMemcpy2DAsync. cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous. naming a variable that resides in global or constant memory space. cudaErrorInvalidSymbol.2. cudaErrorInvalidDevicePointer. cudaMemcpy2DFromArray. cudaMemcpyToSymbol. cudaMemcpyToArrayAsync. asynchronous launches. cudaMemcpyFromSymbol.Offset from start of symbol in bytes kind . cudaMemcpyFromArrayAsync. size_t offset = 0. cudaMemcpyFromArray. cudaMemcpy2DFromArrayAsync. cudaMemcpy2D. cudaMemcpy2D.Type of transfer stream . cudaMemcpyFromSymbolAsync Generated for NVIDIA CUDA Library by Doxygen . size_t count. cudaMemcpyToSymbolAsync.4. kind can be either cudaMemcpyHostToDevice or cudaMemcpyDeviceToDevice. See also: 59 cudaMemcpy. enum cudaMemcpyKind kind = cudaMemcpyHostToDevice) Copies count bytes from the memory area pointed to by src to the memory area pointed to by offset bytes from the start of symbol symbol. symbol can either be a variable that resides in global or constant memory space. cudaMemcpyFromArrayAsync. cudaMemcpy2DArrayToArray. Parameters: symbol .Type of transfer Returns: cudaSuccess. cudaMemcpyToArray.Symbol destination on device src . cudaMemcpyToArray. cudaMemcpy2DArrayToArray. cudaMemcpyFromSymbolAsync 4. cudaMemcpyAsync. cudaErrorInvalidValue. cudaMemcpyAsync. cudaMemcpyArrayToArray. cudaMemcpyFromArray. cudaMemcpyArrayToArray. cudaMemcpy2DAsync.33 cudaError_t cudaMemcpyToSymbol (const char ∗ symbol. cudaErrorInvalidDevicePointer. asynchronous launches.Size in bytes to copy offset . cudaMemcpy2DFromArray.Source memory address count . cudaMemcpy2DToArrayAsync. cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous. cudaMemcpy2DToArrayAsync.Stream identifier Returns: cudaSuccess. cudaMemcpyFromSymbol. cudaMemcpy2DFromArrayAsync. cudaErrorInvalidValue.8 Memory Management kind .8.

size_t ∗ total) Returns in ∗free and ∗total respectively. symbol can either be a variable that resides in global or constant memory space.8. cudaMemcpy2DToArray. naming a variable that resides in global or constant memory space.2.Source memory address count . cudaMemcpyFromArrayAsync. Parameters: free .8.35 cudaError_t cudaMemGetInfo (size_t ∗ free. the free and total amount of memory available for allocation by the device in bytes. cudaMemcpyToSymbol. or it can be a character string. cudaMemcpy2D. const void ∗ src. Generated for NVIDIA CUDA Library by Doxygen . cudaMemcpyToArrayAsync. cudaErrorInvalidSymbol.Size in bytes to copy offset .Offset from start of symbol in bytes kind .34 Module Documentation cudaError_t cudaMemcpyToSymbolAsync (const char ∗ symbol. The copy can optionally be associated to a stream by passing a non-zero stream argument. cudaMemcpyFromArray. cudaErrorLaunchFailure Note: Note that this function may also return error codes from previous.Stream identifier Returns: cudaSuccess. asynchronous launches. cudaMemcpy2DArrayToArray. The memory areas may not overlap. size_t offset.60 4.Type of transfer stream . cudaErrorInvalidMemcpyDirection Note: Note that this function may also return error codes from previous. cudaErrorInvalidValue. cudaErrorInvalidValue. enum cudaMemcpyKind kind. Parameters: symbol . cudaErrorInvalidDevicePointer. cudaMemcpyArrayToArray. cudaMemcpy2DToArrayAsync.2. asynchronous launches. cudaMemcpy2DFromArray. cudaStream_t stream = 0) Copies count bytes from the memory area pointed to by src to the memory area pointed to by offset bytes from the start of symbol symbol. See also: cudaMemcpy.Returned total memory in bytes Returns: cudaSuccess. size_t count. If kind is cudaMemcpyHostToDevice and stream is non-zero. so the call may return before the copy is complete.Returned free memory in bytes total . cudaMemcpyAsync. cudaMemcpyFromSymbolAsync 4. cudaMemcpyFromSymbol. kind can be either cudaMemcpyHostToDevice or cudaMemcpyDeviceToDevice. cudaMemcpy2DFromArrayAsync. cudaErrorInitializationError. cudaMemcpyToSymbolAsync() is asynchronous with respect to the host. cudaMemcpyToArray. the copy may overlap with operations in other streams. It only works on page-locked host memory and returns an error if a pointer to pageable memory is passed as input. cudaMemcpy2DAsync.Symbol destination on device src .

cudaMemset3D. See also: cudaMemset2D.8. asynchronous launches. including any padding added to the end of each row. size_t height) Sets to the specified value value a matrix (height rows of width bytes each) pointed to by dstPtr.Pointer to device memory value . cudaMemset2DAsync.4. int value. int value. size_t pitch.8 Memory Management 4.8. cudaMemsetAsync. cudaErrorInvalidValue. Parameters: devPtr . pitch is the width in bytes of the 2D array pointed to by dstPtr. See also: cudaMemset.Value to set for each byte of specified memory width . size_t width.Height of matrix set (rows) Returns: cudaSuccess.36 cudaError_t cudaMemset (void ∗ devPtr. cudaErrorInvalidDevicePointer Note: Note that this function may also return error codes from previous. asynchronous launches.Size in bytes to set Returns: cudaSuccess. cudaMemsetAsync. cudaMemset2DAsync.Pitch in bytes of 2D device memory value . cudaMemset3DAsync 4.2. cudaMemset3D.Width of matrix set (columns in bytes) height .2.37 cudaError_t cudaMemset2D (void ∗ devPtr. This function performs fastest when the pitch is one that has been passed back by cudaMallocPitch().Value to set for each byte of specified memory count . Parameters: devPtr . cudaErrorInvalidDevicePointer Note: Note that this function may also return error codes from previous. cudaMemset3DAsync Generated for NVIDIA CUDA Library by Doxygen .Pointer to 2D device memory pitch . cudaErrorInvalidValue. size_t count) 61 Fills the first count bytes of the memory area pointed to by devPtr with the constant byte value value.

int value. See also: cudaMemset.2. Parameters: pitchedDevPtr . cudaErrorInvalidValue.Pointer to 2D device memory pitch . size_t pitch. cudaMemset2D. while the ysize field specifies the height of each 2D slice in rows. cudaErrorInvalidDevicePointer Note: Note that this function may also return error codes from previous. size_t height. The operation can optionally be associated to a stream by passing a non-zero stream argument. The xsize field specifies the logical width of each row in bytes. If stream is nonzero. including any padding added to the end of each row.Value to set for each byte of specified memory extent . so the call may return before the memset is complete. cudaMemsetAsync. This function performs fastest when the pitchedDevPtr has been allocated by cudaMalloc3D().Height of matrix set (rows) stream .39 cudaError_t cudaMemset3D (struct cudaPitchedPtr pitchedDevPtr. Extents with width greater than or equal to the xsize of pitchedDevPtr may perform significantly faster than extents narrower than the xsize.Width of matrix set (columns in bytes) height . cudaStream_t stream = 0) Sets to the specified value value a matrix (height rows of width bytes each) pointed to by dstPtr. Parameters: devPtr . size_t width.Pitch in bytes of 2D device memory value . The pitch field of pitchedDevPtr is the width in memory in bytes of the 3D array pointed to by pitchedDevPtr.8. The object to initialize is defined by pitchedDevPtr. cudaMemset3DAsync 4.2.Size parameters for where to set device memory (width field in bytes) Generated for NVIDIA CUDA Library by Doxygen . int value. struct cudaExtent extent) Initializes each element of a 3D array to the specified value value.Pointer to pitched device memory value . This function performs fastest when the pitch is one that has been passed back by cudaMallocPitch().8. and a depth in slices. Secondarily. the operation may overlap with operations in other streams. The extents of the initialized region are specified as a width in bytes.62 4.38 Module Documentation cudaError_t cudaMemset2DAsync (void ∗ devPtr. asynchronous launches.Stream identifier Returns: cudaSuccess. a height in rows. pitch is the width in bytes of the 2D array pointed to by dstPtr. cudaMemset3D. cudaMemset2DAsync() is asynchronous with respect to the host. extents with height equal to the ysize of pitchedDevPtr will perform faster than when the height is shorter than the ysize.Value to set for each byte of specified memory width . including any padding added to the end of each row.

This function performs fastest when the pitchedDevPtr has been allocated by cudaMalloc3D(). cudaMemsetAsync. while the ysize field specifies the height of each 2D slice in rows. the operation may overlap with operations in other streams. including any padding added to the end of each row. cudaMemset2DAsync. cudaMalloc3D. make_cudaPitchedPtr. so the call may return before the memset is complete.Pointer to pitched device memory value . Secondarily. cudaMemset2D. cudaMemset2DAsync. The pitch field of pitchedDevPtr is the width in memory in bytes of the 3D array pointed to by pitchedDevPtr. The operation can optionally be associated to a stream by passing a non-zero stream argument. a height in rows. cudaMemsetAsync. make_cudaPitchedPtr. cudaMemset2D. make_cudaExtent Generated for NVIDIA CUDA Library by Doxygen . cudaMemset3DAsync. See also: 63 cudaMemset. extents with height equal to the ysize of pitchedDevPtr will perform faster than when the height is shorter than the ysize. Extents with width greater than or equal to the xsize of pitchedDevPtr may perform significantly faster than extents narrower than the xsize. cudaErrorInvalidDevicePointer Note: Note that this function may also return error codes from previous. asynchronous launches. Parameters: pitchedDevPtr . cudaMalloc3D.Size parameters for where to set device memory (width field in bytes) stream . int value. make_cudaExtent 4.Value to set for each byte of specified memory extent . asynchronous launches.8. cudaErrorInvalidDevicePointer Note: Note that this function may also return error codes from previous. If stream is nonzero. cudaErrorInvalidValue. The object to initialize is defined by pitchedDevPtr.40 cudaError_t cudaMemset3DAsync (struct cudaPitchedPtr pitchedDevPtr. The xsize field specifies the logical width of each row in bytes.8 Memory Management Returns: cudaSuccess.Stream identifier Returns: cudaSuccess.2. cudaStream_t stream = 0) Initializes each element of a 3D array to the specified value value. cudaMemset3D. The extents of the initialized region are specified as a width in bytes. cudaMemset3DAsync() is asynchronous with respect to the host. struct cudaExtent extent.4. and a depth in slices. See also: cudaMemset. cudaErrorInvalidValue.

cudaMemset2DAsync. Parameters: d .43 struct cudaPitchedPtr make_cudaPitchedPtr (void ∗ d.Depth in elements Returns: cudaExtent specified by w. size_t xsz. cudaMemsetAsync() is asynchronous with respect to the host. Parameters: w . and ysz. size_t p.Pointer to device memory value .Size in bytes to set stream .Height in elements d . make_cudaPos 4.2. int value. cudaStream_t stream = 0) Fills the first count bytes of the memory area pointed to by devPtr with the constant byte value value.Stream identifier Returns: cudaSuccess. cudaErrorInvalidDevicePointer Note: Note that this function may also return error codes from previous. size_t d) [read] Returns a cudaExtent based on the specified input parameters w.Pointer to allocated memory p . h. Parameters: devPtr .8. See also: cudaMemset.Value to set for each byte of specified memory count . so the call may return before the memset is complete. p.8. xsz. asynchronous launches.Width in bytes h . h. and d See also: make_cudaPitchedPtr. size_t h. The operation can optionally be associated to a stream by passing a non-zero stream argument.64 4. and d.42 struct cudaExtent make_cudaExtent (size_t w. If stream is non-zero.Pitch of allocated memory in bytes Generated for NVIDIA CUDA Library by Doxygen . cudaErrorInvalidValue. cudaMemset2D.41 Module Documentation cudaError_t cudaMemsetAsync (void ∗ devPtr. size_t count. cudaMemset3DAsync 4. size_t ysz) [read] Returns a cudaPitchedPtr based on the specified input parameters d.8.2.2. cudaMemset3D. the operation may overlap with operations in other streams.

8.Logical width of allocation in elements ysz . make_cudaPos 65 4. and z. and z See also: make_cudaExtent.Y position z . xsz.X position y .2. make_cudaPitchedPtr Generated for NVIDIA CUDA Library by Doxygen .4.Logical height of allocation in elements Returns: cudaPitchedPtr specified by d.8 Memory Management xsz . Parameters: x . size_t z) [read] Returns a cudaPos based on the specified input parameters x.44 struct cudaPos make_cudaPos (size_t x. y.Z position Returns: cudaPos specified by x. p. y. size_t y. and ysz See also: make_cudaExtent.

unsigned int flags) Registers an OpenGL buffer object. cudaGLMapFlagsReadOnly = 1.9. unsigned int flags) Register an OpenGL texture or renderbuffer object. • cudaError_t cudaWGLGetDevice (int ∗device. GLenum target.9. Assume resource can be read/written cudaGLMapFlagsReadOnly CUDA kernels will not write to this resource cudaGLMapFlagsWriteDiscard CUDA kernels will only write to and will not read from this resource Generated for NVIDIA CUDA Library by Doxygen . 4.1 Enumeration Type Documentation enum cudaGLMapFlags CUDA GL Map Flags Enumerator: cudaGLMapFlagsNone Default.1 Detailed Description This section describes the OpenGL interoperability functions of the CUDA runtime application programming interface. • cudaError_t cudaGraphicsGLRegisterBuffer (struct cudaGraphicsResource ∗∗resource.66 Module Documentation 4.9 OpenGL Interoperability Modules • OpenGL Interoperability [DEPRECATED] Enumerations • enum cudaGLMapFlags { cudaGLMapFlagsNone = 0. GLuint image.2 4.2.9. GLuint buffer. cudaGLMapFlagsWriteDiscard = 2 } Functions • cudaError_t cudaGLSetGLDevice (int device) Sets the CUDA device for use with OpenGL interoperability. • cudaError_t cudaGraphicsGLRegisterImage (struct cudaGraphicsResource ∗∗resource. 4. HGPUNV hGpu) Gets the CUDA device associated with hGpu.

as follows: • cudaGraphicsMapFlagsNone: Specifies no hints about how this resource will be used.3. cudaGLUnmapBufferObjectAsync 4.3. A handle to the registered object is returned as resource. • cudaGraphicsMapFlagsReadOnly: Specifies that CUDA will not write to this resource.3 4. cudaErrorInvalidResourceHandle. cudaErrorInvalidValue. asynchronous launches. It is therefore assumed that this resource will be read from and written to by CUDA.9.Map flags Returns: cudaSuccess. Parameters: resource . GLuint buffer. cudaGLUnregisterBufferObject. sourceGetMappedPointer cudaGraphicsMapResources. Records the thread as using OpenGL interoperability. cudaGLUnmapBufferObject.9. • cudaGraphicsMapFlagsWriteDiscard: Specifies that CUDA will not read from this resource and will write over the entire contents of the resource. This is the default value.Device to use for OpenGL interoperability Returns: cudaSuccess. asynchronous launches. cudaGraphicsUnregisterResource. so none of the data previously stored in the resource will be preserved. If the host thread has already initialized the CUDA runtime by calling non-device management runtime functions or if there exists a CUDA driver context active on the host thread.9 OpenGL Interoperability 67 4. Parameters: device . cudaErrorInvalidDevice.Pointer to the returned object handle buffer .1 Function Documentation cudaError_t cudaGLSetGLDevice (int device) Records device as the device on which the active host thread executes the device code. See also: cudaGLRegisterBufferObject. cudaErrorUnknown Note: Note that this function may also return error codes from previous. cudaErrorSetOnActiveProcess Note: Note that this function may also return error codes from previous. cudaGLMapBufferObject. cudaGLMapBufferObjectAsync.2 cudaError_t cudaGraphicsGLRegisterBuffer (struct cudaGraphicsResource ∗∗ resource. cudaErrorInvalidDevice. then this call returns cudaErrorSetOnActiveProcess. cudaGraphicsRe- Generated for NVIDIA CUDA Library by Doxygen .4.name of buffer object to be registered flags . unsigned int flags) Registers the buffer object specified by buffer for access by CUDA. The map flags flags specify the intended usage. See also: cudaGLCtxCreate.9.

• cudaGraphicsMapFlagsWriteDiscard: Specifies that CUDA will not read from this resource and will write over the entire contents of the resource.Returns the device associated with hGpu. cudaErrorInvalidDevice. so none of the data previously stored in the resource will be preserved. Parameters: device . cudaGraphicsSubResourceGetMappedArray 4. This is the default value. • cudaGraphicsMapFlagsReadOnly: Specifies that CUDA will not write to this resource. GL_TEXTURE_RECTANGLE.3. See also: cudaGLSetGLDevice cudaGraphicsUnregisterResource.3 Module Documentation cudaError_t cudaGraphicsGLRegisterImage (struct cudaGraphicsResource ∗∗ resource. GLuint image.Map flags Returns: cudaSuccess. flags . or -1 if hGpu is not a compute device.Identifies the type of object specified by image. and must be one of GL_TEXTURE_2D. The map flags flags specify the intended usage. It is therefore assumed that this resource will be read from and written to by CUDA.9. if applicable. cudaErrorUnknown Note: Note that this function may also return error codes from previous. GLenum target. asynchronous launches. as follows: • cudaGraphicsMapFlagsNone: Specifies no hints about how this resource will be used. cudaGraphicsMapResources.Pointer to the returned object handle image .name of texture or renderbuffer object to be registered target . or GL_RENDERBUFFER. target must match the type of the object.9.3. as queried via WGL_NV_gpu_affinity() Generated for NVIDIA CUDA Library by Doxygen . The following image classes are currently disallowed: • Textures with borders • Multisampled renderbuffers Parameters: resource . GL_TEXTURE_3D. hGpu . HGPUNV hGpu) Returns the CUDA device associated with a hGpu. A handle to the registered object is returned as resource.4 cudaError_t cudaWGLGetDevice (int ∗ device.68 4. cudaErrorInvalidResourceHandle.Handle to a GPU. GL_TEXTURE_2D_ARRAY. cudaErrorInvalidValue. unsigned int flags) Registers the texture or renderbuffer object specified by image for access by CUDA. GL_TEXTURE_CUBE_MAP.

4. asynchronous launches. cudaGLSetGLDevice 69 Generated for NVIDIA CUDA Library by Doxygen .9 OpenGL Interoperability Returns: cudaSuccess Note: Note that this function may also return error codes from previous. See also: WGL_NV_gpu_affinity.

cudaD3D9RegisterFlagsArray = 1 } Functions • cudaError_t cudaD3D9GetDevice (int ∗device. unsigned int flags) Register a Direct3D 9 resource for access by CUDA.10. cudaD3D9DeviceListNextFrame = 3 } • enum cudaD3D9MapFlags { cudaD3D9MapFlagsNone = 0. • cudaError_t cudaD3D9GetDirect3DDevice (IDirect3DDevice9 ∗∗ppD3D9Device) Gets the Direct3D device against which the current CUDA context was created. const char ∗pszAdapterName) Gets the device number for an adapter. cudaD3D9DeviceListCurrentFrame = 2. • cudaError_t cudaD3D9SetDirect3DDevice (IDirect3DDevice9 ∗pD3D9Device. enum cudaD3D9DeviceList deviceList) Gets the CUDA devices corresponding to a Direct3D 9 device. cudaD3D9MapFlagsReadOnly = 1. • cudaError_t cudaGraphicsD3D9RegisterResource (struct rect3DResource9 ∗pD3DResource. unsigned int cudaDeviceCount. Generated for NVIDIA CUDA Library by Doxygen . int device=-1) Sets the Direct3D device to use for interoperability in this thread. • cudaError_t cudaD3D9GetDevices (unsigned int ∗pCudaDeviceCount. cudaD3D9MapFlagsWriteDiscard = 2 } • enum cudaD3D9RegisterFlags { cudaD3D9RegisterFlagsNone = 0. int ∗pCudaDevices. IDi- 4.10 Direct3D 9 Interoperability Modules • Direct3D 9 Interoperability [DEPRECATED] Enumerations • enum cudaD3D9DeviceList { cudaD3D9DeviceListAll = 1. cudaGraphicsResource ∗∗resource.70 Module Documentation 4.1 Detailed Description This section describes the Direct3D 9 interoperability functions of the CUDA runtime application programming interface. IDirect3DDevice9 ∗pD3D9Device.

3.1 Enumeration Type Documentation enum cudaD3D9DeviceList CUDA devices corresponding to a D3D9 device Enumerator: cudaD3D9DeviceListAll The CUDA devices for all GPUs used by a D3D9 device cudaD3D9DeviceListCurrentFrame The CUDA devices for the GPUs used by a D3D9 device in its currently rendering frame cudaD3D9DeviceListNextFrame The CUDA devices for the GPUs to be used by a D3D9 device in the next frame 4.10.10.1 Function Documentation cudaError_t cudaD3D9GetDevice (int ∗ device.3 4.2.2 4.10.10 Direct3D 9 Interoperability 71 4.2.10. Generated for NVIDIA CUDA Library by Doxygen .3 enum cudaD3D9RegisterFlags CUDA D3D9 Register Flags Enumerator: cudaD3D9RegisterFlagsNone Default.D3D9 adapter to get device for Returns: cudaSuccess. Assume resource can be read/written cudaD3D9MapFlagsReadOnly CUDA kernels will not write to this resource cudaD3D9MapFlagsWriteDiscard CUDA kernels will only write to and will not read from this resource 4.Returns the device corresponding to pszAdapterName pszAdapterName . cudaErrorUnknown Note: Note that this function may also return error codes from previous. asynchronous launches. const char ∗ pszAdapterName) Returns in ∗device the CUDA-compatible device corresponding to the adapter name pszAdapterName obtained from EnumDisplayDevices or IDirect3D9::GetAdapterIdentifier(). cudaErrorInvalidValue. Resource can be accessed througa void∗ cudaD3D9RegisterFlagsArray Resource can be accessed through a CUarray∗ 4.2 enum cudaD3D9MapFlags CUDA D3D9 Map Flags Enumerator: cudaD3D9MapFlagsNone Default.4.10.2. Parameters: device .10. If no device on the adapter with name pszAdapterName is CUDA-compatible then the call will fail.

asynchronous launches. cudaErrorUnknown Note: Note that this function may also return error codes from previous. unsigned int cudaDeviceCount.10. int ∗ pCudaDevices.10. cudaErrorUnknown Note: Note that this function may also return error codes from previous. Parameters: pCudaDeviceCount . cudaGraphicsResourceGetMappedPointer 4. asynchronous launches.2 cudaError_t cudaD3D9GetDevices (unsigned int ∗ pCudaDeviceCount.The size of the output device array pCudaDevices pD3D9Device . enum cudaD3D9DeviceList deviceList) Returns in ∗pCudaDeviceCount the number of CUDA-compatible devices corresponding to the Direct3D 9 device pD3D9Device. cudaGraphicsMapResources.Returned CUDA devices corresponding to pD3D9Device cudaDeviceCount . cudaD3D9DeviceListCurrentFrame for the devices used to render the current frame (in SLI).3. Module Documentation 4.72 See also: cudaD3D9SetDirect3DDevice. or cudaD3D9DeviceListNextFrame for the devices used to render the next frame (in SLI). See also: cudaGraphicsUnregisterResource. This set may be cudaD3D9DeviceListAll for all devices. If any of the GPUs being used to render pDevice are not CUDA capable then the call will return cudaErrorNoDevice.Returns the Direct3D device for this thread Returns: cudaSuccess.The set of devices to return.3. cudaGraphicsSubResourceGetMappedArray. cudaErrorNoDevice.Direct3D 9 device to query for CUDA devices deviceList .Returned number of CUDA devices corresponding to pD3D9Device pCudaDevices .3 cudaError_t cudaD3D9GetDirect3DDevice (IDirect3DDevice9 ∗∗ ppD3D9Device) Returns in ∗ppD3D9Device the Direct3D device against which this CUDA context was created in cudaD3D9SetDirect3DDevice(). Returns: cudaSuccess. Parameters: ppD3D9Device . IDirect3DDevice9 ∗ pD3D9Device. Also returns in ∗pCudaDevices at most cudaDeviceCount of the the CUDA-compatible devices corresponding to the Direct3D 9 device pD3D9Device. cudaGraphicsD3D9RegisterResource. See also: cudaD3D9SetDirect3DDevice Generated for NVIDIA CUDA Library by Doxygen .

This reference count will be decremented when this resource is unregistered through cudaGraphicsUnregisterResource(). int device = -1) 73 Records pD3D9Device as the Direct3D device to use for Direct3D interoperability on this host thread. then this call returns cudaErrorSetOnActiveProcess. cudaErrorSetOnActiveProcess Note: Note that this function may also return error codes from previous. This call is potentially high-overhead and should not be called every frame in interactive applications.4 cudaError_t cudaD3D9SetDirect3DDevice (IDirect3DDevice9 ∗ pD3D9Device. The only valid value for this parameter is • cudaGraphicsRegisterFlagsNone Generated for NVIDIA CUDA Library by Doxygen . Also on success.10 Direct3D 9 Interoperability 4. asynchronous launches.Direct3D device to use for this thread device . In particular. cudaErrorInvalidValue. This reference count will be decremented upon destruction of this context through cudaThreadExit(). 4.10. unsigned int flags) Registers the Direct3D 9 resource pD3DResource for access by CUDA. Returns: cudaSuccess. may be set to -1 to automatically select an appropriate CUDA device. Successful context creation on pD3D9Device will increase the internal reference count on pD3D9Device. cudaGraphicsD3D9RegisterResource. this call will increase the internal reference count on pD3DResource.4.10.3.3. This device must be among the devices returned when querying cudaD3D9DeviceListAll from cudaD3D9GetDevices. The type of pD3DResource must be one of the following.5 cudaError_t cudaGraphicsD3D9RegisterResource (struct cudaGraphicsResource ∗∗ resource. See also: cudaD3D9GetDevice. • IDirect3DVertexBuffer9: may be accessed through a device pointer • IDirect3DIndexBuffer9: may be accessed through a device pointer • IDirect3DSurface9: may be accessed through an array.The CUDA device to use. individual mipmap levels and faces of cube maps may not be registered directly. • IDirect3DBaseTexture9: individual surfaces on this texture may be accessed through an array. If this call is successful then the application will be able to map and unmap this resource until it is unregistered through cudaGraphicsUnregisterResource(). one must register the base texture object. The flags argument may be used to specify additional parameters at register time. If the host thread has already initialized the CUDA runtime by calling non-device management runtime functions or if there exists a CUDA driver context active on the host thread. cudaErrorInitializationError. To access individual surfaces associated with a texture. Only stand-alone objects of type IDirect3DSurface9 may be explicitly shared. Parameters: pD3D9Device . IDirect3DResource9 ∗ pD3DResource.

cudaGraphicsSubResourceGetMappedArray. • The primary rendertarget may not be registered with CUDA. or 32-bit integer or floating-point data cannot be shared.Parameters for resource registration Returns: cudaSuccess. then cudaErrorInvalidResourceHandle is returned.Direct3D resource to register flags . 2. cudaErrorInvalidValue. • Surfaces of depth or stencil formats cannot be shared. The following are some limitations. • Resources allocated as shared may not be registered with CUDA. cudaGraphicsMapResources. See also: cudaD3D9SetDirect3DDevice cudaGraphicsUnregisterResource.Pointer to returned resource handle pD3DResource .74 Module Documentation Not all Direct3D resources of the above types may be used for interoperability with CUDA. cudaErrorUnknown Note: Note that this function may also return error codes from previous. Parameters: resource . cudaErrorInvalidDevice. cudaErrorInvalidResourceHandle. 16. asynchronous launches. or 4 channels of 8. If pD3DResource cannot be registered. If pD3DResource is of incorrect type or is already registered. If Direct3D interoperability is not initialized using cudaD3D9SetDirect3DDevice then cudaErrorInvalidDevice is returned. • Textures which are not of a format which is 1. then cudaErrorUnknown is returned. cudaGraphicsResourceGetMappedPointer Generated for NVIDIA CUDA Library by Doxygen .

cudaD3D10DeviceListNextFrame = 3 } • enum cudaD3D10MapFlags { cudaD3D10MapFlagsNone = 0. ID3D10Device ∗pD3D10Device. IDXGIAdapter ∗pAdapter) Gets the device number for an adapter. Generated for NVIDIA CUDA Library by Doxygen . • cudaError_t cudaGraphicsD3D10RegisterResource ID3D10Resource ∗pD3DResource. • cudaError_t cudaD3D10SetDirect3DDevice (ID3D10Device ∗pD3D10Device. int ∗pCudaDevices. (struct cudaGraphicsResource ∗∗resource. • cudaError_t cudaD3D10GetDevices (unsigned int ∗pCudaDeviceCount. cudaD3D10MapFlagsWriteDiscard = 2 } • enum cudaD3D10RegisterFlags { cudaD3D10RegisterFlagsNone = 0. cudaD3D10MapFlagsReadOnly = 1.11. unsigned int flags) Register a Direct3D 10 resource for access by CUDA.11 Direct3D 10 Interoperability 75 4. unsigned int cudaDeviceCount.1 Detailed Description This section describes the Direct3D 10 interoperability functions of the CUDA runtime application programming interface.4. enum cudaD3D10DeviceList deviceList) Gets the CUDA devices corresponding to a Direct3D 10 device.11 Direct3D 10 Interoperability Modules • Direct3D 10 Interoperability [DEPRECATED] Enumerations • enum cudaD3D10DeviceList { cudaD3D10DeviceListAll = 1. int device=-1) Sets the Direct3D 10 device to use for interoperability in this thread. • cudaError_t cudaD3D10GetDirect3DDevice (ID3D10Device ∗∗ppD3D10Device) Gets the Direct3D device against which the current CUDA context was created. cudaD3D10DeviceListCurrentFrame = 2. cudaD3D10RegisterFlagsArray = 1 } Functions • cudaError_t cudaD3D10GetDevice (int ∗device. 4.

76 Module Documentation 4. Resource can be accessed through a void∗ cudaD3D10RegisterFlagsArray Resource can be accessed through a CUarray∗ 4.2. cudaErrorInvalidValue.Returns the device corresponding to pAdapter pAdapter .3 enum cudaD3D10RegisterFlags CUDA D3D10 Register Flags Enumerator: cudaD3D10RegisterFlagsNone Default.3 4.D3D10 adapter to get device for Returns: cudaSuccess. Assume resource can be read/written cudaD3D10MapFlagsReadOnly CUDA kernels will not write to this resource cudaD3D10MapFlagsWriteDiscard CUDA kernels will only write to and will not read from this resource 4.2.3. cudaErrorUnknown Note: Note that this function may also return error codes from previous.11.11.11.2.1 Enumeration Type Documentation enum cudaD3D10DeviceList CUDA devices corresponding to a D3D10 device Enumerator: cudaD3D10DeviceListAll The CUDA devices for all GPUs used by a D3D10 device cudaD3D10DeviceListCurrentFrame The CUDA devices for the GPUs used by a D3D10 device in its currently rendering frame cudaD3D10DeviceListNextFrame The CUDA devices for the GPUs to be used by a D3D10 device in the next frame 4.2 4. Generated for NVIDIA CUDA Library by Doxygen . IDXGIAdapter ∗ pAdapter) Returns in ∗device the CUDA-compatible device corresponding to the adapter pAdapter obtained from IDXGIFactory::EnumAdapters.1 Function Documentation cudaError_t cudaD3D10GetDevice (int ∗ device. Parameters: device .11.11.11.2 enum cudaD3D10MapFlags CUDA D3D10 Map Flags Enumerator: cudaD3D10MapFlagsNone Default. asynchronous launches. This call will succeed only if a device on adapter pAdapter is Cuda-compatible.

Parameters: ppD3D10Device . or cudaD3D10DeviceListNextFrame for the devices used to render the next frame (in SLI). int ∗ pCudaDevices.Returned number of CUDA devices corresponding to pD3D10Device pCudaDevices . ID3D10Device ∗ pD3D10Device.11.Returned CUDA devices corresponding to pD3D10Device cudaDeviceCount . cudaErrorUnknown Note: Note that this function may also return error codes from previous. cudaGraphicsD3D10RegisterResource. Also returns in ∗pCudaDevices at most cudaDeviceCount of the the CUDAcompatible devices corresponding to the Direct3D 10 device pD3D10Device. asynchronous launches. 77 4. See also: cudaD3D10SetDirect3DDevice Generated for NVIDIA CUDA Library by Doxygen .Direct3D 10 device to query for CUDA devices deviceList .11.Returns the Direct3D device for this thread Returns: cudaSuccess.3. cudaD3D10DeviceListCurrentFrame for the devices used to render the current frame (in SLI).3 cudaError_t cudaD3D10GetDirect3DDevice (ID3D10Device ∗∗ ppD3D10Device) Returns in ∗ppD3D10Device the Direct3D device against which this CUDA context was created in cudaD3D10SetDirect3DDevice(). Parameters: pCudaDeviceCount . cudaErrorUnknown Note: Note that this function may also return error codes from previous.2 cudaError_t cudaD3D10GetDevices (unsigned int ∗ pCudaDeviceCount. Returns: cudaSuccess. See also: cudaGraphicsUnregisterResource.The set of devices to return.4.3. If any of the GPUs being used to render pDevice are not CUDA capable then the call will return cudaErrorNoDevice. unsigned int cudaDeviceCount. cudaGraphicsSubResourceGetMappedArray.The size of the output device array pCudaDevices pD3D10Device .11 Direct3D 10 Interoperability See also: cudaD3D10SetDirect3DDevice. cudaErrorNoDevice. cudaGraphicsMapResources. enum cudaD3D10DeviceList deviceList) Returns in ∗pCudaDeviceCount the number of CUDA-compatible devices corresponding to the Direct3D 10 device pD3D10Device. cudaGraphicsResourceGetMappedPointer 4. This set may be cudaD3D10DeviceListAll for all devices. asynchronous launches.

this call will increase the internal reference count on pD3DResource. may be set to -1 to automatically select an appropriate CUDA device.78 4. Also on success. The following are some limitations.4 Module Documentation cudaError_t cudaD3D10SetDirect3DDevice (ID3D10Device ∗ pD3D10Device.11. cudaErrorSetOnActiveProcess Note: Note that this function may also return error codes from previous. int device = -1) Records pD3D10Device as the Direct3D 10 device to use for Direct3D 10 interoperability on this host thread. Returns: cudaSuccess.Direct3D device to use for interoperability device . Parameters: pD3D10Device . ID3D10Resource ∗ pD3DResource. The type of pD3DResource must be one of the following. If the host thread has already initialized the CUDA runtime by calling non-device management runtime functions or if there exists a CUDA driver context active on the host thread. See also: cudaD3D10GetDevice. This reference count will be decremented when this resource is unregistered through cudaGraphicsUnregisterResource(). This reference count will be decremented upon destruction of this context through cudaThreadExit(). unsigned int flags) Registers the Direct3D 10 resource pD3DResource for access by CUDA. If this call is successful. The only valid value for this parameter is • cudaGraphicsRegisterFlagsNone Not all Direct3D resources of the above types may be used for interoperability with CUDA. asynchronous launches.The CUDA device to use. then the application will be able to map and unmap this resource until it is unregistered through cudaGraphicsUnregisterResource().11. cudaErrorInvalidValue. Successful context creation on pD3D10Device will increase the internal reference count on pD3D10Device. cudaErrorInitializationError.3. • ID3D10Buffer: may be accessed via a device pointer • ID3D10Texture1D: individual subresources of the texture may be accessed via arrays • ID3D10Texture2D: individual subresources of the texture may be accessed via arrays • ID3D10Texture3D: individual subresources of the texture may be accessed via arrays The flags argument may be used to specify additional parameters at register time. Generated for NVIDIA CUDA Library by Doxygen .5 cudaError_t cudaGraphicsD3D10RegisterResource (struct cudaGraphicsResource ∗∗ resource. This device must be among the devices returned when querying cudaD3D10DeviceListAll from cudaD3D10GetDevices.3. This call is potentially high-overhead and should not be called every frame in interactive applications. cudaGraphicsD3D10RegisterResource 4. then this call returns cudaErrorSetOnActiveProcess.

cudaErrorInvalidResourceHandle. cudaErrorInvalidDevice.4. 2. cudaErrorUnknown Note: Note that this function may also return error codes from previous. 79 • Textures which are not of a format which is 1.Pointer to returned resource handle pD3DResource .Direct3D resource to register flags . or 4 channels of 8. cudaGraphicsResourceGetMappedPointer Generated for NVIDIA CUDA Library by Doxygen . then cudaErrorUnknown is returned.11 Direct3D 10 Interoperability • The primary rendertarget may not be registered with CUDA.Parameters for resource registration Returns: cudaSuccess. 16. cudaErrorInvalidValue. If pD3DResource is of incorrect type or is already registered. If Direct3D interoperability is not initialized using cudaD3D10SetDirect3DDevice then cudaErrorInvalidDevice is returned. asynchronous launches. See also: cudaD3D10SetDirect3DDevice cudaGraphicsUnregisterResource. then cudaErrorInvalidResourceHandle is returned. • Surfaces of depth or stencil formats cannot be shared. Parameters: resource . or 32-bit integer or floating-point data cannot be shared. cudaGraphicsSubResourceGetMappedArray. • Resources allocated as shared may not be registered with CUDA. cudaGraphicsMapResources. If pD3DResource cannot be registered.

12.2.1 Enumeration Type Documentation enum cudaD3D11DeviceList CUDA devices corresponding to a D3D11 device Enumerator: cudaD3D11DeviceListAll The CUDA devices for all GPUs used by a D3D11 device cudaD3D11DeviceListCurrentFrame The CUDA devices for the GPUs used by a D3D11 device in its currently rendering frame cudaD3D11DeviceListNextFrame The CUDA devices for the GPUs to be used by a D3D11 device in the next frame Generated for NVIDIA CUDA Library by Doxygen .12 Direct3D 11 Interoperability Enumerations • enum cudaD3D11DeviceList { cudaD3D11DeviceListAll = 1. cudaD3D11DeviceListNextFrame = 3 } Functions • cudaError_t cudaD3D11GetDevice (int ∗device. ID3D11Device ∗pD3D11Device. • cudaError_t cudaD3D11GetDirect3DDevice (ID3D11Device ∗∗ppD3D11Device) Gets the Direct3D device against which the current CUDA context was created. • cudaError_t cudaGraphicsD3D11RegisterResource ID3D11Resource ∗pD3DResource.1 Detailed Description This section describes the Direct3D 11 interoperability functions of the CUDA runtime application programming interface.12. int ∗pCudaDevices. enum cudaD3D11DeviceList deviceList) Gets the CUDA devices corresponding to a Direct3D 11 device. • cudaError_t cudaD3D11GetDevices (unsigned int ∗pCudaDeviceCount. (struct cudaGraphicsResource ∗∗resource.12. IDXGIAdapter ∗pAdapter) Gets the device number for an adapter.2 4. • cudaError_t cudaD3D11SetDirect3DDevice (ID3D11Device ∗pD3D11Device. int device=-1) Sets the Direct3D 11 device to use for interoperability in this thread. 4. unsigned int flags) Register a Direct3D 11 resource for access by CUDA. unsigned int cudaDeviceCount. 4. cudaD3D11DeviceListCurrentFrame = 2.80 Module Documentation 4.

4. If any of the GPUs being used to render pDevice are not CUDA capable then the call will return cudaErrorNoDevice. cudaGraphicsSubResourceGetMappedArray. This call will succeed only if a device on adapter pAdapter is Cuda-compatible. asynchronous launches. IDXGIAdapter ∗ pAdapter) Returns in ∗device the CUDA-compatible device corresponding to the adapter pAdapter obtained from IDXGIFactory::EnumAdapters.12.D3D11 adapter to get device for Returns: cudaSuccess. cudaD3D11DeviceListCurrentFrame for the devices used to render the current frame (in SLI).12.The size of the output device array pCudaDevices pD3D11Device . ID3D11Device ∗ pD3D11Device.2 cudaError_t cudaD3D11GetDevices (unsigned int ∗ pCudaDeviceCount. cudaGraphicsMapResources. cudaErrorInvalidValue. Parameters: pCudaDeviceCount . unsigned int cudaDeviceCount. cudaGraphicsSubResourceGetMappedArray.3.12. cudaGraphicsMapResources. or cudaD3D11DeviceListNextFrame for the devices used to render the next frame (in SLI). cudaErrorNoDevice. Parameters: device . cudaGraphicsResourceGetMappedPointer Generated for NVIDIA CUDA Library by Doxygen . cudaGraphicsResourceGetMappedPointer 4. Also returns in ∗pCudaDevices at most cudaDeviceCount of the the CUDAcompatible devices corresponding to the Direct3D 11 device pD3D11Device.Returned CUDA devices corresponding to pD3D11Device cudaDeviceCount .12 Direct3D 11 Interoperability 81 4. cudaErrorUnknown Note: Note that this function may also return error codes from previous.The set of devices to return.3. Returns: cudaSuccess. enum cudaD3D11DeviceList deviceList) Returns in ∗pCudaDeviceCount the number of CUDA-compatible devices corresponding to the Direct3D 11 device pD3D11Device.Returned number of CUDA devices corresponding to pD3D11Device pCudaDevices . See also: cudaGraphicsUnregisterResource. This set may be cudaD3D11DeviceListAll for all devices.Direct3D 11 device to query for CUDA devices deviceList .1 Function Documentation cudaError_t cudaD3D11GetDevice (int ∗ device.3 4.Returns the device corresponding to pAdapter pAdapter . int ∗ pCudaDevices. See also: cudaGraphicsUnregisterResource. asynchronous launches. cudaErrorUnknown Note: Note that this function may also return error codes from previous.

this call will increase the internal reference count on Generated for NVIDIA CUDA Library by Doxygen . Also on success.82 4.3. asynchronous launches. See also: cudaD3D11GetDevice. Successful context creation on pD3D11Device will increase the internal reference count on pD3D11Device. cudaErrorUnknown Note: Note that this function may also return error codes from previous. Returns: cudaSuccess. cudaErrorSetOnActiveProcess Note: Note that this function may also return error codes from previous. may be set to -1 to automatically select an appropriate CUDA device.3.5 cudaError_t cudaGraphicsD3D11RegisterResource (struct cudaGraphicsResource ∗∗ resource. ID3D11Resource ∗ pD3DResource. cudaErrorInitializationError. cudaErrorInvalidValue.4 cudaError_t cudaD3D11SetDirect3DDevice (ID3D11Device ∗ pD3D11Device.The CUDA device to use.Returns the Direct3D device for this thread Returns: cudaSuccess. This device must be among the devices returned when querying cudaD3D11DeviceListAll from cudaD3D11GetDevices. then this call returns cudaErrorSetOnActiveProcess. cudaGraphicsD3D11RegisterResource 4.12. If this call is successful.12.3 Module Documentation cudaError_t cudaD3D11GetDirect3DDevice (ID3D11Device ∗∗ ppD3D11Device) Returns in ∗ppD3D11Device the Direct3D device against which this CUDA context was created in cudaD3D11SetDirect3DDevice(). then the application will be able to map and unmap this resource until it is unregistered through cudaGraphicsUnregisterResource().3. int device = -1) Records pD3D11Device as the Direct3D 11 device to use for Direct3D 11 interoperability on this host thread. This reference count will be decremented upon destruction of this context through cudaThreadExit().12. If the host thread has already initialized the CUDA runtime by calling non-device management runtime functions or if there exists a CUDA driver context active on the host thread. See also: cudaD3D11SetDirect3DDevice 4. Parameters: ppD3D11Device . asynchronous launches. unsigned int flags) Registers the Direct3D 11 resource pD3DResource for access by CUDA. Parameters: pD3D11Device .Direct3D device to use for interoperability device .

Parameters: resource . cudaErrorInvalidValue. The following are some limitations. If Direct3D interoperability is not initialized using cudaD3D11SetDirect3DDevice then cudaErrorInvalidDevice is returned.4. cudaGraphicsMapResources.Parameters for resource registration Returns: cudaSuccess. This reference count will be decremented when this resource is unregistered through cudaGraphicsUnregisterResource().12 Direct3D 11 Interoperability 83 pD3DResource. then cudaErrorUnknown is returned. cudaErrorInvalidResourceHandle. • Resources allocated as shared may not be registered with CUDA. or 4 channels of 8. • Surfaces of depth or stencil formats cannot be shared. cudaErrorInvalidDevice. 16. • The primary rendertarget may not be registered with CUDA.Pointer to returned resource handle pD3DResource . or 32-bit integer or floating-point data cannot be shared. If pD3DResource cannot be registered. cudaErrorUnknown Note: Note that this function may also return error codes from previous. See also: cudaD3D11SetDirect3DDevice cudaGraphicsUnregisterResource. cudaGraphicsSubResourceGetMappedArray. • Textures which are not of a format which is 1. This call is potentially high-overhead and should not be called every frame in interactive applications.Direct3D resource to register flags . The type of pD3DResource must be one of the following. The only valid value for this parameter is • cudaGraphicsRegisterFlagsNone Not all Direct3D resources of the above types may be used for interoperability with CUDA. cudaGraphicsResourceGetMappedPointer Generated for NVIDIA CUDA Library by Doxygen . If pD3DResource is of incorrect type or is already registered. • ID3D11Buffer: may be accessed via a device pointer • ID3D11Texture1D: individual subresources of the texture may be accessed via arrays • ID3D11Texture2D: individual subresources of the texture may be accessed via arrays • ID3D11Texture3D: individual subresources of the texture may be accessed via arrays The flags argument may be used to specify additional parameters at register time. asynchronous launches. 2. then cudaErrorInvalidResourceHandle is returned.

VdpGetProcAddress Gets the CUDA device associated with a VdpDevice. VdpOutputSurface vdpSurface.1 Detailed Description This section describes the VDPAU interoperability functions of the CUDA runtime application programming interface.13 VDPAU Interoperability Functions • cudaError_t cudaGraphicsVDPAURegisterOutputSurface (struct cudaGraphicsResource ∗∗resource. as follows: • cudaGraphicsMapFlagsNone: Specifies no hints about how this resource will be used. • cudaError_t cudaGraphicsVDPAURegisterVideoSurface (struct cudaGraphicsResource ∗∗resource. unsigned int flags) Register a VdpVideoSurface object. unsigned int flags) Registers the VdpOutputSurface specified by vdpSurface for access by CUDA.VDPAU object to be registered flags .2. unsigned int flags) Register a VdpOutputSurface object.84 Module Documentation 4. The surface’s intended usage is specified using flags.2 4.1 Function Documentation cudaError_t cudaGraphicsVDPAURegisterOutputSurface (struct cudaGraphicsResource ∗∗ resource. VdpOutputSurface vdpSurface. Parameters: resource . so none of the data previously stored in the resource will be preserved. VdpDevice vdpDevice. This is the default value.13.13. cudaErrorInvalidValue.Pointer to the returned object handle vdpSurface . cudaErrorInvalidResourceHandle. VdpGetProcAddress 4.Map flags Returns: cudaSuccess. VdpVideoSurface vdpSurface. • cudaGraphicsMapFlagsWriteDiscard: Specifies that CUDA will not read from this resource and will write over the entire contents of the resource. VdpDevice vdpDevice. 4. • cudaError_t cudaVDPAUGetDevice ∗vdpGetProcAddress) (int ∗device. ∗vdpGetProcAddress) Sets the CUDA device for use with VDPAU interoperability. cudaErrorUnknown Generated for NVIDIA CUDA Library by Doxygen . A handle to the registered object is returned as resource. • cudaGraphicsMapFlagsReadOnly: Specifies that CUDA will not write to this resource. It is therefore assumed that this resource will be read from and written to by CUDA. • cudaError_t cudaVDPAUSetVDPAUDevice (int device. cudaErrorInvalidDevice.13.

so none of the data previously stored in the resource will be preserved.13 VDPAU Interoperability Note: Note that this function may also return error codes from previous. Parameters: resource .13.VDPAU object to be registered flags . VdpVideoSurface vdpSurface. cudaErrorInvalidValue. This is the default value.Map flags Returns: cudaSuccess. See also: 85 cudaVDPAUSetVDPAUDevice cudaGraphicsUnregisterResource.2.4.A VdpDevice handle vdpGetProcAddress . See also: cudaVDPAUSetVDPAUDevice cudaGraphicsUnregisterResource.Returns the device associated with vdpDevice. or -1 if the device associated with vdpDevice is not a compute device.3 cudaError_t cudaVDPAUGetDevice (int ∗ device. vdpDevice . VdpDevice vdpDevice.2 cudaError_t cudaGraphicsVDPAURegisterVideoSurface (struct cudaGraphicsResource ∗∗ resource. Parameters: device .VDPAU’s VdpGetProcAddress function pointer Generated for NVIDIA CUDA Library by Doxygen . cudaErrorUnknown Note: Note that this function may also return error codes from previous. cudaGraphicsSubResourceGetMappedArray 4. The surface’s intended usage is specified using flags. A handle to the registered object is returned as resource.Pointer to the returned object handle vdpSurface .13. if applicable. cudaErrorInvalidDevice. cudaErrorInvalidResourceHandle. cudaGraphicsSubResourceGetMappedArray 4. It is therefore assumed that this resource will be read from and written to by CUDA. • cudaGraphicsMapFlagsWriteDiscard: Specifies that CUDA will not read from this resource and will write over the entire contents of the resource.2. asynchronous launches. unsigned int flags) Registers the VdpVideoSurface specified by vdpSurface for access by CUDA. as follows: • cudaGraphicsMapFlagsNone: Specifies no hints about how this resource will be used. asynchronous launches. • cudaGraphicsMapFlagsReadOnly: Specifies that CUDA will not write to this resource. VdpGetProcAddress ∗ vdpGetProcAddress) Returns the CUDA device associated with a VdpDevice.

4 cudaError_t cudaVDPAUSetVDPAUDevice (int device. cudaGraphicsVDPAURegisterOutputSurface Generated for NVIDIA CUDA Library by Doxygen . VdpGetProcAddress ∗ vdpGetProcAddress) Records device as the device on which the active host thread executes the device code.13. cudaErrorInvalidDevice. then this call returns cudaErrorSetOnActiveProcess. If the host thread has already initialized the CUDA runtime by calling non-device management runtime functions or if there exists a CUDA driver context active on the host thread. VdpDevice vdpDevice. asynchronous launches. See also: cudaGraphicsVDPAURegisterVideoSurface. asynchronous launches.86 Returns: cudaSuccess Note: Module Documentation Note that this function may also return error codes from previous. See also: cudaVDPAUSetVDPAUDevice 4.Device to use for VDPAU interoperability vdpDevice .The VdpDevice to interoperate with vdpGetProcAddress . Parameters: device .2.VDPAU’s VdpGetProcAddress function pointer Returns: cudaSuccess. Records the thread as using VDPAU interoperability. cudaErrorSetOnActiveProcess Note: Note that this function may also return error codes from previous.

• cudaError_t cudaGraphicsSubResourceGetMappedArray (struct cudaArray ∗∗array. unsigned int mipLevel) Get an array through which to access a subresource of a mapped graphics resource. cudaGraphicsResource_t ∗ resources.2 4. cudaGraphicsResource_t resource.Resources to map for CUDA Generated for NVIDIA CUDA Library by Doxygen If any of . If resources contains any duplicate entries then cudaErrorInvalidResourceHandle is returned.2. • cudaError_t cudaGraphicsUnregisterResource (cudaGraphicsResource_t resource) Unregisters a graphics resource for access by CUDA. • cudaError_t cudaGraphicsUnmapResources (int count. size_t ∗size. The resources in resources may be accessed by CUDA until they are unmapped. unsigned int flags) Set usage flags for mapping a graphics resource. cudaGraphicsResource_t ∗resources. cudaStream_t stream=0) Map graphics resources for access by CUDA.4.1 Detailed Description This section describes the graphics interoperability functions of the CUDA runtime application programming interface. cudaStream_t stream = 0) Maps the count graphics resources in resources for access by CUDA. 4. The graphics API from which resources were registered should not access any resources while they are mapped by CUDA.1 Function Documentation cudaError_t cudaGraphicsMapResources (int count.14.14. unsigned int arrayIndex.14. Parameters: count . the results are undefined.14 Graphics Interoperability 87 4.14 Graphics Interoperability Functions • cudaError_t cudaGraphicsMapResources (int count. 4. cudaGraphicsResource_t resource) Get an device pointer through which to access a mapped graphics resource.Number of resources to map resources . resources are presently mapped for access by CUDA then cudaErrorUnknown is returned. cudaStream_t stream=0) Unmap graphics resources. This function provides the synchronization guarantee that any graphics calls issued before cudaGraphicsMapResources() will complete before any subsequent CUDA work issued in stream begins. If an application does so. • cudaError_t cudaGraphicsResourceGetMappedPointer (void ∗∗devPtr. cudaGraphicsResource_t ∗resources. • cudaError_t cudaGraphicsResourceSetMapFlags (cudaGraphicsResource_t resource.

Returned size of the buffer accessible starting at ∗devPtr resource . See also: cudaGraphicsResourceGetMappedPointer cudaGraphicsSubResourceGetMappedArray cudaGraphicsUnmapResources 4. cudaGraphicsSubResourceGetMappedArray 4. Changes to flags will take effect the next time resource is mapped. asynchronous launches.88 stream . The flags argument may be any of the following: • cudaGraphicsMapFlagsNone: Specifies no hints about how resource will be used.Mapped resource to access Returns: cudaSuccess.14.2. ∗ Parameters: devPtr .Stream for synchronization Returns: cudaSuccess. cudaErrorUnknown Note: Module Documentation Note that this function may also return error codes from previous.Returned pointer through which resource may be accessed size . cudaErrorInvalidResourceHandle. cudaErrorInvalidValue. Returns in ∗size the size of the memory in bytes which may be accessed from that pointer. cudaErrorUnknown Note: Note that this function may also return error codes from previous. If resource is not mapped then cudaErrorUnknown is returned. • cudaGraphicsMapFlagsReadOnly: Specifies that CUDA will not write to resource. If resource is not a buffer then it cannot be accessed via a pointer and cudaErrorUnknown is returned. See also: cudaGraphicsMapResources.3 cudaError_t cudaGraphicsResourceSetMapFlags (cudaGraphicsResource_t resource. size_t ∗ size. unsigned int flags) Set flags for mapping the graphics resource resource. Generated for NVIDIA CUDA Library by Doxygen .14. asynchronous launches. cudaErrorInvalidResourceHandle. cudaGraphicsResource_t resource) Returns in ∗devPtr a pointer through which the mapped graphics resource resource may be accessed. The value set in devPtr may change every time that resource is mapped.2.2 cudaError_t cudaGraphicsResourceGetMappedPointer (void ∗∗ devPtr. It is therefore assumed that CUDA may read from or write to resource.

If resource is presently mapped for access by CUDA then cudaErrorUnknown is returned. so none of the data previously stored in resource will be preserved.Parameters for resource mapping Returns: cudaSuccess. See also: cudaGraphicsResourceGetMappedPointer Generated for NVIDIA CUDA Library by Doxygen . If flags is not one of the above values then cudaErrorInvalidValue is returned. unsigned int arrayIndex. If resource is not a texture then it cannot be accessed via an array and cudaErrorUnknown is returned. If arrayIndex is not a valid array index for resource then cudaErrorInvalidValue is returned. If resource is not mapped then cudaErrorUnknown is returned. cudaErrorInvalidValue.Array index for array textures or cubemap face index as defined by cudaGraphicsCubeFace for cubemap textures for the subresource to access mipLevel . See also: cudaGraphicsMapResources 4. cudaErrorUnknown Note: Note that this function may also return error codes from previous. cudaErrorUnknown.14. asynchronous launches. cudaErrorInvalidValue. asynchronous launches. If mipLevel is not a valid mipmap level for resource then cudaErrorInvalidValue is returned. Note: Note that this function may also return error codes from previous.Mapped resource to access arrayIndex . Parameters: resource . Parameters: array . cudaGraphicsResource_t resource. cudaErrorInvalidResourceHandle. unsigned int mipLevel) Returns in ∗array an array through which the subresource of the mapped graphics resource resource which corresponds to array index arrayIndex and mipmap level mipLevel may be accessed.14 Graphics Interoperability 89 • cudaGraphicsMapFlagsWriteDiscard: Specifies CUDA will not read from resource and will write over the entire contents of resource.4.Registered resource to set flags for flags . cudaErrorInvalidResourceHandle.2.Returned array through which a subresource of resource may be accessed resource . The value set in array may change every time that resource is mapped.Mipmap level for the subresource to access Returns: cudaSuccess.4 cudaError_t cudaGraphicsSubResourceGetMappedArray (struct cudaArray ∗∗ array.

90 4.Resources to unmap stream .Number of resources to unmap resources . If resource is invalid then cudaErrorInvalidResourceHandle is returned. Once unmapped. If resources contains any duplicate entries then cudaErrorInvalidResourceHandle is returned.2. cudaGraphicsGLRegisterBuffer. the resources in resources may not be accessed by CUDA until they are mapped again. cudaGraphicsResource_t ∗ resources. See also: cudaGraphicsD3D9RegisterResource. cudaErrorUnknown Note: Note that this function may also return error codes from previous. cudaStream_t stream = 0) Unmaps the count graphics resources in resources. cudaGraphicsGLRegisterImage cudaGraph- Generated for NVIDIA CUDA Library by Doxygen . asynchronous launches. This function provides the synchronization guarantee that any CUDA work issued in stream before cudaGraphicsUnmapResources() will complete before any subsequently issued graphics work begins.Stream for synchronization Returns: cudaSuccess. resources are not presently mapped for access by Cuda then cudaErrorUnknown is returned. cudaErrorInvalidResourceHandle. Parameters: resource . icsD3D11RegisterResource. cudaErrorUnknown Note: Note that this function may also return error codes from previous.2.14. cudaErrorInvalidResourceHandle. See also: cudaGraphicsMapResources If any of 4. Parameters: count .6 cudaError_t cudaGraphicsUnregisterResource (cudaGraphicsResource_t resource) Unregisters the graphics resource resource so it is not accessible by CUDA unless registered again.5 Module Documentation cudaError_t cudaGraphicsUnmapResources (int count. cudaGraphicsD3D10RegisterResource.14.Resource to unregister Returns: cudaSuccess. asynchronous launches.

Since the hardware enforces an alignment requirement on texture base addresses. const char ∗symbol) Get the texture reference associated with a symbol. • cudaError_t cudaBindTextureToArray (const struct textureReference ∗texref. • cudaError_t cudaGetTextureAlignmentOffset (size_t ∗offset.15 Texture Reference Management 91 4. const struct cudaArray ∗array. 4. int z. const struct cudaChannelFormatDesc ∗desc. const struct textureReference ∗texref. const struct textureReference ∗ texref. • cudaError_t cudaUnbindTexture (const struct textureReference ∗texref) Unbinds a texture. const void ∗ devPtr. size_t size = UINT_MAX) Binds size bytes of the memory area pointed to by devPtr to the texture reference texref. Any memory previously bound to texref is unbound. const struct cudaChannelFormatDesc ∗desc) Binds an array to a texture.4. • cudaError_t cudaBindTexture2D (size_t ∗offset. size_t size=UINT_MAX) Binds a memory area to a texture. size_t height. cudaBindTexture() returns in ∗offset a byte offset that must be applied to texture fetches in order to read from the desired memory. const struct cudaChannelFormatDesc ∗ desc.2. int w. • cudaError_t cudaGetTextureReference (const struct textureReference ∗∗texref. enum cudaChannelFormatKind f) Returns a channel descriptor using the specified format. const struct cudaArray ∗array) Get the channel descriptor of an array. const struct textureReference ∗texref) Get the alignment offset of a texture. This offset must be divided by the texel size and passed to kernels that read from the texture so they can be applied to the Generated for NVIDIA CUDA Library by Doxygen .1 Detailed Description This section describes the low level texture reference management functions of the CUDA runtime application programming interface.15. const struct textureReference ∗texref.15. const struct cudaChannelFormatDesc ∗desc. 4. int y.15 Texture Reference Management Functions • cudaError_t cudaBindTexture (size_t ∗offset.1 Function Documentation cudaError_t cudaBindTexture (size_t ∗ offset. • cudaError_t cudaGetChannelDesc (struct cudaChannelFormatDesc ∗desc. size_t pitch) Binds a 2D memory area to a texture. size_t width. const void ∗devPtr. • struct cudaChannelFormatDesc cudaCreateChannelDesc (int x.15. desc describes how the memory is interpreted when fetching values from the texture. const void ∗devPtr.2 4.

size_t width.Channel format width .Offset in bytes texref . If the device memory pointer was returned from cudaMalloc().92 Module Documentation tex1Dfetch() function.2 cudaError_t cudaBindTexture2D (size_t ∗ offset. desc describes how the memory is interpreted when fetching values from the texture. cudaGetTextureAlignmentOffset (C API) 4.Channel format size .Texture reference to bind devPtr .2D memory area on device desc . See also: cudaCreateChannelDesc (C API).Width in texel units height . cudaBindTexture2D() returns in ∗offset a byte offset that must be applied to texture fetches in order to read from the desired memory. cudaBindTexture (C++ API). cudaGetChannelDesc. cudaErrorInvalidTexture Note: Note that this function may also return error codes from previous. Since the hardware enforces an alignment requirement on texture base addresses. cudaErrorInvalidValue.Offset in bytes texref . height in texel units.2. cudaErrorInvalidDevicePointer. const struct textureReference ∗ texref. size_t height. the offset is guaranteed to be 0 and NULL may be passed as the offset parameter. cudaBindTexture2D (C API). Any memory previously bound to texref is unbound.Pitch in bytes Returns: cudaSuccess. const void ∗ devPtr. size_t pitch) Binds the 2D memory area pointed to by devPtr to the texture reference texref. The size of the area is constrained by width in texel units.Memory area on device desc . cudaErrorInvalidValue.Height in texel units pitch .Size of the memory area pointed to by devPtr Returns: cudaSuccess.15. cudaBindTextureToArray (C API). Parameters: offset . Parameters: offset . and pitch in byte units. cudaGetTextureReference. cudaUnbindTexture (C API). If the device memory pointer was returned from cudaMalloc(). cudaErrorInvalidDevicePointer. This offset must be divided by the texel size and passed to kernels that read from the texture so they can be applied to the tex2D() function.Texture to bind devPtr . const struct cudaChannelFormatDesc ∗ desc. the offset is guaranteed to be 0 and NULL may be passed as the offset parameter. cudaErrorInvalidTexture Generated for NVIDIA CUDA Library by Doxygen . asynchronous launches.

See also: 93 cudaCreateChannelDesc (C API). int z. cudaGetChannelDesc. int y.Memory array on device desc .2. inherited channel descriptor). cudaUnbindTexture (C API). }. See also: cudaCreateChannelDesc (C API). Any CUDA array previously bound to texref is unbound. cudaErrorInvalidTexture Note: Note that this function may also return error codes from previous.3 cudaError_t cudaBindTextureToArray (const struct textureReference ∗ texref. cudaGetTextureAlignmentOffset (C API) 4. cudaGetTextureReference. cudaBindTexture2D (C API).Y component Generated for NVIDIA CUDA Library by Doxygen . enum cudaChannelFormatKind f) [read] Returns a channel descriptor with format f and number of bits of each component x. cudaBindTextureToArray (C API). and w. cudaBindTexture (C API). w. Parameters: texref . y.15. const struct cudaArray ∗ array. enum cudaChannelFormatKind f. cudaBindTextureToArray (C++ API). int w. The cudaChannelFormatDesc is defined as: struct cudaChannelFormatDesc { int x. where cudaChannelFormatKind is one of cudaChannelFormatKindSigned.X component y . cudaChannelFormatKindUnsigned.Channel format Returns: cudaSuccess. cudaBindTexture2D (C++ API. cudaErrorInvalidValue. cudaBindTextureToArray (C API). or cudaChannelFormatKindFloat.4 struct cudaChannelFormatDesc cudaCreateChannelDesc (int x. Parameters: x .2. cudaGetTextureReference. asynchronous launches. z. cudaBindTexture2D (C++ API). cudaErrorInvalidDevicePointer. cudaBindTexture (C API).15 Texture Reference Management Note: Note that this function may also return error codes from previous.15. cudaGetChannelDesc. z. y.Texture to bind array . desc describes how the memory is interpreted when fetching values from the texture.4. cudaGetTextureAlignmentOffset (C API) 4. const struct cudaChannelFormatDesc ∗ desc) Binds the CUDA array array to the texture reference texref. asynchronous launches.

cudaGetTextureAlignmentOffset (C API) 4. cudaBindTextureToArray (C API).Channel format Returns: Channel descriptor with format f See also: Module Documentation cudaCreateChannelDesc (C++ API). const struct textureReference ∗ texref) Returns in ∗offset the offset that was returned when texture reference texref was bound. cudaErrorInvalidTextureBinding Note: Note that this function may also return error codes from previous.15. cudaBindTexture (C API).15. Parameters: offset . cudaUnbindTexture (C API). cudaUnbindTexture (C API). cudaGetTextureReference.W component f . const struct cudaArray ∗ array) Returns in ∗desc the channel descriptor of the CUDA array array.Channel format array . asynchronous launches. cudaGetTextureAlignmentOffset (C API) 4.94 z . cudaErrorInvalidTexture.Z component w . cudaBindTextureToArray (C API). cudaBindTexture (C API). cudaGetTextureReference. cudaGetChannelDesc. asynchronous launches.6 cudaError_t cudaGetTextureAlignmentOffset (size_t ∗ offset.2.Offset of texture reference in bytes texref . cudaBindTexture2D (C API).2.Memory array on device Returns: cudaSuccess. See also: cudaCreateChannelDesc (C API).5 cudaError_t cudaGetChannelDesc (struct cudaChannelFormatDesc ∗ desc.Texture to get offset of Returns: cudaSuccess. cudaErrorInvalidValue Note: Note that this function may also return error codes from previous. Parameters: desc . cudaBindTexture2D (C API). Generated for NVIDIA CUDA Library by Doxygen .

cudaBindTexture (C API).Texture associated with symbol symbol .2. cudaBindTextureToArray (C API).Symbol to find texture reference for Returns: cudaSuccess.15 Texture Reference Management See also: 95 cudaCreateChannelDesc (C API). cudaBindTexture (C API). See also: cudaCreateChannelDesc (C API). cudaGetChannelDesc. cudaGetTextureAlignmentOffset (C API) Generated for NVIDIA CUDA Library by Doxygen . Parameters: texref . cudaErrorInvalidTexture Note: Note that this function may also return error codes from previous. cudaGetChannelDesc. cudaGetTextureAlignmentOffset (C++ API) 4.15. See also: cudaCreateChannelDesc (C API). asynchronous launches.8 cudaError_t cudaUnbindTexture (const struct textureReference ∗ texref) Unbinds the texture bound to texref. cudaBindTextureToArray (C API). cudaGetTextureReference. cudaUnbindTexture (C API). cudaGetTextureAlignmentOffset (C API). cudaBindTextureToArray (C API). const char ∗ symbol) Returns in ∗texref the structure associated to the texture reference defined by symbol symbol. cudaGetChannelDesc.2.15.Texture to unbind Returns: cudaSuccess Note: Note that this function may also return error codes from previous. cudaGetTextureReference. cudaUnbindTexture (C++ API). cudaUnbindTexture (C API) 4. cudaBindTexture2D (C API).4. cudaBindTexture2D (C API). Parameters: texref . cudaBindTexture (C API).7 cudaError_t cudaGetTextureReference (const struct textureReference ∗∗ texref. asynchronous launches. cudaBindTexture2D (C API).

Any CUDA array previously bound to surfref is unbound. const char ∗ symbol) Returns in ∗surfref the structure associated to the surface reference defined by symbol symbol. asynchronous launches. Parameters: surfref .1 Function Documentation cudaError_t cudaBindSurfaceToArray (const struct surfaceReference ∗ surfref.2 cudaError_t cudaGetSurfaceReference (const struct surfaceReference ∗∗ surfref.16 Surface Reference Management Functions • cudaError_t cudaBindSurfaceToArray (const struct surfaceReference ∗surfref. const char ∗symbol) Get the surface reference associated with a symbol.16.16. • cudaError_t cudaGetSurfaceReference (const struct surfaceReference ∗∗surfref. cudaErrorInvalidValue. desc describes how the memory is interpreted when fetching values from the surface. inherited channel descriptor). Parameters: surfref . See also: cudaBindSurfaceToArray (C++ API). 4.1 Detailed Description This section describes the low level surface reference management functions of the CUDA runtime application programming interface.2.Channel format Returns: cudaSuccess.2. const struct cudaArray ∗ array. const struct cudaArray ∗array. cudaGetSurfaceReference 4.96 Module Documentation 4. const struct cudaChannelFormatDesc ∗desc) Binds an array to a surface.2 4.16.16. cudaErrorInvalidSurface Note: Note that this function may also return error codes from previous.Surface to bind array . cudaBindSurfaceToArray (C++ API.Memory array on device desc . 4.Surface associated with symbol Generated for NVIDIA CUDA Library by Doxygen . const struct cudaChannelFormatDesc ∗ desc) Binds the CUDA array array to the surface reference surfref.

4.Symbol to find surface reference for Returns: cudaSuccess. See also: cudaBindSurfaceToArray (C API) 97 Generated for NVIDIA CUDA Library by Doxygen . cudaErrorInvalidSurface Note: Note that this function may also return error codes from previous.16 Surface Reference Management symbol . asynchronous launches.

cudaErrorInvalidValue See also: cudaDriverGetVersion Generated for NVIDIA CUDA Library by Doxygen . cudaErrorInvalidValue Note: Note that this function may also return error codes from previous.Returns the CUDA driver version.17. Parameters: runtimeVersion .17.2 cudaError_t cudaRuntimeGetVersion (int ∗ runtimeVersion) Returns in ∗runtimeVersion the version number of the installed CUDA Runtime. 4.1 Function Documentation cudaError_t cudaDriverGetVersion (int ∗ driverVersion) Returns in ∗driverVersion the version number of the installed CUDA driver.1 4. This function automatically returns cudaErrorInvalidValue if the runtimeVersion argument is NULL.1. • cudaError_t cudaRuntimeGetVersion (int ∗runtimeVersion) Returns the CUDA Runtime version.Returns the CUDA Runtime version. If no driver is installed. This function automatically returns cudaErrorInvalidValue if the driverVersion argument is NULL.17. Returns: cudaSuccess. Returns: cudaSuccess. asynchronous launches. See also: cudaRuntimeGetVersion 4.98 Module Documentation 4. then 0 is returned as the driver version (via driverVersion).1. Parameters: driverVersion .17 Version Management Functions • cudaError_t cudaDriverGetVersion (int ∗driverVersion) Returns the CUDA driver version.

int dim> cudaError_t cudaBindSurfaceToArray (const struct surface< T. int dim. size_t size=UINT_MAX) [C++ API] Binds a memory area to a texture • template<class T . enum cudaTextureReadMode readMode> cudaError_t cudaBindTextureToArray (const struct texture< T. const struct cudaArray ∗array. enum cudaTextureReadMode readMode> cudaError_t cudaBindTexture2D (size_t ∗offset. const struct cudaChannelFormatDesc &desc) [C++ API] Binds an array to a surface • template<class T . int dim> cudaError_t cudaBindSurfaceToArray (const struct surface< T. const void ∗devPtr. const struct cudaChannelFormatDesc &desc) [C++ API] Binds an array to a texture • template<class T > cudaChannelFormatDesc cudaCreateChannelDesc (void) [C++ API] Returns a channel descriptor using the specified format • cudaError_t cudaEventCreate (cudaEvent_t ∗event. size_t size=UINT_MAX) [C++ API] Binds a memory area to a texture • template<class T . dim > &surf. dim. dim. readMode > &tex. enum cudaTextureReadMode readMode> cudaError_t cudaBindTexture (size_t ∗offset. const struct cudaChannelFormatDesc &desc. const struct cudaArray ∗array) [C++ API] Binds an array to a surface • template<class T . size_t width. size_t height. readMode > &tex. const struct cudaArray ∗array. readMode > &tex. size_t width. int dim. unsigned int flags) [C++ API] Creates an event object with the specified flags Generated for NVIDIA CUDA Library by Doxygen . const void ∗devPtr.18 C++ API Routines C++-style interface built on top of CUDA runtime API. enum cudaTextureReadMode readMode> cudaError_t cudaBindTexture2D (size_t ∗offset. dim. dim. int dim.4. size_t pitch) [C++ API] Binds a 2D memory area to a texture • template<class T . readMode > &tex. const struct cudaChannelFormatDesc &desc. Functions • template<class T . const struct texture< T. const void ∗devPtr. int dim. size_t pitch) [C++ API] Binds a 2D memory area to a texture • template<class T . dim. int dim. readMode > &tex. const struct cudaArray ∗array) [C++ API] Binds an array to a texture • template<class T .18 C++ API Routines 99 4. const void ∗devPtr. const struct texture< T. dim > &surf. readMode > &tex. enum cudaTextureReadMode readMode> cudaError_t cudaBindTextureToArray (const struct texture< T. size_t height. dim. const struct texture< T. const struct texture< T. int dim. enum cudaTextureReadMode readMode> cudaError_t cudaBindTexture (size_t ∗offset.

100 Module Documentation • template<class T > cudaError_t cudaFuncGetAttributes (struct cudaFuncAttributes ∗attr. • template<class T > cudaError_t cudaGetSymbolAddress (void ∗∗devPtr. readMode > &tex) [C++ API] Get the alignment offset of a texture • template<class T > cudaError_t cudaLaunch (T ∗entry) [C++ API] Launches a device function • cudaError_t cudaMallocHost (void ∗∗ptr. readMode > &tex) [C++ API] Unbinds a texture 4. int dim.2 4. The channel descriptor is inherited from the CUDA array. enum cudaTextureReadMode readMode> cudaError_t cudaGetTextureAlignmentOffset (size_t ∗offset. dim. const struct cudaArray ∗ array) Binds the CUDA array array to the surface reference surf. const T &symbol) [C++ API] Finds the address associated with a CUDA symbol • template<class T > cudaError_t cudaGetSymbolSize (size_t ∗size. dim. enum cudaFuncCache cacheConfig) Sets the preferred cache configuration for a device function.1 Function Documentation template<class T . const struct texture< T. 4. your application needs to be compiled with the nvcc compiler. dim > & surf. Any CUDA array previously bound to surf is unbound. enum cudaTextureReadMode readMode> cudaError_t cudaUnbindTexture (const struct texture< T. int dim. unsigned int flags) [C++ API] Allocates page-locked memory on the host • template<class T > cudaError_t cudaSetupArgument (T arg. T ∗entry) [C++ API] Find out attributes for a given function • template<class T > cudaError_t cudaFuncSetCacheConfig (T ∗func.18.2. size_t offset) [C++ API] Configure a device launch • template<class T . size_t size. const T &symbol) [C++ API] Finds the size of the object associated with a CUDA symbol • template<class T . Generated for NVIDIA CUDA Library by Doxygen .18.1 Detailed Description This section describes the C++ high level API functions of the CUDA runtime application programming interface. int dim> cudaError_t cudaBindSurfaceToArray (const struct surface< T.18. To use these functions.

Texture to bind Generated for NVIDIA CUDA Library by Doxygen . size_t size = UINT_MAX) Binds size bytes of the memory area pointed to by devPtr to texture reference tex. Any memory previously bound to tex is unbound. cudaBindSurfaceToArray (C++ API) 101 4. cudaErrorInvalidSurface Note: Note that this function may also return error codes from previous. const void∗. const struct texture< T. const struct cudaChannelFormatDesc∗. See also: cudaBindSurfaceToArray (C API).18 C++ API Routines Parameters: surf . asynchronous launches. desc describes how the memory is interpreted when dealing with the surface. inherited channel descriptor) 4. The offset parameter is an optional byte offset as with the low-level cudaBindTexture(size_t∗.Memory array on device desc . cudaErrorInvalidValue. Parameters: surf .Memory array on device Returns: cudaSuccess. See also: cudaBindSurfaceToArray (C API).Surface to bind array .4.2.18. asynchronous launches. enum cudaTextureReadMode readMode> cudaError_t cudaBindTexture (size_t ∗ offset. cudaBindSurfaceToArray (C++ API. The channel descriptor is inherited from the texture reference type. Parameters: offset . dim. Any CUDA array previously bound to surf is unbound. const struct textureReference∗.Channel format Returns: cudaSuccess. int dim> cudaError_t cudaBindSurfaceToArray (const struct surface< T. const struct cudaArray ∗ array. cudaErrorInvalidSurface Note: Note that this function may also return error codes from previous. dim > & surf.Surface to bind array . int dim. const void ∗ devPtr.18.2 template<class T . readMode > & tex.Offset in bytes tex .2. cudaErrorInvalidValue.3 template<class T . const struct cudaChannelFormatDesc & desc) Binds the CUDA array array to the surface reference surf. size_t) function.

cudaBindTextureToArray (C++ API). cudaErrorInvalidTexture Note: Note that this function may also return error codes from previous. Parameters: offset . readMode > & tex.2. size_t size = UINT_MAX) Binds size bytes of the memory area pointed to by devPtr to texture reference tex. cudaBindTexture2D (C++ API. cudaBindTexture (C++ API. inherited channel descriptor). cudaGetTextureAlignmentOffset (C++ API) 4. dim. cudaBindTexture (C++ API). cudaUnbindTexture (C++ API).Offset in bytes tex . inherited channel descriptor).Memory area on device desc . cudaErrorInvalidValue. cudaBindTexture (C API). cudaBindTexture2D (C++ API). cudaBindTextureToArray (C++ API. cudaErrorInvalidDevicePointer. cudaGetTextureReference. Any memory previously bound to tex is unbound. cudaErrorInvalidDevicePointer. inherited channel descriptor).102 devPtr .Texture to bind devPtr . See also: cudaCreateChannelDesc (C++ API). cudaErrorInvalidValue. cudaBindTextureToArray (C++ API. cudaBindTexture (C API). cudaGetChannelDesc. cudaBindTexture2D (C++ API). const void ∗ devPtr. cudaGetChannelDesc. const struct cudaChannelFormatDesc & desc. desc describes how the memory is interpreted when fetching values from the texture.Size of the memory area pointed to by devPtr Returns: cudaSuccess. cudaGetTextureAlignmentOffset (C++ API) Generated for NVIDIA CUDA Library by Doxygen . cudaErrorInvalidTexture Note: Note that this function may also return error codes from previous. cudaUnbindTexture (C++ API). enum cudaTextureReadMode readMode> cudaError_t cudaBindTexture (size_t ∗ offset.18. cudaBindTextureToArray (C++ API). int dim. inherited channel descriptor).Channel format size . asynchronous launches. asynchronous launches.Memory area on device size . cudaGetTextureReference. cudaBindTexture2D (C++ API.Size of the memory area pointed to by devPtr Returns: Module Documentation cudaSuccess. The offset parameter is an optional byte offset as with the low-level cudaBindTexture() function. inherited channel descriptor).4 template<class T . const struct texture< T. See also: cudaCreateChannelDesc (C++ API).

cudaErrorInvalidTexture Note: Note that this function may also return error codes from previous. Any memory previously bound to tex is unbound. int dim. If the device memory pointer was returned from cudaMalloc(). Since the hardware enforces an alignment requirement on texture base addresses. The size of the area is constrained by width in texel units. enum cudaTextureReadMode readMode> cudaError_t cudaBindTexture2D (size_t ∗ offset. The size of the area is constrained by width in texel units. cudaBindTextureToArray (C++ API.18.2. Parameters: offset . readMode > & tex. the offset is guaranteed to be 0 and NULL may be passed as the offset parameter. The channel descriptor is inherited from the texture reference type. the offset is guaranteed to be 0 and NULL may be passed as the offset parameter. cudaErrorInvalidValue. desc describes how the memory is interpreted when fetching values from the texture. size_t width.Offset in bytes Generated for NVIDIA CUDA Library by Doxygen . size_t width. height in texel units. size_t pitch) Binds the 2D memory area pointed to by devPtr to the texture reference tex.4. cudaBindTexture2D (C++ API). inherited channel descriptor).5 103 template<class T . cudaBindTexture (C++ API). size_t pitch) Binds the 2D memory area pointed to by devPtr to the texture reference tex.18. height in texel units. readMode > & tex. Since the hardware enforces an alignment requirement on texture base addresses. This offset must be divided by the texel size and passed to kernels that read from the texture so they can be applied to the tex2D() function.Height in texel units pitch . const void ∗ devPtr. If the device memory pointer was returned from cudaMalloc().18 C++ API Routines 4. cudaBindTexture2D() returns in ∗offset a byte offset that must be applied to texture fetches in order to read from the desired memory. size_t height. enum cudaTextureReadMode readMode> cudaError_t cudaBindTexture2D (size_t ∗ offset. cudaErrorInvalidDevicePointer. inherited channel descriptor). const void ∗ devPtr. cudaGetTextureAlignmentOffset (C++ API) 4.2D memory area on device width . cudaBindTexture2D (C API). and pitch in byte units. cudaBindTexture (C++ API. See also: cudaCreateChannelDesc (C++ API).Texture reference to bind devPtr . dim. const struct texture< T.Width in texel units height . cudaGetTextureReference. Parameters: offset .2. cudaUnbindTexture (C++ API). cudaBindTexture2D() returns in ∗offset a byte offset that must be applied to texture fetches in order to read from the desired memory. This offset must be divided by the texel size and passed to kernels that read from the texture so they can be applied to the tex2D() function. dim. cudaGetChannelDesc. Any memory previously bound to tex is unbound. const struct texture< T.Pitch in bytes Returns: cudaSuccess. cudaBindTextureToArray (C++ API).Offset in bytes tex . const struct cudaChannelFormatDesc & desc.6 template<class T . int dim. size_t height. asynchronous launches. and pitch in byte units.

cudaErrorInvalidTexture Note: Note that this function may also return error codes from previous. cudaBindTexture (C++ API. cudaUnbindTexture (C++ API). int dim. const struct cudaArray ∗ array) Binds the CUDA array array to the texture reference tex. cudaGetTextureReference. cudaErrorInvalidTexture Note: Note that this function may also return error codes from previous. cudaErrorInvalidValue. asynchronous launches.Width in texel units height .7 template<class T . See also: cudaCreateChannelDesc (C++ API). cudaBindTexture2D (C API). cudaGetTextureAlignmentOffset (C++ API) Generated for NVIDIA CUDA Library by Doxygen .104 tex . cudaBindTexture2D (C++ API). cudaBindTexture2D (C++ API. cudaGetTextureReference.Memory array on device Returns: cudaSuccess. Any CUDA array previously bound to tex is unbound.Height in texel units pitch . inherited channel descriptor). cudaGetChannelDesc. inherited channel descriptor). inherited channel descriptor). readMode > & tex. enum cudaTextureReadMode readMode> cudaError_t cudaBindTextureToArray (const struct texture< T. inherited channel descriptor). cudaBindTexture2D (C++ API. cudaBindTexture (C++ API. cudaUnbindTexture (C++ API). cudaErrorInvalidValue. cudaBindTextureToArray (C API). inherited channel descriptor). dim. cudaBindTextureToArray (C++ API). cudaErrorInvalidDevicePointer.Channel format width . See also: cudaCreateChannelDesc (C++ API).Texture reference to bind devPtr . cudaBindTextureToArray (C++ API. Parameters: tex .2.2D memory area on device desc . cudaBindTextureToArray (C++ API). cudaGetTextureAlignmentOffset (C++ API) 4.18. cudaBindTexture (C++ API). cudaGetChannelDesc. The channel descriptor is inherited from the CUDA array. cudaBindTexture (C++ API). cudaErrorInvalidDevicePointer.Pitch in bytes Returns: Module Documentation cudaSuccess.Texture to bind array . asynchronous launches.

inherited channel descriptor). cudaBindTexture (C++ API. cudaChannelFormatKindUnsigned. The cudaChannelFormatDesc is defined as: struct cudaChannelFormatDesc { int x. cudaErrorInvalidValue. cudaGetTextureReference. dim.18 C++ API Routines 4. inherited channel descriptor). cudaBindTexture (High level. z. cudaBindTextureToArray (High level). cudaGetTextureAlignmentOffset (C++ API) 4. inherited channel descriptor). cudaGetChannelDesc. cudaUnbindTexture (High level). cudaErrorInvalidDevicePointer. Parameters: tex . and w. asynchronous launches.Texture to bind array . cudaUnbindTexture (C++ API). const struct cudaArray ∗ array. w.18. int dim. enum cudaTextureReadMode readMode> cudaError_t cudaBindTextureToArray (const struct texture< T. }. y.2. cudaBindTexture2D (C++ API.Channel format Returns: cudaSuccess. cudaBindTexture (C++ API). enum cudaChannelFormatKind f. z. cudaBindTextureToArray (High level.18.8 105 template<class T . or cudaChannelFormatKindFloat. See also: cudaCreateChannelDesc (C++ API). cudaGetTextureReference.2. inherited channel descriptor). const struct cudaChannelFormatDesc & desc) Binds the CUDA array array to the texture reference tex. where cudaChannelFormatKind is one of cudaChannelFormatKindSigned. cudaErrorInvalidTexture Note: Note that this function may also return error codes from previous. cudaGetTextureAlignmentOffset (High level) Generated for NVIDIA CUDA Library by Doxygen . readMode > & tex. cudaBindTextureToArray (C++ API. Returns: Channel descriptor with format f See also: cudaCreateChannelDesc (Low level). cudaBindTextureToArray (C API).9 template<class T > cudaChannelFormatDesc cudaCreateChannelDesc (void) Returns a channel descriptor with format f and number of bits of each component x. cudaBindTexture2D (C++ API).4. inherited channel descriptor). cudaGetChannelDesc. Any CUDA array previously bound to tex is unbound.Memory array on device desc . y. desc describes how the memory is interpreted when fetching values from the texture. cudaBindTexture (High level). cudaBindTexture2D (High level).

Function to get attributes of Returns: cudaSuccess.18. asynchronous launches. The parameter specified by entry must be declared as a __global__ function. If the specified function does not exist.Newly created event flags . T ∗ entry) This function obtains the attributes of a function specified via entry. Valid flags include: • cudaEventDefault: Default event creation flag. cudaEventCreateWithFlags.Return pointer to function’s attributes entry .Flags for new event Returns: cudaSuccess. cudaEventSynchronize. The parameter entry can either be a pointer to a function that executes on the device. • cudaEventDisableTiming: Specifies that the created event does not need to record timing data. cudaEventQuery. then cudaErrorInvalidDeviceFunction is returned. Parameters: attr . or it can be a character string specifying the fully-decorated (C++) name of a function that executes on the device. cudaStreamWaitEvent 4. Events created with this flag specified and the cudaEventBlockingSync flag not specified will provide the best performance when used with cudaStreamWaitEvent() and cudaEventQuery(). cudaErrorInvalidDeviceFunction Note: Note that this function may also return error codes from previous. cudaErrorInvalidValue. Note that some function attributes such as maxThreadsPerBlock may vary based on the device that is currently being used.11 template<class T > cudaError_t cudaFuncGetAttributes (struct cudaFuncAttributes ∗ attr.106 4. asynchronous launches. A host thread that uses cudaEventSynchronize() to wait on an event created with this flag will block until the event actually completes. cudaEventElapsedTime. cudaEventRecord. cudaErrorLaunchFailure.10 cudaError_t cudaEventCreate (cudaEvent_t ∗ event. cudaErrorInitializationError. cudaEventDestroy. Generated for NVIDIA CUDA Library by Doxygen . cudaErrorInitializationError. unsigned int flags) Module Documentation Creates an event object with the specified flags. The fetched attributes are placed in attr. cudaErrorMemoryAllocation Note: Note that this function may also return error codes from previous. • cudaEventBlockingSync: Specifies that event should use blocking synchronization.2.18.2. See also: cudaEventCreate (C API). Parameters: event .

cudaSetDoubleForHost. cudaSetDoubleForDevice. cudaFuncSetCacheConfig (C API). asynchronous launches. or it can be a character string. Generated for NVIDIA CUDA Library by Doxygen . cudaLaunch (C++ API). or if symbol is not declared in the global or constant memory space. If there are multiple global or constant variables with the same string name (from separate files) and the lookup is done via character string.18 C++ API Routines See also: 107 cudaConfigureCall.2.4.Char string naming device function cacheConfig . cudaErrorInvalidDeviceFunction Note: Note that this function may also return error codes from previous. ∗devPtr is unchanged and the error cudaErrorInvalidSymbol is returned. If symbol cannot be found. cudaThreadSetCacheConfig 4. cudaFuncSetCacheConfig (C++ API). The parameter specified by func must be declared as a __global__ function. or it can be a character string specifying the fully-decorated (C++) name for a function that executes on the device. cudaErrorInitializationError. This is only a preference.18. symbol can either be a variable that resides in global or constant memory space. but it is free to choose a different configuration if required to execute func.12 template<class T > cudaError_t cudaFuncSetCacheConfig (T ∗ func. This setting does nothing on devices where the size of the L1 cache and shared memory are fixed. const T & symbol) Returns in ∗devPtr the address of symbol symbol on the device. cudaSetupArgument (C++ API) 4. Launching a kernel with a different preference than the most recent preference setting may insert a device-side synchronization point. cudaFuncGetAttributes (C++ API). cudaFuncGetAttributes (C API).13 template<class T > cudaError_t cudaGetSymbolAddress (void ∗∗ devPtr. cudaErrorDuplicateVariableName is returned. cudaThreadGetCacheConfig. cudaSetDoubleForDevice. cudaSetDoubleForHost. If the specified function does not exist. See also: cudaConfigureCall. naming a variable that resides in global or constant memory space.2. cudaLaunch (C API). then cudaErrorInvalidDeviceFunction is returned. enum cudaFuncCache cacheConfig) On devices where the L1 cache and shared memory use the same hardware resources. func can either be a pointer to a function that executes on the device. cudaSetupArgument (C++ API).18. this sets through cacheConfig the preferred cache configuration for the function specified via func.Requested cache configuration Returns: cudaSuccess. The supported cache configurations are: • cudaFuncCachePreferNone: no preference for shared memory or L1 (default) • cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache • cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory Parameters: func . The runtime will use the requested configuration if possible.

2. or it can be a character string. cudaErrorInvalidTexture. dim. cudaErrorDuplicateVariableName Note: Note that this function may also return error codes from previous. naming a variable that resides in global or constant memory space.14 template<class T > cudaError_t cudaGetSymbolSize (size_t ∗ size.Global/constant variable or string symbol to search for Returns: cudaSuccess.Size of object associated with symbol symbol . cudaErrorInvalidSymbol. If symbol cannot be found. asynchronous launches. See also: cudaGetSymbolAddress (C API) cudaGetSymbolSize (C++ API) 4. cudaErrorDuplicateVariableName is returned.108 Parameters: devPtr . symbol can either be a variable that resides in global or constant memory space.Return device pointer associated with symbol symbol .18. cudaErrorInvalidTextureBinding Generated for NVIDIA CUDA Library by Doxygen . enum cudaTextureReadMode readMode> cudaError_t cudaGetTextureAlignmentOffset (size_t ∗ offset. cudaErrorInvalidSymbol. See also: cudaGetSymbolAddress (C++ API) cudaGetSymbolSize (C API) 4. Parameters: size .2. const T & symbol) Returns in ∗size the size of symbol symbol.18. cudaErrorDuplicateVariableName Note: Module Documentation Note that this function may also return error codes from previous.15 template<class T . ∗size is unchanged and the error cudaErrorInvalidSymbol is returned. asynchronous launches.Texture to get offset of Returns: cudaSuccess. int dim. If there are multiple global variables with the same string name (from separate files) and the lookup is done via character string. or if symbol is not declared in global or constant memory space. Parameters: offset . readMode > & tex) Returns in ∗offset the offset that was returned when texture reference tex was bound. const struct texture< T.Global variable or string symbol to find size of Returns: cudaSuccess.Offset of texture reference in bytes tex .

unsigned int flags) Allocates size bytes of host memory that is page-locked and accessible to the device. cudaUnbindTexture (C++ API). naming a function that executes on the device. inherited channel descriptor). The parameter specified by entry must be declared as a __global__ function. • cudaHostAllocPortable: The memory returned by this call will be considered as pinned memory by all CUDA contexts. inherited channel descriptor). See also: cudaConfigureCall. size_t size. cudaFuncSetCacheConfig (C++ API). cudaErrorInvalidDeviceFunction. cudaThreadSetCacheConfig 4. cudaErrorSharedObjectInitFailed Note: Note that this function may also return error codes from previous. cudaSetupArgument (C++ API). The driver tracks the virtual memory ranges allocated with this function and automatically accelerates calls to functions such as cudaMemcpy(). cudaErrorLaunchTimeout. cudaSetDoubleForDevice. cudaErrorInvalidConfiguration.18.18. cudaBindTexture2D (C++ API. cudaFuncGetAttributes (C++ API). Generated for NVIDIA CUDA Library by Doxygen .16 template<class T > cudaError_t cudaLaunch (T ∗ entry) Launches the function entry on the device. Parameters: entry . cudaErrorLaunchFailure. cudaLaunch() must be preceded by a call to cudaConfigureCall() since it pops the data that was pushed by cudaConfigureCall() from the execution stack. asynchronous launches. See also: 109 cudaCreateChannelDesc (C++ API).17 cudaError_t cudaMallocHost (void ∗∗ ptr.2.2.18 C++ API Routines Note: Note that this function may also return error codes from previous.4. cudaGetTextureAlignmentOffset (C API) 4. The flags parameter enables different options to be specified that affect the allocation. cudaBindTexture (C++ API). cudaThreadGetCacheConfig.Device function pointer or char string naming device function to execute Returns: cudaSuccess. cudaLaunch (C API). cudaBindTexture (C++ API. this function is best used sparingly to allocate staging areas for data exchange between host and device. asynchronous launches. it can be read or written with much higher bandwidth than pageable memory obtained with functions such as malloc(). cudaSetDoubleForHost. As a result. Allocating excessive amounts of pinned memory may degrade system performance. since it reduces the amount of memory available to the system for paging. • cudaHostAllocDefault: This flag’s value is defined to be 0. as follows. cudaErrorLaunchOutOfResources. cudaBindTextureToArray (C++ API). not just the one that performed the allocation. Since the memory can be accessed directly by the device. or it can be a character string. cudaGetChannelDesc. cudaErrorSharedObjectSymbolNotFound. cudaBindTexture2D (C++ API). cudaBindTextureToArray (C++ API. The parameter entry can either be a function that executes on the device. inherited channel descriptor). cudaGetTextureReference.

but cannot be read efficiently by most CPUs.2. All of these flags are orthogonal to one another: a developer may allocate memory that is portable. cudaSetDeviceFlags() must have been called with the cudaDeviceMapHost flag in order for the cudaHostAllocMapped flag to have any effect.Device pointer to allocated memory size . asynchronous launches.Requested properties of allocated memory Returns: cudaSuccess. which starts at offset 0.18 template<class T > cudaError_t cudaSetupArgument (T arg. cudaSetupArgument() must be preceded by a call to cudaConfigureCall(). Parameters: arg . WC memory can be transferred across the PCI Express bus more quickly on some system configurations. cudaErrorMemoryAllocation Note: Note that this function may also return error codes from previous. asynchronous launches. mapped and/or write-combined with no restrictions.18. • cudaHostAllocWriteCombined: Allocates the memory as write-combined (WC). Memory allocated by this function must be freed with cudaFreeHost(). cudaHostAlloc 4.Argument to push for a kernel launch offset . cudaMallocHost (C API). The cudaHostAllocMapped flag may be specified on CUDA contexts for devices that do not support mapped pinned memory. Parameters: ptr . The device pointer to the memory may be obtained by calling cudaHostGetDevicePointer().Requested allocation size in bytes flags . size_t offset) Pushes size bytes of the argument pointed to by arg at offset bytes from the start of the parameter passing area. cudaFreeHost. See also: cudaSetDeviceFlags. Generated for NVIDIA CUDA Library by Doxygen .110 Module Documentation • cudaHostAllocMapped: Maps the allocation into the CUDA address space. WC memory is a good option for buffers that will be written by the CPU and read by the device via mapped pinned memory or host->device transfers. The failure is deferred to cudaHostGetDevicePointer() because the memory may be mapped into other CUDA contexts via the cudaHostAllocPortable flag. The arguments are stored in the top of the execution stack.Offset in argument stack to push new arg Returns: cudaSuccess Note: Note that this function may also return error codes from previous.

18. enum cudaTextureReadMode readMode> cudaError_t cudaUnbindTexture (const struct texture< T.2. cudaSetDoubleForHost. asynchronous launches. cudaSetupArgument (C API) 4. cudaBindTexture (C++ API). cudaUnbindTexture (C API). cudaBindTexture (C++ API. cudaGetChannelDesc. Parameters: tex . int dim. cudaBindTexture2D (C++ API). cudaLaunch (C++ API). inherited channel descriptor). See also: cudaCreateChannelDesc (C++ API). cudaGetTextureAlignmentOffset (C++ API) Generated for NVIDIA CUDA Library by Doxygen . cudaBindTexture2D (C++ API. cudaBindTextureToArray (C++ API.18 C++ API Routines See also: 111 cudaConfigureCall. inherited channel descriptor). cudaGetTextureReference.19 template<class T . cudaSetDoubleForDevice. dim. cudaFuncGetAttributes (C++ API). inherited channel descriptor). cudaBindTextureToArray (C++ API). readMode > & tex) Unbinds the texture bound to tex.Texture to unbind Returns: cudaSuccess Note: Note that this function may also return error codes from previous.4.

In order to use a struct cudaArray ∗ in a CUDA Driver API function which takes a CUarray.19. it is necessary to explicitly cast the CUarray to a struct cudaArray ∗. and is incremented by cuCtxAttach and decremented by cuCtxDetach. If a CUcontext is created by the CUDA Runtime. 4. The lifetime of a CUcontext is managed by a reference counting mechanism. if a CUcontext is moved from one thread to another (using cuCtxPopCurrent and cuCtxPushCurrent) then all CUDA Runtime API state will move to that thread as well. If a CUcontext is created by the CUDA Driver API (or is created by a separate instance of the CUDA Runtime API library). global variables’ addresses and values) travels with its underlying CUcontext. cudaSetValidDevices.4 Interactions between CUarray and struct cudaArray ∗ The types CUarray and struct cudaArray ∗ represent the same data type and may be used interchangeably by casting the two types between each other.3 Interactions between CUevent and cudaEvent_t The types CUevent and cudaEvent_t are identical and may be used interchangeably. cudaGLSetGLDevice. If there exists no CUDA Driver API CUcontext bound to the current thread at the time of a CUDA Runtime API call which requires a CUcontext then the CUDA Runtime will implicitly create a new CUcontext before executing the call. If the CUDA Runtime creates a CUcontext then the CUcontext will be created using the parameters specified by the CUDA Runtime API functions cudaSetDevice. In particular. The reference count of a CUcontext is initially set to 0. 4. then the CUDA Runtime will not increment or decrement the reference count of that CUcontext. cudaD3D9SetDirect3DDevice.19. In order to use a CUarray in a CUDA Runtime API function which takes a struct cudaArray ∗.1 Context Management CUDA Runtime API calls operate on the CUDA Driver API CUcontext which is bound to the current host thread. The CUDA Runtime will return cudaErrorIncompatibleDriverContext in such cases.2 Interactions between CUstream and cudaStream_t The types CUstream and cudaStream_t are identical and may be used interchangeably.19 Interactions with the CUDA Driver API Interactions between the CUDA Driver API and the CUDA Runtime API.19. All CUDA Runtime API state (e.19.112 Module Documentation 4. Generated for NVIDIA CUDA Library by Doxygen . it is necessary to explicitly cast the struct cudaArray ∗ to a CUarray . and cudaD3D11SetDirect3DDevice. Note that these functions will fail with cudaErrorSetOnActiveProcess if they are called when a CUcontext is bound to the current host thread. 4.g. then the CUDA runtime will decrement the reference count of that CUcontext in the function cudaThreadExit. Please note that attaching to legacy contexts (those with a version of 3010 as returned by cuCtxGetApiVersion()) is not possible. cudaD3D10SetDirect3DDevice. cudaSetDeviceFlags. This section describes the interactions between the CUDA Driver API and the CUDA Runtime API 4.

4.19 Interactions with the CUDA Driver API 113 4. In order to use a CUgraphicsResource in a CUDA Runtime API function which takes a struct cudaGraphicsResource ∗.5 Interactions between CUgraphicsResource and cudaGraphicsResource_t The types CUgraphicsResource and struct cudaGraphicsResource ∗ represent the same data type and may be used interchangeably by casting the two types between each other. In order to use a struct cudaGraphicsResource ∗ in a CUDA Driver API function which takes a CUgraphicsResource. it is necessary to explicitly cast the CUgraphicsResource to a struct cudaGraphicsResource ∗.19. it is necessary to explicitly cast the struct cudaGraphicsResource ∗ to a CUgraphicsResource . Generated for NVIDIA CUDA Library by Doxygen .

IDirect3DResource9 ∗pResource. IDirect3DResource9 ∗pResource. unsigned int face. unsigned int face. unsigned int level) Get the dimensions of a registered Direct3D surface. IDirect3DResource9 ∗∗ppResources) Unmap Direct3D resources for access by CUDA. size_t ∗pHeight. IDirect3DResource9 ∗∗ ppResources) Deprecated This function is deprecated as of Cuda 3. • cudaError_t cudaD3D9RegisterResource (IDirect3DResource9 ∗pResource.1 Function Documentation cudaError_t cudaD3D9MapResources (int count.20.2. unsigned int face.1 Detailed Description This section describes deprecated Direct3D 9 interoperability functions. • cudaError_t cudaD3D9UnregisterResource (IDirect3DResource9 ∗pResource) Unregisters a Direct3D resource for access by CUDA. size_t ∗pDepth. unsigned int face.114 Module Documentation 4.2 4. unsigned int flags) Set usage flags for mapping a Direct3D resource. 4. unsigned int face. IDirect3DResource9 ∗pResource. • cudaError_t cudaD3D9ResourceGetSurfaceDimensions (size_t ∗pWidth. unsigned int level) Get an array through which to access a subresource of a Direct3D resource which has been mapped for access by CUDA. IDirect3DResource9 ∗pResource. • cudaError_t cudaD3D9ResourceGetMappedPitch (size_t ∗pPitch.20.20. unsigned int level) Get the pitch of a subresource of a Direct3D resource which has been mapped for access by CUDA. • cudaError_t cudaD3D9ResourceGetMappedArray (cudaArray ∗∗ppArray. Generated for NVIDIA CUDA Library by Doxygen .20 Direct3D 9 Interoperability [DEPRECATED] Functions • cudaError_t cudaD3D9MapResources (int count. IDirect3DResource9 ∗∗ppResources) Map Direct3D resources for access by CUDA. • cudaError_t cudaD3D9ResourceGetMappedSize (size_t ∗pSize. • cudaError_t cudaD3D9UnmapResources (int count. • cudaError_t cudaD3D9ResourceGetMappedPointer (void ∗∗pPointer. 4. unsigned int flags) Registers a Direct3D resource for access by CUDA. unsigned int level) Get a pointer through which to access a subresource of a Direct3D resource which has been mapped for access by CUDA. unsigned int level) Get the size of a subresource of a Direct3D resource which has been mapped for access by CUDA. size_t ∗pPitchSlice.0. • cudaError_t cudaD3D9ResourceSetMapFlags (IDirect3DResource9 ∗pResource. IDirect3DResource9 ∗pResource.

If this call is successful. This reference count will be decremented when this resource is unregistered through cudaD3D9UnregisterResource(). If an application does so.Resources to map for CUDA Returns: cudaSuccess. This function provides the synchronization guarantee that any Direct3D calls issued before cudaD3D9MapResources() will complete before any CUDA kernels issued after cudaD3D9MapResources() begin. asynchronous launches.2 cudaError_t cudaD3D9RegisterResource (IDirect3DResource9 ∗ pResource. • IDirect3DVertexBuffer9: No notes. this call will increase the internal reference count on pResource. • IDirect3DSurface9: Only stand-alone objects of type IDirect3DSurface9 may be explicitly shared. If any of ppResources are presently mapped for access by CUDA then cudaErrorUnknown is returned.2. The type of pResource must be one of the following. In particular. all surfaces associated with all mipmap levels of all faces of the texture will be accessible to CUDA. the results are undefined. See also: cudaGraphicsMapResources 4.20. Direct3D should not access any resources while they are mapped by CUDA. one must register the base texture object. The following value is allowed: Generated for NVIDIA CUDA Library by Doxygen . individual mipmap levels and faces of cube maps may not be registered directly. • IDirect3DBaseTexture9: When a texture is registered. • IDirect3DIndexBuffer9: No notes. 115 The resources in ppResources may be accessed in CUDA kernels until they are unmapped. Parameters: count .Number of resources to map for CUDA ppResources . This call is potentially high-overhead and should not be called every frame in interactive applications.4. To access individual surfaces associated with a texture. Registers the Direct3D resource pResource for access by CUDA.20 Direct3D 9 Interoperability [DEPRECATED] Maps the count Direct3D resources in ppResources for access by CUDA. then the application will be able to map and unmap this resource until it is unregistered through cudaD3D9UnregisterResource(). cudaErrorInvalidResourceHandle. The flags argument specifies the mechanism through which CUDA will access the Direct3D resource. cudaErrorUnknown Note: Note that this function may also return error codes from previous. Also on success.0. unsigned int flags) Deprecated This function is deprecated as of Cuda 3. If any of ppResources have not been registered for use with CUDA or if ppResources contains any duplicate entries then cudaErrorInvalidResourceHandle is returned.

• Surfaces of depth or stencil formats cannot be shared.116 Module Documentation • cudaD3D9RegisterFlagsNone: Specifies that CUDA will access this resource through a void∗. For usage requirements of face and level parameters.Parameters for resource registration Returns: cudaSuccess. Generated for NVIDIA CUDA Library by Doxygen . cudaD3D9ResourceGetMappedSize(). see cudaD3D9ResourceGetMappedPointer(). or 32-bit integer or floating-point data cannot be shared. cudaErrorUnknown Note: Note that this function may also return error codes from previous. unsigned int level) Deprecated This function is deprecated as of Cuda 3.0. asynchronous launches. Returns in ∗pArray an array through which the subresource of the mapped Direct3D resource pResource.20. • Resources allocated as shared may not be registered with CUDA. The following are some limitations: • The primary rendertarget may not be registered with CUDA. then cudaErrorInvalidResourceHandle is returned. cudaErrorInvalidResourceHandle. 2. • Any resources allocated in D3DPOOL_SYSTEMMEM or D3DPOOL_MANAGED may not be registered with CUDA.2. unsigned int face. or 4 channels of 8. which corresponds to face and level may be accessed. then cudaErrorUnknown is returned. and cudaD3D9ResourceGetMappedPitch() respectively. 16. then cudaErrorInvalidResourceHandle is returned. If pResource is not mapped. Not all Direct3D resources of the above types may be used for interoperability with CUDA. The value set in pArray may change every time that pResource is mapped. and pitch for each subresource of this resource may be queried through cudaD3D9ResourceGetMappedPointer(). This option is valid for all resource types. If pResource cannot be registered then cudaErrorUnknown is returned.g.Resource to register flags . • Textures which are not of a format which is 1. If Direct3D interoperability is not initialized on this context. If pResource was not registered with usage flags cudaD3D9RegisterFlagsArray. The pointer. Parameters: pResource . then cudaErrorInvalidDevice is returned. size. is a non-stand-alone IDirect3DSurface9) or is already registered. cudaErrorInvalidValue.3 cudaError_t cudaD3D9ResourceGetMappedArray (cudaArray ∗∗ ppArray. If pResource is of incorrect type (e. If pResource is not registered then cudaErrorInvalidResourceHandle is returned. See also: cudaGraphicsD3D9RegisterResource 4. IDirect3DResource9 ∗ pResource.

If pResource was not registered with usage flags cudaD3D9RegisterFlagsNone. see cudaD3D9ResourceGetMappedPointer(). IDirect3DResource9 ∗ pResource. cudaErrorInvalidResourceHandle. If pResource is not mapped for access by CUDA then cudaErrorUnknown is returned.Returned pitch of subresource pPitchSlice . the byte offset of the sample at position x.Level of resource to access Returns: cudaSuccess.0. The pitch and Z-slice pitch values may be used to compute the location of a sample on a surface as follows.4.20. z from the base pointer of the surface is: z∗ slicePitch + y ∗ pitch + (bytes per pixel) ∗ x Both parameters pPitch and pPitchSlice are optional and may be set to NULL. unsigned int face. asynchronous launches. See also: cudaGraphicsSubResourceGetMappedArray 117 4.Returned Z-slice pitch of subresource pResource .Face of resource to access level .Face of resource to access level . the byte offset of the sample at position x.Mapped resource to access face .20 Direct3D 9 Interoperability [DEPRECATED] Parameters: ppArray . For usage requirements of face and level parameters. y. Parameters: pPitch . unsigned int level) Deprecated This function is deprecated as of Cuda 3.4 cudaError_t cudaD3D9ResourceGetMappedPitch (size_t ∗ pPitch. then cudaErrorInvalidResourceHandle is returned. size_t ∗ pPitchSlice. y from the base pointer of the surface is: y ∗ pitch + (bytes per pixel) ∗ x For a 3D surface.Level of resource to access Generated for NVIDIA CUDA Library by Doxygen . The values set in pPitch and pPitchSlice may change every time that pResource is mapped. If pResource is not of type IDirect3DBaseTexture9 or one of its sub-types or if pResource has not been registered for use with CUDA. then cudaErrorInvalidResourceHandle is returned.Mapped resource to access face . cudaErrorUnknown Note: Note that this function may also return error codes from previous. which corresponds to face and level.Returned array corresponding to subresource pResource . For a 2D surface. Returns in ∗pPitch and ∗pPitchSlice the pitch and Z-slice pitch of the subresource of the mapped Direct3D resource pResource.2.

cudaErrorUnknown Note: Note that this function may also return error codes from previous. See also: cudaGraphicsResourceGetMappedPointer 4.118 Returns: Module Documentation cudaSuccess. If pResource is not mapped.20. then cudaErrorInvalidResourceHandle is returned.Level of resource to access Returns: cudaSuccess.5 cudaError_t cudaD3D9ResourceGetMappedPointer (void ∗∗ pPointer.0.2. Only mipmap level 0 is supported for now. cudaErrorInvalidResourceHandle. cudaErrorInvalidValue. face must be 0. then level must correspond to a valid mipmap level. then cudaErrorInvalidResourceHandle is returned. If pResource is of type IDirect3DCubeTexture9. IDirect3DResource9 ∗ pResource. If pResource is of type IDirect3DBaseTexture9. asynchronous launches. cudaErrorInvalidResourceHandle. cudaErrorInvalidValue. asynchronous launches.Returned pointer corresponding to subresource pResource . unsigned int level) Deprecated This function is deprecated as of Cuda 3. For all other types. then cudaErrorInvalidValue is returned. See also: cudaGraphicsResourceGetMappedPointer Generated for NVIDIA CUDA Library by Doxygen . Parameters: pPointer . Returns in ∗pPointer the base pointer of the subresource of the mapped Direct3D resource pResource. then cudaErrorUnknown is returned.Face of resource to access level . unsigned int face. then cudaErrorInvalidValue is returned. If pResource was not registered with usage flags cudaD3D9RegisterFlagsNone. If pResource is not registered. If face is invalid. then face must one of the values enumerated by type D3DCUBEMAP_FACES.Mapped resource to access face . The value set in pPointer may change every time that pResource is mapped. cudaErrorUnknown Note: Note that this function may also return error codes from previous. If level is invalid. For all other types level must be 0. which corresponds to face and level.

If pResource is not of type IDirect3DBaseTexture9 or IDirect3DSurface9 or if pResource has not been registered for use with CUDA. size_t ∗ pDepth. cudaErrorInvalidValue. see cudaD3D9ResourceGetMappedPointer. If pResource was not registered with usage flags cudaD3D9RegisterFlagsNone. asynchronous launches.6 119 cudaError_t cudaD3D9ResourceGetMappedSize (size_t ∗ pSize. The value set in pSize may change every time that pResource is mapped. unsigned int face.20 Direct3D 9 Interoperability [DEPRECATED] 4.4. and pDepth are optional. the value returned in ∗pDepth will be 0. Parameters: pSize . For 2D surfaces. unsigned int face.Level of resource to access Returns: cudaSuccess.Face of resource to access level . which corresponds to face and level. pHeight. Returns in ∗pSize the size of the subresource of the mapped Direct3D resource pResource.20.Returned width of surface Generated for NVIDIA CUDA Library by Doxygen . IDirect3DResource9 ∗ pResource. cudaErrorInvalidResourceHandle. and ∗pDepth the dimensions of the subresource of the mapped Direct3D resource pResource which corresponds to face and level. then cudaErrorInvalidResourceHandle is returned.20. IDirect3DResource9 ∗ pResource.2. See also: cudaGraphicsResourceGetMappedPointer 4. If pResource has not been registered for use with CUDA then cudaErrorInvalidResourceHandle is returned. ∗pHeight. size_t ∗ pHeight.0.0. unsigned int level) Deprecated This function is deprecated as of Cuda 3. Returns in ∗pWidth. see cudaD3D9ResourceGetMappedPointer().2. cudaErrorUnknown Note: Note that this function may also return error codes from previous. For usage requirements of face and level parameters.7 cudaError_t cudaD3D9ResourceGetSurfaceDimensions (size_t ∗ pWidth. Because anti-aliased surfaces may have multiple samples per pixel. Parameters: pWidth . If pResource is not mapped for access by CUDA then cudaErrorUnknown is returned. The parameters pWidth. it is possible that the dimensions of a resource will be an integer factor larger than the dimensions reported by the Direct3D runtime. unsigned int level) Deprecated This function is deprecated as of Cuda 3.Mapped resource to access face . For usage requirements of face and level parameters.Returned size of subresource pResource . then cudaErrorInvalidResourceHandle is returned.

8 cudaError_t cudaD3D9ResourceSetMapFlags (IDirect3DResource9 ∗ pResource. If pResource is presently mapped for access by CUDA.2.Level of resource to access Returns: cudaSuccess. See also: cudaGraphicsSubResourceGetMappedArray 4. The flags argument may be any of the following: • cudaD3D9MapFlagsNone: Specifies no hints about how this resource will be used.0. • cudaD3D9MapFlagsReadOnly: Specifies that CUDA kernels which access this resource will not write to this resource.20. unsigned int flags) Deprecated This function is deprecated as of Cuda 3. asynchronous launches. then cudaErrorInvalidResourceHandle is returned.Returned height of surface pDepth .Returned depth of surface pResource .Registered resource to set flags for flags . It is therefore assumed that this resource will be read from and written to by CUDA kernels. See also: cudaInteropResourceSetMapFlags Generated for NVIDIA CUDA Library by Doxygen . asynchronous launches. Parameters: pResource .Registered resource to access face .Parameters for resource mapping Returns: cudaSuccess. If pResource has not been registered for use with CUDA. cudaErrorInvalidValue. cudaErrorInvalidResourceHandle.120 pHeight .Face of resource to access level . so none of the data previously stored in the resource will be preserved. cudaErrorUnknown Note: Note that this function may also return error codes from previous. This is the default value. Note: Module Documentation Note that this function may also return error codes from previous. then cudaErrorUnknown is returned. Changes to flags will take effect the next time pResource is mapped. • cudaD3D9MapFlagsWriteDiscard: Specifies that CUDA kernels which access this resource will not read from this resource and will write over the entire contents of the resource. cudaErrorInvalidValue. cudaErrorInvalidResourceHandle. Set flags for mapping the Direct3D resource pResource.

See also: cudaGraphicsUnmapResources 4.0.10 cudaError_t cudaD3D9UnregisterResource (IDirect3DResource9 ∗ pResource) Deprecated This function is deprecated as of Cuda 3. then cudaErrorInvalidResourceHandle is returned.20. IDirect3DResource9 ∗∗ ppResources) 121 Deprecated This function is deprecated as of Cuda 3. Parameters: pResource . Unmaps the count Direct3D resources in ppResources.2. If any of ppResources are not presently mapped for access by CUDA then cudaErrorUnknown is returned. then cudaErrorInvalidResourceHandle is returned. cudaErrorUnknown Note: Note that this function may also return error codes from previous.Number of resources to unmap for CUDA ppResources . If any of ppResources have not been registered for use with CUDA or if ppResources contains any duplicate entries. This function provides the synchronization guarantee that any CUDA kernels issued before cudaD3D9UnmapResources() will complete before any Direct3D calls issued after cudaD3D9UnmapResources() begin.2.Resources to unmap for CUDA Returns: cudaSuccess. asynchronous launches. Unregisters the Direct3D resource pResource so it is not accessible by CUDA unless registered again.Resource to unregister Returns: cudaSuccess. asynchronous launches.4.0. If pResource is not registered. Parameters: count . cudaErrorInvalidResourceHandle.20 Direct3D 9 Interoperability [DEPRECATED] 4. See also: cudaGraphicsUnregisterResource Generated for NVIDIA CUDA Library by Doxygen .9 cudaError_t cudaD3D9UnmapResources (int count. cudaErrorInvalidResourceHandle. cudaErrorUnknown Note: Note that this function may also return error codes from previous.20.

unsigned int subResource) Get the pitch of a subresource of a Direct3D resource which has been mapped for access by CUDA. Generated for NVIDIA CUDA Library by Doxygen .0. ID3D10Resource ∗pResource. size_t ∗pHeight. • cudaError_t cudaD3D10ResourceSetMapFlags (ID3D10Resource ∗pResource. unsigned int flags) Register a Direct3D 10 resource for access by CUDA.122 Module Documentation 4. • cudaError_t cudaD3D10ResourceGetMappedArray (cudaArray ∗∗ppArray. size_t ∗pPitchSlice. ID3D10Resource ∗pResource. • cudaError_t cudaD3D10UnmapResources (int count. unsigned int flags) Set usage flags for mapping a Direct3D resource.21 Direct3D 10 Interoperability [DEPRECATED] Functions • cudaError_t cudaD3D10MapResources (int count. • cudaError_t cudaD3D10UnregisterResource (ID3D10Resource ∗pResource) Unregisters a Direct3D resource.1 Detailed Description This section describes deprecated Direct3D 10 interoperability functions. 4. unsigned int subResource) Get the dimensions of a registered Direct3D surface. ID3D10Resource ∗pResource. unsigned int subResource) Get an array through which to access a subresource of a Direct3D resource which has been mapped for access by CUDA. 4. ID3D10Resource ∗∗ppResources) Map Direct3D Resources for access by CUDA.2. • cudaError_t cudaD3D10ResourceGetMappedPointer (void ∗∗pPointer. unsigned int subResource) Get a pointer through which to access a subresource of a Direct3D resource which has been mapped for access by CUDA.21. size_t ∗pDepth.2 4.21. ID3D10Resource ∗pResource. ID3D10Resource ∗∗ ppResources) Deprecated This function is deprecated as of Cuda 3. • cudaError_t cudaD3D10RegisterResource (ID3D10Resource ∗pResource. ID3D10Resource ∗pResource.1 Function Documentation cudaError_t cudaD3D10MapResources (int count. • cudaError_t cudaD3D10ResourceGetMappedSize (size_t ∗pSize. ID3D10Resource ∗∗ppResources) Unmaps Direct3D resources. unsigned int subResource) Get the size of a subresource of a Direct3D resource which has been mapped for access by CUDA.21. • cudaError_t cudaD3D10ResourceGetSurfaceDimensions (size_t ∗pWidth. • cudaError_t cudaD3D10ResourceGetMappedPitch (size_t ∗pPitch.

This reference count will be decremented when this resource is unregistered through cudaD3D10UnregisterResource().Resources to map for CUDA Returns: cudaSuccess. this call will increase the internal reference count on pResource. This function provides the synchronization guarantee that any Direct3D calls issued before cudaD3D10MapResources() will complete before any CUDA kernels issued after cudaD3D10MapResources() begin. See also: cudaGraphicsMapResources 4. cudaErrorInvalidResourceHandle. • ID3D10Texture1D: No restrictions.21.2 cudaError_t cudaD3D10RegisterResource (ID3D10Resource ∗ pResource.0. The type of pResource must be one of the following: • ID3D10Buffer: Cannot be used with flags set to cudaD3D10RegisterFlagsArray. Generated for NVIDIA CUDA Library by Doxygen . If any of ppResources have not been registered for use with CUDA or if ppResources contains any duplicate entries then cudaErrorInvalidResourceHandle is returned. If any of ppResources are presently mapped for access by CUDA then cudaErrorUnknown is returned. The flags argument specifies the mechanism through which CUDA will access the Direct3D resource. If an application does so. • ID3D10Texture2D: No restrictions.Number of resources to map for CUDA ppResources . This call is potentially high-overhead and should not be called every frame in interactive applications. The following values are allowed. then the application will be able to map and unmap this resource until it is unregistered through cudaD3D10UnregisterResource().2. asynchronous launches. Also on success. cudaErrorUnknown Note: Note that this function may also return error codes from previous. Direct3D should not access any resources while they are mapped by CUDA.21 Direct3D 10 Interoperability [DEPRECATED] Maps the count Direct3D resources in ppResources for access by CUDA. Parameters: count . • ID3D10Texture3D: No restrictions. If this call is successful. the results are undefined. unsigned int flags) Deprecated This function is deprecated as of Cuda 3. 123 The resources in ppResources may be accessed in CUDA kernels until they are unmapped. Registers the Direct3D resource pResource for access by CUDA.4.

If pResource cannot be registered then cudaErrorUnknown is returned. For usage requirements of the subResource parameter. cudaErrorUnknown Note: Note that this function may also return error codes from previous. • The primary rendertarget may not be registered with CUDA. and ID3D10Texture3D. and pitch for each subresource of this resource may be queried through cudaD3D10ResourceGetMappedPointer(). • cudaD3D10RegisterFlagsArray: Specifies that CUDA will access this resource through a CUarray queried on a sub-resource basis through cuD3D10ResourceGetMappedArray(). then cudaErrorInvalidResourceHandle is returned. or 32-bit integer or floating-point data cannot be shared. This option is valid for all resource types. see cudaD3D10ResourceGetMappedPointer(). See also: cudaGraphicsD3D10RegisterResource 4. The value set in ppArray may change every time that pResource is mapped. 16. • Resources allocated as shared may not be registered with CUDA. cudaErrorInvalidDevice. ID3D10Resource ∗ pResource. cudaErrorInvalidValue. If pResource is of incorrect type or is already registered then cudaErrorInvalidResourceHandle is returned.Resource to register flags .0.21. or 4 channels of 8. cudaErrorInvalidResourceHandle. • Surfaces of depth or stencil formats cannot be shared. Returns in ∗ppArray an array through which the subresource of the mapped Direct3D resource pResource which corresponds to subResource may be accessed. and cudaD3D10ResourceGetMappedPitch() respectively. asynchronous launches.Parameters for resource registration Returns: cudaSuccess. The pointer. This option is only valid for resources of type ID3D10Texture1D.124 Module Documentation • cudaD3D10RegisterFlagsNone: Specifies that CUDA will access this resource through a void∗. If pResource is not registered. cudaD3D10ResourceGetMappedSize(). Not all Direct3D resources of the above types may be used for interoperability with CUDA. Generated for NVIDIA CUDA Library by Doxygen . If pResource is not mapped then cudaErrorUnknown is returned. size. • Textures which are not of a format which is 1. The following are some limitations. ID3D10Texture2D. unsigned int subResource) Deprecated This function is deprecated as of Cuda 3.2.3 cudaError_t cudaD3D10ResourceGetMappedArray (cudaArray ∗∗ ppArray. then cudaErrorInvalidResourceHandle is returned. If Direct3D interoperability is not initialized on this context then cudaErrorInvalidDevice is returned. Parameters: pResource . If pResource was not registered with usage flags cudaD3D10RegisterFlagsArray. 2.

Mapped resource to access subResource . which corresponds to subResource.Subresource of pResource to access Returns: cudaSuccess. The pitch and Z-slice pitch values may be used to compute the location of a sample on a surface as follows.4. cudaErrorUnknown Note: Note that this function may also return error codes from previous. size_t ∗ pPitchSlice. the byte offset of the sample at position x.21 Direct3D 10 Interoperability [DEPRECATED] Parameters: ppArray . ID3D10Resource ∗ pResource. cudaErrorUnknown Generated for NVIDIA CUDA Library by Doxygen .4 cudaError_t cudaD3D10ResourceGetMappedPitch (size_t ∗ pPitch. or if pResource has not been registered for use with CUDA.Returned array corresponding to subresource pResource . See also: cudaGraphicsSubResourceGetMappedArray 125 4.Returned pitch of subresource pPitchSlice .Subresource of pResource to access Returns: cudaSuccess. If pResource is not mapped for access by CUDA then cudaErrorUnknown is returned. y from the base pointer of the surface is: y ∗ pitch + (bytes per pixel) ∗ x For a 3D surface. cudaErrorInvalidResourceHandle. unsigned int subResource) Deprecated This function is deprecated as of Cuda 3. If pResource is not of type ID3D10Texture1D. cudaErrorInvalidValue.Returned Z-slice pitch of subresource pResource . Parameters: pPitch . If pResource was not registered with usage flags cudaD3D10RegisterFlagsNone. cudaErrorInvalidValue. ID3D10Texture2D. then cudaErrorInvalidResourceHandle is returned. the byte offset of the sample at position x. y. For usage requirements of the subResource parameter see cudaD3D10ResourceGetMappedPointer().2. For a 2D surface. then cudaErrorInvalidResourceHandle is returned. z from the base pointer of the surface is: z∗ slicePitch + y ∗ pitch + (bytes per pixel) ∗ x Both parameters pPitch and pPitchSlice are optional and may be set to NULL. asynchronous launches. or ID3D10Texture3D. Returns in ∗pPitch and ∗pPitchSlice the pitch and Z-slice pitch of the subresource of the mapped Direct3D resource pResource. The values set in pPitch and pPitchSlice may change every time that pResource is mapped.0.21. cudaErrorInvalidResourceHandle.Mapped resource to access subResource .

unsigned int subResource) Deprecated This function is deprecated as of Cuda 3.0. The value set in pPointer may change every time that pResource is mapped. See also: cudaGraphicsResourceGetMappedPointer 4. then cudaErrorInvalidResourceHandle is returned. asynchronous launches. ID3D10Resource ∗ pResource.21. Generated for NVIDIA CUDA Library by Doxygen . cudaErrorInvalidResourceHandle. then cudaErrorInvalidResourceHandle is returned. Parameters: pPointer . cudaErrorUnknown Note: Note that this function may also return error codes from previous. The value set in pSize may change every time that pResource is mapped. See also: cudaGraphicsSubResourceGetMappedArray 4.0. If pResource has not been registered for use with CUDA then cudaErrorInvalidHandle is returned. Returns in ∗pSize the size of the subresource of the mapped Direct3D resource pResource which corresponds to subResource.Subresource of pResource to access Returns: cudaSuccess.Mapped resource to access subResource .2. asynchronous launches. If pResource is of type ID3D10Buffer then subResource must be 0. If pResource was not registered with usage flags cudaD3D10RegisterFlagsNone. If pResource is not mapped for access by CUDA then cudaErrorUnknown is returned. If pResource is not mapped then cudaErrorUnknown is returned. then cudaErrorInvalidResourceHandle is returned. ID3D10Resource ∗ pResource. cudaErrorInvalidValue.21. then the value of subResource must come from the subresource calculation in D3D10CalcSubResource(). unsigned int subResource) Deprecated This function is deprecated as of Cuda 3.5 cudaError_t cudaD3D10ResourceGetMappedPointer (void ∗∗ pPointer.6 cudaError_t cudaD3D10ResourceGetMappedSize (size_t ∗ pSize.2.126 Note: Module Documentation Note that this function may also return error codes from previous. Returns in ∗pPointer the base pointer of the subresource of the mapped Direct3D resource pResource which corresponds to subResource. For usage requirements of the subResource parameter see cudaD3D10ResourceGetMappedPointer(). If pResource is not registered. If pResource is of any other type. If pResource was not registered with usage flags cudaD3D9RegisterFlagsNone.Returned pointer corresponding to subresource pResource .

unsigned int subResource) Deprecated This function is deprecated as of Cuda 3.2.Returned height of surface pDepth . cudaErrorUnknown Note: Note that this function may also return error codes from previous. and ∗pDepth the dimensions of the subresource of the mapped Direct3D resource pResource which corresponds to subResource.Returned size of subresource pResource . asynchronous launches.0. cudaErrorInvalidValue.Returned width of surface pHeight .21. size_t ∗ pDepth. Because anti-aliased surfaces may have multiple samples per pixel. For usage requirements of subResource parameters see cudaD3D10ResourceGetMappedPointer().Returned depth of surface pResource . If pResource is not of type ID3D10Texture1D.Subresource of pResource to access Returns: cudaSuccess.Subresource of pResource to access Returns: cudaSuccess. ∗pHeight. Returns in ∗pWidth.7 cudaError_t cudaD3D10ResourceGetSurfaceDimensions (size_t ∗ pWidth. it is possible that the dimensions of a resource will be an integer factor larger than the dimensions reported by the Direct3D runtime. the value returned in ∗pDepth will be 0. or ID3D10Texture3D. See also: cudaGraphicsSubResourceGetMappedArray Generated for NVIDIA CUDA Library by Doxygen . or if pResource has not been registered for use with CUDA. Note: Note that this function may also return error codes from previous.21 Direct3D 10 Interoperability [DEPRECATED] Parameters: pSize .4. The parameters pWidth. See also: cudaGraphicsResourceGetMappedPointer 127 4. cudaErrorInvalidResourceHandle. and pDepth are optional. ID3D10Texture2D. cudaErrorInvalidValue. then cudaErrorInvalidHandle is returned.Registered resource to access subResource . pHeight. Parameters: pWidth . asynchronous launches. cudaErrorInvalidResourceHandle.Mapped resource to access subResource . size_t ∗ pHeight. For 2D surfaces. ID3D10Resource ∗ pResource.

The flags argument may be any of the following: • cudaD3D10MapFlagsNone: Specifies no hints about how this resource will be used.8 Module Documentation cudaError_t cudaD3D10ResourceSetMapFlags (ID3D10Resource ∗ pResource. Parameters: pResource . cudaErrorInvalidResourceHandle. Unmaps the count Direct3D resource in ppResources.Registered resource to set flags for flags . If pResource is presently mapped for access by CUDA then cudaErrorUnknown is returned. If any of ppResources are not presently mapped for access by CUDA then cudaErrorUnknown is returned. If pResource has not been registered for use with CUDA then cudaErrorInvalidHandle is returned.0.21. This is the default value. It is therefore assumed that this resource will be read from and written to by CUDA kernels. • cudaD3D10MapFlagsWriteDiscard: Specifies that CUDA kernels which access this resource will not read from this resource and will write over the entire contents of the resource.2.9 cudaError_t cudaD3D10UnmapResources (int count. • cudaD3D10MapFlagsReadOnly: Specifies that CUDA kernels which access this resource will not write to this resource.0. See also: cudaGraphicsResourceSetMapFlags 4.128 4. ID3D10Resource ∗∗ ppResources) Deprecated This function is deprecated as of Cuda 3.21. cudaErrorUnknown. Generated for NVIDIA CUDA Library by Doxygen . If any of ppResources have not been registered for use with CUDA or if ppResources contains any duplicate entries. Changes to flags will take effect the next time pResource is mapped. then cudaErrorInvalidResourceHandle is returned. asynchronous launches. unsigned int flags) Deprecated This function is deprecated as of Cuda 3.2.Parameters for resource mapping Returns: cudaSuccess. Note: Note that this function may also return error codes from previous. so none of the data previously stored in the resource will be preserved. cudaErrorInvalidValue. Set usage flags for mapping the Direct3D resource pResource. This function provides the synchronization guarantee that any CUDA kernels issued before cudaD3D10UnmapResources() will complete before any Direct3D calls issued after cudaD3D10UnmapResources() begin.

Unregisters the Direct3D resource resource so it is not accessible by CUDA unless registered again.Number of resources to unmap for CUDA ppResources .0. cudaErrorUnknown Note: Note that this function may also return error codes from previous. asynchronous launches.2. asynchronous launches. cudaErrorUnknown Note: Note that this function may also return error codes from previous.Resources to unmap for CUDA Returns: cudaSuccess. If pResource is not registered.10 cudaError_t cudaD3D10UnregisterResource (ID3D10Resource ∗ pResource) Deprecated This function is deprecated as of Cuda 3. cudaErrorInvalidResourceHandle.4. Parameters: pResource . See also: cudaGraphicsUnmapResources 129 4.Resource to unregister Returns: cudaSuccess. cudaErrorInvalidResourceHandle. See also: cudaGraphicsUnregisterResource Generated for NVIDIA CUDA Library by Doxygen . then cudaErrorInvalidResourceHandle is returned.21.21 Direct3D 10 Interoperability [DEPRECATED] Parameters: count .

• cudaError_t cudaGLUnmapBufferObjectAsync (GLuint bufObj. cudaStream_t stream) Maps a buffer object for access by CUDA. The buffer must have previously been registered by calling cudaGLRegisterBufferObject(). • cudaError_t cudaGLMapBufferObjectAsync (void ∗∗devPtr.Returned device pointer to CUDA object bufObj .1 Detailed Description This section describes deprecated OpenGL interoperability functionality. GLuint bufObj) Deprecated This function is deprecated as of Cuda 3.2. Parameters: devPtr .22. GLuint bufObj. or another context from the same share group.0.22 OpenGL Interoperability [DEPRECATED] Functions • cudaError_t cudaGLMapBufferObject (void ∗∗devPtr. 4. • cudaError_t cudaGLSetBufferObjectMapFlags (GLuint bufObj. cudaStream_t stream) Unmaps a buffer object for access by CUDA. • cudaError_t cudaGLUnmapBufferObject (GLuint bufObj) Unmaps a buffer object for access by CUDA.22. • cudaError_t cudaGLRegisterBufferObject (GLuint bufObj) Registers a buffer object for access by CUDA. The OpenGL context used to create the buffer. Maps the buffer object of ID bufObj into the address space of CUDA and returns in ∗devPtr the base pointer of the resulting mapping. While a buffer is mapped by CUDA. 4. must be bound to the current thread when this is called.130 Module Documentation 4.Buffer object ID to map Generated for NVIDIA CUDA Library by Doxygen . unsigned int flags) Set usage flags for mapping an OpenGL buffer. • cudaError_t cudaGLUnregisterBufferObject (GLuint bufObj) Unregisters a buffer object for access by CUDA.1 Function Documentation cudaError_t cudaGLMapBufferObject (void ∗∗ devPtr.2 4. any OpenGL operation which references the buffer will result in undefined behavior. All streams in the current thread are synchronized with the current GL context. GLuint bufObj) Maps a buffer object for access by CUDA.22.

0. or another context from the same share group. any OpenGL operation which references the buffer will result in undefined behavior. cudaErrorMapBufferObjectFailed Note: Note that this function may also return error codes from previous.2.Returned device pointer to CUDA object bufObj . The buffer must have previously been registered by calling cudaGLRegisterBufferObject(). Registers the buffer object of ID bufObj for access by CUDA. or another context from the same share group.Buffer object ID to map stream . Maps the buffer object of ID bufObj into the address space of CUDA and returns in ∗devPtr the base pointer of the resulting mapping.22. The OpenGL context used to create the buffer. must be bound to the current thread when this is called. cudaErrorMapBufferObjectFailed Note: Note that this function may also return error codes from previous.Stream to synchronize Returns: cudaSuccess.3 cudaError_t cudaGLRegisterBufferObject (GLuint bufObj) Deprecated This function is deprecated as of Cuda 3. This function must be called before CUDA can map the buffer object.2 cudaError_t cudaGLMapBufferObjectAsync (void ∗∗ devPtr.22 OpenGL Interoperability [DEPRECATED] Returns: cudaSuccess. GLuint bufObj. asynchronous launches. Generated for NVIDIA CUDA Library by Doxygen . Stream /p stream is synchronized with the current GL context. must be bound to the current thread when this is called. Parameters: devPtr .22. asynchronous launches.0. See also: cudaGraphicsMapResources 131 4. While a buffer is mapped by CUDA.4.2. See also: cudaGraphicsMapResources 4. The OpenGL context used to create the buffer. cudaStream_t stream) Deprecated This function is deprecated as of Cuda 3.

If bufObj is presently mapped for access by CUDA.Parameters for buffer mapping Returns: cudaSuccess. The flags argument may be any of the following: • cudaGLMapFlagsNone: Specifies no hints about how this buffer will be used. cudaErrorInitializationError Note: Module Documentation Note that this function may also return error codes from previous. unsigned int flags) Deprecated This function is deprecated as of Cuda 3. See also: cudaGraphicsGLRegisterBuffer 4. It is therefore assumed that this buffer will be read from and written to by CUDA kernels.22. Parameters: bufObj . then cudaErrorInvalidResourceHandle is returned. This is the default value. then cudaErrorUnknown is returned. Set flags for mapping the OpenGL buffer bufObj Changes to flags will take effect the next time bufObj is mapped. • cudaGLMapFlagsWriteDiscard: Specifies that CUDA kernels which access this buffer will not read from the buffer and will write over the entire contents of the buffer. cudaErrorInvalidValue. • cudaGLMapFlagsReadOnly: Specifies that CUDA kernels which access this buffer will not write to the buffer.Registered buffer object to set flags for flags .Buffer object ID to register Returns: cudaSuccess.4 cudaError_t cudaGLSetBufferObjectMapFlags (GLuint bufObj. so none of the data previously stored in the buffer will be preserved.0. See also: cudaGraphicsResourceSetMapFlags Generated for NVIDIA CUDA Library by Doxygen .132 Parameters: bufObj . asynchronous launches.2. cudaErrorInvalidResourceHandle. If bufObj has not been registered for use with CUDA. asynchronous launches. cudaErrorUnknown Note: Note that this function may also return error codes from previous.

Stream /p stream is synchronized with the current GL context. When a buffer is unmapped. or another context from the same share group. The OpenGL context used to create the buffer. must be bound to the current thread when this is called.22. cudaErrorUnmapBufferObjectFailed Note: Note that this function may also return error codes from previous. cudaErrorUnmapBufferObjectFailed Note: Note that this function may also return error codes from previous.0.Buffer object to unmap stream .5 cudaError_t cudaGLUnmapBufferObject (GLuint bufObj) 133 Deprecated This function is deprecated as of Cuda 3.22.Buffer object to unmap Returns: cudaSuccess. Parameters: bufObj . must be bound to the current thread when this is called.6 cudaError_t cudaGLUnmapBufferObjectAsync (GLuint bufObj. the base address returned by cudaGLMapBufferObject() is invalid and subsequent references to the address result in undefined behavior.2. or another context from the same share group. Parameters: bufObj . All streams in the current thread are synchronized with the current GL context. See also: cudaGraphicsUnmapResources Generated for NVIDIA CUDA Library by Doxygen .22 OpenGL Interoperability [DEPRECATED] 4. When a buffer is unmapped.0.2. cudaErrorInvalidDevicePointer. the base address returned by cudaGLMapBufferObject() is invalid and subsequent references to the address result in undefined behavior.4. asynchronous launches. The OpenGL context used to create the buffer. See also: cudaGraphicsUnmapResources 4. Unmaps the buffer object of ID bufObj for access by CUDA. Unmaps the buffer object of ID bufObj for access by CUDA.Stream to synchronize Returns: cudaSuccess. asynchronous launches. cudaErrorInvalidDevicePointer. cudaStream_t stream) Deprecated This function is deprecated as of Cuda 3.

must be bound to the current thread when this is called. asynchronous launches.134 4.0. or another context from the same share group.22.Buffer object to unregister Returns: cudaSuccess Note: Note that this function may also return error codes from previous.7 cudaError_t cudaGLUnregisterBufferObject (GLuint bufObj) Module Documentation Deprecated This function is deprecated as of Cuda 3. The GL context used to create the buffer. Unregisters the buffer object of ID bufObj for access by CUDA and releases any CUDA resources associated with the buffer.2. it may no longer be mapped by CUDA. Parameters: bufObj . Once a buffer is unregistered. See also: cudaGraphicsUnregisterResource Generated for NVIDIA CUDA Library by Doxygen .

cudaAddressModeBorder = 3 } • enum cudaTextureFilterMode { cudaFilterModePoint = 0.23 Data types used by CUDA Runtime Data Structures • • • • • • • • • struct cudaChannelFormatDesc struct cudaDeviceProp struct cudaExtent struct cudaFuncAttributes struct cudaMemcpy3DParms struct cudaPitchedPtr struct cudaPos struct surfaceReference struct textureReference Enumerations • enum cudaSurfaceBoundaryMode { cudaBoundaryModeZero = 0. cudaFormatModeAuto = 1 } • enum cudaTextureAddressMode { cudaAddressModeWrap = 0. cudaFilterModeLinear = 1 } • enum cudaTextureReadMode { cudaReadModeElementType = 0.4. cudaChannelFormatKindFloat = 2. cudaAddressModeMirror = 2. cudaChannelFormatKindUnsigned = 1. cudaBoundaryModeClamp = 1. cudaAddressModeClamp = 1. cudaChannelFormatKindNone = 3 } Generated for NVIDIA CUDA Library by Doxygen .23 Data types used by CUDA Runtime 135 4. cudaReadModeNormalizedFloat = 1 } Data types used by CUDA Runtime Data types used by CUDA Runtime Author: NVIDIA Corporation • enum cudaChannelFormatKind { cudaChannelFormatKindSigned = 0. cudaBoundaryModeTrap = 2 } • enum cudaSurfaceFormatMode { cudaFormatModeForced = 0.

cudaErrorLaunchFailure = 4. cudaErrorMapBufferObjectFailed = 14. cudaErrorInvalidTexture = 18. cudaErrorInvalidChannelDescriptor = 20. cudaErrorInitializationError = 3. cudaErrorInvalidSymbol = 13. cudaErrorMixedDeviceExecution = 28. cudaErrorCudartUnloading = 29. cudaErrorSynchronizationError = 25. cudaErrorMemoryValueTooLarge = 32. cudaErrorInvalidMemcpyDirection = 21. cudaErrorMemoryAllocation = 2. cudaErrorMissingConfiguration = 1.136 • enum cudaComputeMode { cudaComputeModeDefault = 0. cudaErrorInvalidPitchValue = 12. cudaErrorNotReady = 34. cudaComputeModeProhibited = 2 } • enum cudaError { cudaSuccess = 0. cudaErrorLaunchTimeout = 6. cudaErrorNotYetImplemented = 31. cudaErrorTextureNotBound = 24. cudaErrorInsufficientDriver = 35. cudaErrorInvalidDeviceFunction = 8. Module Documentation Generated for NVIDIA CUDA Library by Doxygen . cudaErrorInvalidHostPointer = 16. cudaErrorLaunchOutOfResources = 7. cudaErrorAddressOfConstant = 22. cudaErrorPriorLaunchFailure = 5. cudaErrorInvalidValue = 11. cudaErrorInvalidDevicePointer = 17. cudaErrorUnmapBufferObjectFailed = 15. cudaErrorInvalidDevice = 10. cudaErrorInvalidResourceHandle = 33. cudaErrorInvalidNormSetting = 27. cudaErrorInvalidConfiguration = 9. cudaErrorInvalidTextureBinding = 19. cudaErrorTextureFetchFailed = 23. cudaErrorInvalidFilterSetting = 26. cudaComputeModeExclusive = 1. cudaErrorUnknown = 30.

cudaErrorInvalidSurface = 37. cudaErrorDuplicateVariableName = 43. cudaErrorInvalidKernelImage = 47. cudaGraphicsMapFlagsWriteDiscard = 2 } • enum cudaGraphicsRegisterFlags { cudaGraphicsRegisterFlagsNone = 0 } • enum cudaLimit { cudaLimitStackSize = 0x00. cudaErrorDevicesUnavailable = 46. cudaErrorSharedObjectSymbolNotFound = 40. cudaMemcpyHostToDevice = 1. cudaGraphicsCubeFaceNegativeX = 0x01. cudaErrorDuplicateSurfaceName = 45. cudaFuncCachePreferShared = 1. cudaLimitPrintfFifoSize = 0x01. cudaMemcpyDeviceToDevice = 3 } • typedef enum cudaError cudaError_t Generated for NVIDIA CUDA Library by Doxygen 137 . cudaErrorUnsupportedLimit = 42. cudaErrorSharedObjectInitFailed = 41. cudaErrorIncompatibleDriverContext = 49.23 Data types used by CUDA Runtime cudaErrorSetOnActiveProcess = 36. cudaErrorStartupFailure = 0x7f. cudaLimitMallocHeapSize = 0x02 } • enum cudaMemcpyKind { cudaMemcpyHostToHost = 0. cudaGraphicsCubeFacePositiveY = 0x02. cudaErrorDuplicateTextureName = 44. cudaErrorECCUncorrectable = 39. cudaGraphicsCubeFacePositiveZ = 0x04. cudaFuncCachePreferL1 = 2 } • enum cudaGraphicsCubeFace { cudaGraphicsCubeFacePositiveX = 0x00. cudaErrorNoKernelImageForDevice = 48. cudaErrorApiFailureBase = 10000 } • enum cudaFuncCache { cudaFuncCachePreferNone = 0.4. cudaGraphicsCubeFaceNegativeZ = 0x05 } • enum cudaGraphicsMapFlags { cudaGraphicsMapFlagsNone = 0. cudaMemcpyDeviceToHost = 2. cudaGraphicsCubeFaceNegativeY = 0x03. cudaGraphicsMapFlagsReadOnly = 1. cudaErrorNoDevice = 38.

23.23.1.1.1.23.1 4.138 • • • • • • • • • • • • • • • • • • • • • typedef struct CUevent_st ∗ cudaEvent_t typedef struct cudaGraphicsResource ∗ cudaGraphicsResource_t typedef struct CUstream_st ∗ cudaStream_t typedef struct CUuuid_st cudaUUID_t #define cudaArrayDefault 0x00 #define cudaArraySurfaceLoadStore 0x02 #define cudaDeviceBlockingSync 4 #define cudaDeviceLmemResizeToMax 16 #define cudaDeviceMapHost 8 #define cudaDeviceMask 0x1f #define cudaDevicePropDontCare #define cudaDeviceScheduleAuto 0 #define cudaDeviceScheduleSpin 1 #define cudaDeviceScheduleYield 2 #define cudaEventBlockingSync 1 #define cudaEventDefault 0 #define cudaEventDisableTiming 2 #define cudaHostAllocDefault 0 #define cudaHostAllocMapped 2 #define cudaHostAllocPortable 1 #define cudaHostAllocWriteCombined 4 Module Documentation 4.4 #define cudaDeviceLmemResizeToMax 16 Device flag .23.1.23.Keep local memory allocation after launch 4.Support mapped pinned allocations 4.1 Define Documentation #define cudaArrayDefault 0x00 Default CUDA array allocation flag 4.2 #define cudaArraySurfaceLoadStore 0x02 Must be set in cudaMallocArray in order to bind surfaces to the CUDA array 4.Use blocking synchronization 4.1.23.23.6 #define cudaDeviceMask 0x1f Device flags mask Generated for NVIDIA CUDA Library by Doxygen .5 #define cudaDeviceMapHost 8 Device flag .1.3 #define cudaDeviceBlockingSync 4 Device flag .

11 #define cudaEventBlockingSync 1 Event uses blocking synchronization 4.15 #define cudaHostAllocMapped 2 Map allocation into device space 4.4.10 #define cudaDeviceScheduleYield 2 Device flag .23.1.7 #define cudaDevicePropDontCare 139 Empty device properties 4.13 #define cudaEventDisableTiming 2 Event will not record timing data 4.8 #define cudaDeviceScheduleAuto 0 Device flag .1.Yield default scheduling 4.23.23.1.14 #define cudaHostAllocDefault 0 Default page-locked allocation flag 4.23.1.23.1.23.1.1.23 Data types used by CUDA Runtime 4.16 #define cudaHostAllocPortable 1 Pinned memory accessible by all CUDA contexts 4.1.23.12 #define cudaEventDefault 0 Default event flag 4.23.9 #define cudaDeviceScheduleSpin 1 Device flag .1.23.23.1.1.Automatic scheduling 4.17 #define cudaHostAllocWriteCombined 4 Write-combined memory Generated for NVIDIA CUDA Library by Doxygen .23.Spin default scheduling 4.

2 enum cudaComputeMode CUDA device compute modes Enumerator: cudaComputeModeDefault Default compute mode (Multiple threads can use cudaSetDevice() with this device) cudaComputeModeExclusive Compute-exclusive mode (Only one thread will be able to use cudaSetDevice() with this device) cudaComputeModeProhibited Compute-prohibited mode (No threads can use cudaSetDevice() with this device) Generated for NVIDIA CUDA Library by Doxygen .3 4.2.23.1 Enumeration Type Documentation enum cudaChannelFormatKind Channel format kind Enumerator: cudaChannelFormatKindSigned Signed channel format cudaChannelFormatKindUnsigned Unsigned channel format cudaChannelFormatKindFloat Float channel format cudaChannelFormatKindNone No channel format 4.2.3.23.5 typedef struct CUuuid_st cudaUUID_t CUDA UUID types 4.2 4.2.1 Typedef Documentation typedef enum cudaError cudaError_t CUDA Error types 4.2 typedef struct CUevent_st∗ cudaEvent_t CUDA event types 4.3 typedef struct cudaGraphicsResource∗ cudaGraphicsResource_t CUDA graphics resource types 4.23.4 typedef struct CUstream_st∗ cudaStream_t CUDA stream 4.2.23.23.3.23.2.23.23.23.140 Module Documentation 4.

3 enum cudaError 141 CUDA error types Enumerator: cudaSuccess The API call returned with no errors. Generated for NVIDIA CUDA Library by Doxygen . cudaErrorInvalidConfiguration This indicates that a kernel launch is requesting resources that can never be satisfied by the current device. Deprecated This error return is deprecated as of CUDA 3. In the case of query calls. This was previously used for device emulation of kernel launches. cudaErrorInitializationError The API call failed because the CUDA driver and runtime could not be initialized. Although this error is similar to cudaErrorInvalidConfiguration. cudaErrorLaunchTimeout This indicates that the device kernel took too long to execute. cudaErrorInvalidHostPointer This indicates that at least one host pointer passed to the API call is not a valid host pointer. or the kernel launch specifies too many threads for the kernel’s register count.1 release. The device cannot be used until cudaThreadExit() is called. cudaErrorLaunchOutOfResources This indicates that a launch did not occur because it did not have appropriate resources.23. cudaErrorInvalidDevice This indicates that the device ordinal supplied by the user does not correspond to a valid CUDA device. All existing device memory allocations are invalid and must be reconstructed if the program is to continue using CUDA. Common causes include dereferencing an invalid device pointer and accessing out of bounds shared memory.23 Data types used by CUDA Runtime 4. as will requesting too many threads or blocks. cudaErrorPriorLaunchFailure This indicated that a previous kernel launch failed. cudaErrorMemoryAllocation The API call failed because it was unable to allocate enough memory to perform the requested operation. See cudaDeviceProp for more device limitations. cudaErrorInvalidDeviceFunction The requested device function does not exist or is not compiled for the proper device architecture. cudaErrorLaunchFailure An exception occurred on the device while executing a kernel.see the device property kernelExecTimeoutEnabled for more information. this error usually indicates that the user has attempted to pass too many arguments to the device kernel. cudaErrorInvalidSymbol This indicates that the symbol name/identifier passed to the API call is not a valid name or identifier.4. cudaErrorMapBufferObjectFailed This indicates that the buffer object could not be mapped. this can also mean that the operation being queried is complete (see cudaEventQuery() and cudaStreamQuery()).3. All existing device memory allocations are invalid and must be reconstructed if the program is to continue using CUDA. cudaErrorMissingConfiguration The device function being invoked (usually via cudaLaunch()) was not previously configured via the cudaConfigureCall() function. cudaErrorUnmapBufferObjectFailed This indicates that the buffer object could not be unmapped. cudaErrorInvalidValue This indicates that one or more of the parameters passed to the API call is not within an acceptable range of values. Requesting more shared memory per block than the device supports will trigger this error. This can only occur if timeouts are enabled .1. cudaErrorInvalidPitchValue This indicates that one or more of the pitch-related parameters passed to the API call is not within the acceptable range for pitch. The device cannot be used until cudaThreadExit() is called. Device emulation mode was removed with the CUDA 3.

cudaErrorAddressOfConstant This indicated that the user has taken the address of a constant variable.1. cudaErrorInvalidMemcpyDirection This indicates that the direction of the memcpy passed to the API call is not one of the types specified by cudaMemcpyKind. Device emulation mode was removed with the CUDA 3. cudaErrorInvalidTextureBinding This indicates that the texture binding is not valid.1 release. cudaErrorCudartUnloading This indicated an issue with calling API functions during the unload process of the CUDA runtime in prior releases. This occurs if you call cudaGetTextureAlignmentOffset() with an unbound texture. Variables in constant memory may now have their address taken by the runtime via cudaGetSymbolAddress(). cudaErrorInvalidChannelDescriptor This indicates that the channel descriptor passed to the API call is not valid. cudaErrorTextureNotBound This indicated that a texture was not bound for access.142 Module Documentation cudaErrorInvalidDevicePointer This indicates that at least one device pointer passed to the API call is not a valid device pointer. cudaErrorTextureFetchFailed This indicated that a texture fetch was not able to be performed. This occurs if the format is not one of the formats specified by cudaChannelFormatKind. cudaErrorSynchronizationError This indicated that a synchronization operation had failed.1. cudaErrorMixedDeviceExecution Mixing of device and device emulation code was not allowed.1 release.1 release. cudaErrorInvalidTexture This indicates that the texture passed to the API call is not a valid texture. cudaErrorUnknown This indicates that an unknown internal error has occurred.1. This is not supported by CUDA.1 release. This was previously used for device emulation of texture operations. or if one of the dimensions is invalid. This is not supported by CUDA. cudaErrorInvalidNormSetting This indicates that an attempt was made to read a non-float texture as a normalized float. Device emulation mode was removed with the CUDA 3. Deprecated This error return is deprecated as of CUDA 3. Generated for NVIDIA CUDA Library by Doxygen .1. Deprecated This error return is deprecated as of CUDA 3. This was previously used for device emulation of texture operations.1. Deprecated This error return is deprecated as of CUDA 3. cudaErrorInvalidFilterSetting This indicates that a non-float texture was being accessed with linear filtering. This was previously used for some device emulation functions. Deprecated This error return is deprecated as of CUDA 3. Deprecated This error return is deprecated as of CUDA 3. Device emulation mode was removed with the CUDA 3. which was forbidden up until the CUDA 3. Device emulation mode was removed with the CUDA 3.2.1 release. Deprecated This error return is deprecated as of CUDA 3.

cudaErrorNotReady This indicates that asynchronous operations issued previously have not completed yet. This can only occur if you are using CUDA Runtime/Driver interoperability and have created an existing Driver context using an older API. cudaSetDeviceFlags(). cudaD3D11SetDirect3DDevice(). cudaErrorECCUncorrectable This indicates that an uncorrectable ECC error was detected during execution. but must be indicated differently than cudaSuccess (which indicates completion). cudaErrorInsufficientDriver This indicates that the installed NVIDIA CUDA driver is older than the CUDA runtime library.4. Calls that may return this value include cudaEventQuery() and cudaStreamQuery(). This can occur when a user specifies code generation options for a particular CUDA source file that do not include the corresponding device configuration. cudaErrorDevicesUnavailable This indicates that all CUDA devices are busy or unavailable at the current time. cudaErrorSharedObjectInitFailed This indicates that initialization of a shared object failed. cudaErrorNoDevice This indicates that no CUDA-capable devices were detected by the installed CUDA driver. Generated for NVIDIA CUDA Library by Doxygen . cudaD3D9SetDirect3DDevice(). This result is not actually an error.1. cudaSetValidDevices().1 release. ∗ or cudaVDPAUSetVDPAUDevice() after initializing the CUDA runtime by calling non-device management operations (allocating memory and launching kernels are examples of non-device management operations). This error can also be returned if using runtime/driver interoperability and there is an existing CUcontext active on the host thread. Device emulation mode was removed with the CUDA 3. cudaErrorSharedObjectSymbolNotFound This indicates that a link to a shared object failed to resolve. cudaErrorUnsupportedLimit This indicates that the cudaLimit passed to the API call is not supported by the active device. Resource handles are opaque types like cudaStream_t and cudaEvent_t. Users should install an updated NVIDIA display driver to allow the application to run. Please see Interactions with the CUDA Driver API for more information. Deprecated This error return is deprecated as of CUDA 3. cudaErrorNoKernelImageForDevice This indicates that there is no kernel image available that is suitable for the device. cudaErrorDuplicateTextureName This indicates that multiple textures (across separate CUDA source files in the application) share the same string name. cudaErrorInvalidKernelImage This indicates that the device kernel image is invalid. cudaErrorDuplicateSurfaceName This indicates that multiple surfaces (across separate CUDA source files in the application) share the same string name. cudaErrorIncompatibleDriverContext This indicates that the current context is not compatible with this version of the CUDA Runtime. This is not a supported configuration. cudaErrorInvalidResourceHandle This indicates that a resource handle passed to the API call was not valid. Devices are often busy/unavailable due to use of cudaComputeModeExclusive or cudaComputeModeProhibited.23 Data types used by CUDA Runtime 143 cudaErrorNotYetImplemented This indicates that the API call is not yet implemented. cudaErrorMemoryValueTooLarge This indicated that an emulated device pointer exceeded the 32-bit address range. cudaD3D10SetDirect3DDevice. Production releases of CUDA will never return this error. cudaErrorInvalidSurface This indicates that the surface passed to the API call is not a valid surface. They can also be unavailable due to memory constraints on a device that already has active CUDA work being performed. cudaErrorDuplicateVariableName This indicates that multiple global or constant variables (across separate CUDA source files in the application) share the same string name. cudaErrorSetOnActiveProcess This indicates that the user has called cudaSetDevice().

144 Module Documentation cudaErrorStartupFailure This indicates an internal startup failure in the CUDA runtime.7 enum cudaGraphicsRegisterFlags CUDA graphics interop register flags Enumerator: cudaGraphicsRegisterFlagsNone Default Generated for NVIDIA CUDA Library by Doxygen .23. 4.23.3. Assume resource can be read/written cudaGraphicsMapFlagsReadOnly CUDA will not write to this resource cudaGraphicsMapFlagsWriteDiscard CUDA will only write to and will not read from this resource 4.3.6 enum cudaGraphicsMapFlags CUDA graphics interop map flags Enumerator: cudaGraphicsMapFlagsNone Default.4 enum cudaFuncCache CUDA function cache configurations Enumerator: cudaFuncCachePreferNone Default function cache configuration. no preference cudaFuncCachePreferShared Prefer larger shared memory and smaller L1 cache cudaFuncCachePreferL1 Prefer larger L1 cache and smaller shared memory 4.3.23.23.5 enum cudaGraphicsCubeFace CUDA graphics interop array indices for cube maps Enumerator: cudaGraphicsCubeFacePositiveX Positive X face of cubemap cudaGraphicsCubeFaceNegativeX Negative X face of cubemap cudaGraphicsCubeFacePositiveY Positive Y face of cubemap cudaGraphicsCubeFaceNegativeY Negative Y face of cubemap cudaGraphicsCubeFacePositiveZ Positive Z face of cubemap cudaGraphicsCubeFaceNegativeZ Negative Z face of cubemap 4. Production releases of CUDA should not return such errors.3. cudaErrorApiFailureBase Any unhandled CUDA driver error is added to this value and returned via the runtime.

3.8 enum cudaLimit 145 CUDA Limits Enumerator: cudaLimitStackSize GPU thread stack size cudaLimitPrintfFifoSize GPU printf FIFO size cudaLimitMallocHeapSize GPU malloc heap size 4.4.10 enum cudaSurfaceBoundaryMode CUDA Surface boundary modes Enumerator: cudaBoundaryModeZero Zero boundary mode cudaBoundaryModeClamp Clamp boundary mode cudaBoundaryModeTrap Trap boundary mode 4.23.23.3.11 enum cudaSurfaceFormatMode CUDA Surface format modes Enumerator: cudaFormatModeForced Forced format mode cudaFormatModeAuto Auto format mode 4.3.23.3.23.12 enum cudaTextureAddressMode CUDA texture address modes Enumerator: cudaAddressModeWrap Wrapping address mode cudaAddressModeClamp Clamp to edge address mode cudaAddressModeMirror Mirror address mode cudaAddressModeBorder Border address mode Generated for NVIDIA CUDA Library by Doxygen .23 Data types used by CUDA Runtime 4.3.23.9 enum cudaMemcpyKind CUDA memory copy types Enumerator: cudaMemcpyHostToHost Host -> Host cudaMemcpyHostToDevice Host -> Device cudaMemcpyDeviceToHost Device -> Host cudaMemcpyDeviceToDevice Device -> Device 4.

3.23.14 enum cudaTextureReadMode CUDA texture read modes Enumerator: cudaReadModeElementType Read texture as specified element type cudaReadModeNormalizedFloat Read texture as normalized float Generated for NVIDIA CUDA Library by Doxygen .13 enum cudaTextureFilterMode Module Documentation CUDA texture filter modes Enumerator: cudaFilterModePoint Point filter mode cudaFilterModeLinear Linear filter mode 4.146 4.23.3.

24 CUDA Driver API 147 4.24 CUDA Driver API Modules • • • • • • • • • • • • • • • • • • Data types used by CUDA driver Initialization Version Management Device Management Context Management Module Management Memory Management Stream Management Event Management Execution Control Texture Reference Management Surface Reference Management Graphics Interoperability OpenGL Interoperability Direct3D 9 Interoperability Direct3D 10 Interoperability Direct3D 11 Interoperability VDPAU Interoperability 4. Generated for NVIDIA CUDA Library by Doxygen .1 Detailed Description This section describes the low-level CUDA driver application programming interface.24.4.

148 Module Documentation 4.25 Data types used by CUDA driver Data Structures • • • • • struct CUDA_ARRAY3D_DESCRIPTOR_st struct CUDA_ARRAY_DESCRIPTOR_st struct CUDA_MEMCPY2D_st struct CUDA_MEMCPY3D_st struct CUdevprop_st Defines • • • • • • • • • • • #define CU_MEMHOSTALLOC_DEVICEMAP 0x02 #define CU_MEMHOSTALLOC_PORTABLE 0x01 #define CU_MEMHOSTALLOC_WRITECOMBINED 0x04 #define CU_PARAM_TR_DEFAULT -1 #define CU_TRSA_OVERRIDE_FORMAT 0x01 #define CU_TRSF_NORMALIZED_COORDINATES 0x02 #define CU_TRSF_READ_AS_INTEGER 0x01 #define CU_TRSF_SRGB 0x10 #define CUDA_ARRAY3D_2DARRAY 0x01 #define CUDA_ARRAY3D_SURFACE_LDST 0x02 #define CUDA_VERSION 3020 Typedefs • • • • • • • • • • • • • • • • • • • • • • • typedef enum CUaddress_mode_enum CUaddress_mode typedef struct CUarray_st ∗ CUarray typedef enum CUarray_cubemap_face_enum CUarray_cubemap_face typedef enum CUarray_format_enum CUarray_format typedef enum CUcomputemode_enum CUcomputemode typedef struct CUctx_st ∗ CUcontext typedef enum CUctx_flags_enum CUctx_flags typedef struct CUDA_ARRAY3D_DESCRIPTOR_st CUDA_ARRAY3D_DESCRIPTOR typedef struct CUDA_ARRAY_DESCRIPTOR_st CUDA_ARRAY_DESCRIPTOR typedef struct CUDA_MEMCPY2D_st CUDA_MEMCPY2D typedef struct CUDA_MEMCPY3D_st CUDA_MEMCPY3D typedef int CUdevice typedef enum CUdevice_attribute_enum CUdevice_attribute typedef unsigned int CUdeviceptr typedef struct CUdevprop_st CUdevprop typedef struct CUevent_st ∗ CUevent typedef enum CUevent_flags_enum CUevent_flags typedef enum CUfilter_mode_enum CUfilter_mode typedef enum CUfunc_cache_enum CUfunc_cache typedef struct CUfunc_st ∗ CUfunction typedef enum CUfunction_attribute_enum CUfunction_attribute typedef enum CUgraphicsMapResourceFlags_enum CUgraphicsMapResourceFlags typedef enum CUgraphicsRegisterFlags_enum CUgraphicsRegisterFlags Generated for NVIDIA CUDA Library by Doxygen .

CU_AD_FORMAT_SIGNED_INT16 = 0x09.4. CU_CUBEMAP_FACE_POSITIVE_Z = 0x04. CU_AD_FORMAT_FLOAT = 0x20 } • enum CUcomputemode_enum { CU_COMPUTEMODE_DEFAULT = 0. CU_CUBEMAP_FACE_NEGATIVE_Z = 0x05 } • enum CUarray_format_enum { CU_AD_FORMAT_UNSIGNED_INT8 = 0x01. CU_TR_ADDRESS_MODE_MIRROR = 2. CU_AD_FORMAT_UNSIGNED_INT32 = 0x03. CU_COMPUTEMODE_PROHIBITED = 2 } • enum CUctx_flags_enum { CU_CTX_SCHED_AUTO = 0. CU_CUBEMAP_FACE_NEGATIVE_X = 0x01. CU_CTX_LMEM_RESIZE_TO_MAX = 16 } Generated for NVIDIA CUDA Library by Doxygen . CU_CUBEMAP_FACE_NEGATIVE_Y = 0x03. CU_CTX_SCHED_SPIN = 1. CU_COMPUTEMODE_EXCLUSIVE = 1. CU_CTX_SCHED_YIELD = 2 . CU_AD_FORMAT_UNSIGNED_INT16 = 0x02. CU_AD_FORMAT_SIGNED_INT8 = 0x08. CU_AD_FORMAT_HALF = 0x10.25 Data types used by CUDA driver • • • • • • • • • • • typedef struct CUgraphicsResource_st ∗ CUgraphicsResource typedef enum CUjit_fallback_enum CUjit_fallback typedef enum CUjit_option_enum CUjit_option typedef enum CUjit_target_enum CUjit_target typedef enum CUlimit_enum CUlimit typedef enum CUmemorytype_enum CUmemorytype typedef struct CUmod_st ∗ CUmodule typedef enum cudaError_enum CUresult typedef struct CUstream_st ∗ CUstream typedef struct CUsurfref_st ∗ CUsurfref typedef struct CUtexref_st ∗ CUtexref 149 Enumerations • enum CUaddress_mode_enum { CU_TR_ADDRESS_MODE_WRAP = 0. CU_TR_ADDRESS_MODE_CLAMP = 1. CU_TR_ADDRESS_MODE_BORDER = 3 } • enum CUarray_cubemap_face_enum { CU_CUBEMAP_FACE_POSITIVE_X = 0x00. CU_AD_FORMAT_SIGNED_INT32 = 0x0a. CU_CTX_BLOCKING_SYNC = 4. CU_CUBEMAP_FACE_POSITIVE_Y = 0x02. CU_CTX_MAP_HOST = 8.

150 • enum cudaError_enum { CUDA_SUCCESS = 0. CUDA_ERROR_MAP_FAILED = 205. CUDA_ERROR_NOT_MAPPED_AS_ARRAY = 212. CUDA_ERROR_LAUNCH_TIMEOUT = 702. CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES = 701. CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y = 3. CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z = 4. CUDA_ERROR_ALREADY_ACQUIRED = 210. CUDA_ERROR_UNSUPPORTED_LIMIT = 215. CUDA_ERROR_DEINITIALIZED = 4. CUDA_ERROR_ECC_UNCORRECTABLE = 214. CUDA_ERROR_OUT_OF_MEMORY = 2. CUDA_ERROR_NO_DEVICE = 100. CUDA_ERROR_INVALID_HANDLE = 400. CUDA_ERROR_INVALID_CONTEXT = 201. CUDA_ERROR_OPERATING_SYSTEM = 304. CUDA_ERROR_NOT_MAPPED_AS_POINTER = 213. CUDA_ERROR_ARRAY_IS_MAPPED = 207. CUDA_ERROR_UNMAP_FAILED = 206. CUDA_ERROR_INVALID_IMAGE = 200. CUDA_ERROR_INVALID_DEVICE = 101. CUDA_ERROR_UNKNOWN = 999 } • enum CUdevice_attribute_enum { CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 1. CUDA_ERROR_ALREADY_MAPPED = 208. CUDA_ERROR_NOT_MAPPED = 211. CUDA_ERROR_INVALID_SOURCE = 300. CUDA_ERROR_CONTEXT_ALREADY_CURRENT = 202. CUDA_ERROR_SHARED_OBJECT_INIT_FAILED = 303. CUDA_ERROR_NOT_FOUND = 500. CUDA_ERROR_NO_BINARY_FOR_GPU = 209. CUDA_ERROR_NOT_READY = 600. CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING = 703. CUDA_ERROR_FILE_NOT_FOUND = 301. CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND = 302. CUDA_ERROR_INVALID_VALUE = 1. CUDA_ERROR_LAUNCH_FAILED = 700. CUDA_ERROR_NOT_INITIALIZED = 3. Module Documentation Generated for NVIDIA CUDA Library by Doxygen . CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X = 5. CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X = 2.

CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT = 14. CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT = 25. CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK = 8. CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK = 12. CU_EVENT_DISABLE_TIMING = 2 } • enum CUfilter_mode_enum { CU_TR_FILTER_MODE_POINT = 0. CU_DEVICE_ATTRIBUTE_MAX_PITCH = 11. CU_DEVICE_ATTRIBUTE_GPU_OVERLAP = 15. CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS = 31. CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z = 7.4. CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID = 34. CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES = 29. CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK = 12. CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT = 16. CU_DEVICE_ATTRIBUTE_WARP_SIZE = 10. CU_TR_FILTER_MODE_LINEAR = 1 } Generated for NVIDIA CUDA Library by Doxygen 151 .25 Data types used by CUDA driver CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y = 6. CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH = 22. CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH = 24. CU_EVENT_BLOCKING_SYNC = 1. CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT = 17. CU_DEVICE_ATTRIBUTE_ECC_ENABLED = 32. CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT = 23. CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY = 19. CU_DEVICE_ATTRIBUTE_INTEGRATED = 18. CU_DEVICE_ATTRIBUTE_CLOCK_RATE = 13. CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH = 26. CU_DEVICE_ATTRIBUTE_TCC_DRIVER = 35 } • enum CUevent_flags_enum { CU_EVENT_DEFAULT = 0. CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY = 9. CU_DEVICE_ATTRIBUTE_COMPUTE_MODE = 20. CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK = 8. CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT = 30. CU_DEVICE_ATTRIBUTE_PCI_BUS_ID = 33. CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT = 28. CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH = 21. CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH = 27.

CU_FUNC_ATTRIBUTE_NUM_REGS = 4.152 • enum CUfunc_cache_enum { CU_FUNC_CACHE_PREFER_NONE = 0x00. CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES. CU_JIT_INFO_LOG_BUFFER. CU_TARGET_COMPUTE_21 } • enum CUlimit_enum { CU_LIMIT_STACK_SIZE = 0x00. CU_JIT_TARGET_FROM_CUCONTEXT. CU_LIMIT_PRINTF_FIFO_SIZE = 0x01. CU_FUNC_CACHE_PREFER_SHARED = 0x01. CU_JIT_ERROR_LOG_BUFFER. CU_MEMORYTYPE_ARRAY = 0x03 } Module Documentation Generated for NVIDIA CUDA Library by Doxygen . CU_JIT_FALLBACK_STRATEGY } • enum CUjit_target_enum { CU_TARGET_COMPUTE_10 = 0. CU_JIT_WALL_TIME. CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES = 2. CU_TARGET_COMPUTE_20. CU_LIMIT_MALLOC_HEAP_SIZE = 0x02 } • enum CUmemorytype_enum { CU_MEMORYTYPE_HOST = 0x01. CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES = 3. CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES. CU_JIT_TARGET. CU_MEMORYTYPE_DEVICE = 0x02. CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = 1. CU_JIT_THREADS_PER_BLOCK. CU_PREFER_BINARY } • enum CUjit_option_enum { CU_JIT_MAX_REGISTERS = 0. CU_TARGET_COMPUTE_11. CU_TARGET_COMPUTE_13. CU_TARGET_COMPUTE_12. CU_FUNC_CACHE_PREFER_L1 = 0x02 } • enum CUfunction_attribute_enum { CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 0. CU_FUNC_ATTRIBUTE_BINARY_VERSION = 6 } • enum CUgraphicsMapResourceFlags_enum • enum CUgraphicsRegisterFlags_enum • enum CUjit_fallback_enum { CU_PREFER_PTX = 0. CU_FUNC_ATTRIBUTE_PTX_VERSION = 5. CU_JIT_OPTIMIZATION_LEVEL.

25.5 #define CU_TRSA_OVERRIDE_FORMAT 0x01 Override the texref format with a format inferred from the array.1].25 Data types used by CUDA driver 153 4. host memory is mapped into CUDA address space and cuMemHostGetDevicePointer() may be called on the host pointer.25.6 #define CU_TRSF_NORMALIZED_COORDINATES 0x02 Use normalized texture coordinates in the range [0.25. host memory is allocated as write-combined . Flag for cuMemHostAlloc() 4.1.dim).9 #define CUDA_ARRAY3D_2DARRAY 0x01 If set. 4.1. 4. Flag for cuTexRefSetArray() 4.1.25. the CUDA array contains an array of 2D slices and the Depth member of CUDA_ARRAY3D_DESCRIPTOR specifies the number of slices.1.fast to write. Flag for cuMemHostAlloc() 4.1. Flag for cuTexRefSetFlags() 4. faster to DMA.1 4.25. not the depth of a 3D array.1 Define Documentation #define CU_MEMHOSTALLOC_DEVICEMAP 0x02 If set. Flag for cuTexRefSetFlags() 4.1. Flag for cuMemHostAlloc() 4.25.3 #define CU_MEMHOSTALLOC_WRITECOMBINED 0x04 If set.4.2 #define CU_MEMHOSTALLOC_PORTABLE 0x01 If set.1.1.25.1.25. use default texunit from texture reference.1) instead of [0.25.10 #define CUDA_ARRAY3D_SURFACE_LDST 0x02 This flag must be set in order to bind a surface reference to the CUDA array Generated for NVIDIA CUDA Library by Doxygen . host memory is portable between CUDA contexts.1.25.25. slow to read except via SSE4 streaming load instruction (MOVNTDQA).7 #define CU_TRSF_READ_AS_INTEGER 0x01 Read the texture as integers rather than promoting the values to floats in the range [0.8 #define CU_TRSF_SRGB 0x10 Perform sRGB->linear conversion during texture read. Flag for cuTexRefSetFlags() 4.4 #define CU_PARAM_TR_DEFAULT -1 For texture references loaded into the module.

1 Typedef Documentation typedef enum CUaddress_mode_enum CUaddress_mode Texture reference addressing modes 4.8 typedef struct CUDA_ARRAY3D_DESCRIPTOR_st CUDA_ARRAY3D_DESCRIPTOR 3D array descriptor 4.2.9 typedef struct CUDA_ARRAY_DESCRIPTOR_st CUDA_ARRAY_DESCRIPTOR Array descriptor 4.2 4.154 4.2.2.11 #define CUDA_VERSION 3020 Module Documentation CUDA API version number 4.2.1.25.25.25.2 typedef struct CUarray_st∗ CUarray CUDA array 4.25.2.25.2.2.7 typedef enum CUctx_flags_enum CUctx_flags Context creation flags 4.25.25.25.5 typedef enum CUcomputemode_enum CUcomputemode Compute Modes 4.25.2.25.25.10 typedef struct CUDA_MEMCPY2D_st CUDA_MEMCPY2D 2D memory copy parameters Generated for NVIDIA CUDA Library by Doxygen .2.4 typedef enum CUarray_format_enum CUarray_format Array formats 4.25.3 typedef enum CUarray_cubemap_face_enum CUarray_cubemap_face Array indices for cube faces 4.6 typedef struct CUctx_st∗ CUcontext CUDA context 4.2.

2.2.25.2.2.2.2.25.21 typedef enum CUfunction_attribute_enum CUfunction_attribute Function properties 4.16 typedef struct CUevent_st∗ CUevent CUDA event 4.2.25.20 typedef struct CUfunc_st∗ CUfunction CUDA function 4.22 typedef enum CUgraphicsMapResourceFlags_enum CUgraphicsMapResourceFlags Flags for mapping and unmapping interop resources Generated for NVIDIA CUDA Library by Doxygen .2.25.25.25 Data types used by CUDA driver 4.25.14 typedef unsigned int CUdeviceptr CUDA device pointer 4.4.13 typedef enum CUdevice_attribute_enum CUdevice_attribute Device properties 4.15 typedef struct CUdevprop_st CUdevprop Legacy device properties 4.25.17 typedef enum CUevent_flags_enum CUevent_flags Event creation flags 4.25.18 typedef enum CUfilter_mode_enum CUfilter_mode Texture reference filtering modes 4.25.2.25.12 typedef int CUdevice CUDA device 4.25.19 typedef enum CUfunc_cache_enum CUfunc_cache Function cache configurations 4.2.2.2.25.11 typedef struct CUDA_MEMCPY3D_st CUDA_MEMCPY3D 155 3D memory copy parameters 4.

25.24 typedef struct CUgraphicsResource_st∗ CUgraphicsResource CUDA graphics interop resource 4.2.23 typedef enum CUgraphicsRegisterFlags_enum CUgraphicsRegisterFlags Module Documentation Flags to register a graphics resource 4.2.25.34 typedef struct CUtexref_st∗ CUtexref CUDA texture reference Generated for NVIDIA CUDA Library by Doxygen .26 typedef enum CUjit_option_enum CUjit_option Online compiler options 4.25.25.33 typedef struct CUsurfref_st∗ CUsurfref CUDA surface reference 4.30 typedef struct CUmod_st∗ CUmodule CUDA module 4.2.2.2.25.25.25.2.25.25.2.32 typedef struct CUstream_st∗ CUstream typedef enum cudaError_enum CUresult CUDA stream 4.25.28 Limits 4.25.2.2.156 4.29 typedef enum CUmemorytype_enum CUmemorytype typedef enum CUlimit_enum CUlimit Memory types 4.25 typedef enum CUjit_fallback_enum CUjit_fallback Cubin matching fallback strategies 4.2.27 typedef enum CUjit_target_enum CUjit_target Online compilation targets 4.2.31 Error codes 4.25.2.

25.25.2 enum CUarray_cubemap_face_enum Array indices for cube faces Enumerator: CU_CUBEMAP_FACE_POSITIVE_X Positive X face of cubemap CU_CUBEMAP_FACE_NEGATIVE_X Negative X face of cubemap CU_CUBEMAP_FACE_POSITIVE_Y Positive Y face of cubemap CU_CUBEMAP_FACE_NEGATIVE_Y Negative Y face of cubemap CU_CUBEMAP_FACE_POSITIVE_Z Positive Z face of cubemap CU_CUBEMAP_FACE_NEGATIVE_Z Negative Z face of cubemap 4.4.3 4.1 Enumeration Type Documentation enum CUaddress_mode_enum Texture reference addressing modes Enumerator: CU_TR_ADDRESS_MODE_WRAP Wrapping address mode CU_TR_ADDRESS_MODE_CLAMP Clamp to edge address mode CU_TR_ADDRESS_MODE_MIRROR Mirror address mode CU_TR_ADDRESS_MODE_BORDER Border address mode 4.3 enum CUarray_format_enum Array formats Enumerator: CU_AD_FORMAT_UNSIGNED_INT8 Unsigned 8-bit integers CU_AD_FORMAT_UNSIGNED_INT16 Unsigned 16-bit integers CU_AD_FORMAT_UNSIGNED_INT32 Unsigned 32-bit integers CU_AD_FORMAT_SIGNED_INT8 Signed 8-bit integers CU_AD_FORMAT_SIGNED_INT16 Signed 16-bit integers CU_AD_FORMAT_SIGNED_INT32 Signed 32-bit integers CU_AD_FORMAT_HALF 16-bit floating point CU_AD_FORMAT_FLOAT 32-bit floating point 4.3.3.25.3.4 enum CUcomputemode_enum Compute Modes Enumerator: CU_COMPUTEMODE_DEFAULT Default compute mode (Multiple contexts allowed per device) Generated for NVIDIA CUDA Library by Doxygen .25 Data types used by CUDA driver 157 4.25.3.25.

this can also mean that the operation being queried is complete (see cuEventQuery() and cuStreamQuery()). This can also be returned if the context passed to an API call is not a valid handle (such as a context that has had cuCtxDestroy() invoked on it).158 Module Documentation CU_COMPUTEMODE_EXCLUSIVE Compute-exclusive mode (Only one context can be present on this device at a time) CU_COMPUTEMODE_PROHIBITED Compute-prohibited mode (No contexts can be created on this device at this time) 4. CUDA_ERROR_INVALID_CONTEXT This most frequently indicates that there is no context bound to the current thread. It is no longer an error to attempt to push the active context via cuCtxPushCurrent().3. CUDA_ERROR_NOT_INITIALIZED This indicates that the CUDA driver has not been initialized with cuInit() or that initialization has failed. CUDA_ERROR_OUT_OF_MEMORY The API call failed because it was unable to allocate enough memory to perform the requested operation. See cuCtxGetApiVersion() for more details.e. This can also be returned if a user mixes different API versions (i.25.2. CUDA_ERROR_INVALID_VALUE This indicates that one or more of the parameters passed to the API call is not within an acceptable range of values.5 enum CUctx_flags_enum Context creation flags Enumerator: CU_CTX_SCHED_AUTO Automatic scheduling CU_CTX_SCHED_SPIN Set spin as default scheduling CU_CTX_SCHED_YIELD Set yield as default scheduling CU_CTX_BLOCKING_SYNC Use blocking synchronization CU_CTX_MAP_HOST Support mapped pinned allocations CU_CTX_LMEM_RESIZE_TO_MAX Keep local memory allocation after launch 4. 3010 context with 3020 API calls).6 enum cudaError_enum Error codes Enumerator: CUDA_SUCCESS The API call returned with no errors.25. Deprecated This error return is deprecated as of CUDA 3. This can also indicate an invalid CUDA module. Generated for NVIDIA CUDA Library by Doxygen . In the case of query calls. CUDA_ERROR_CONTEXT_ALREADY_CURRENT This indicated that the context being supplied as a parameter to the API call was already the active context. CUDA_ERROR_INVALID_DEVICE This indicates that the device ordinal supplied by the user does not correspond to a valid CUDA device. CUDA_ERROR_INVALID_IMAGE This indicates that the device kernel image is invalid. CUDA_ERROR_DEINITIALIZED This indicates that the CUDA driver is in the process of shutting down.3. CUDA_ERROR_NO_DEVICE This indicates that no CUDA-capable devices were detected by the installed CUDA driver.

This can occur when a user specifies code generation options for a particular CUDA source file that do not include the corresponding device configuration. Common causes include dereferencing an invalid device pointer and accessing out of bounds shared memory. CUDA_ERROR_UNSUPPORTED_LIMIT This indicates that the CUlimit passed to the API call is not supported by the active device.see the device attribute CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT for more information. All existing device memory allocations from this context are invalid and must be reconstructed if the program is to continue using CUDA. This can only occur if timeouts are enabled . CUDA_ERROR_NOT_MAPPED_AS_ARRAY This indicates that a mapped resource is not available for access as an array. CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND This indicates that a link to a shared object failed to resolve. The context cannot be used (and must be destroyed similar to CUDA_ERROR_LAUNCH_FAILED). CUDA_ERROR_ALREADY_MAPPED This indicates that the resource is already mapped. and surface names. CUDA_ERROR_NOT_MAPPED_AS_POINTER This indicates that a mapped resource is not available for access as a pointer. Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_NO_BINARY_FOR_GPU This indicates that there is no kernel image available that is suitable for the device. but must be indicated differently than CUDA_SUCCESS (which indicates completion). The context cannot be used. Resource handles are opaque types like CUstream and CUevent.e. texture names. CUDA_ERROR_ECC_UNCORRECTABLE This indicates that an uncorrectable ECC error was detected during execution. so it must be destroyed (and a new one should be created). All existing device memory allocations from this context are invalid and must be reconstructed if the program is to continue using CUDA.25 Data types used by CUDA driver CUDA_ERROR_MAP_FAILED This indicates that a map or register operation has failed. CUDA_ERROR_FILE_NOT_FOUND This indicates that the file specified was not found. CUDA_ERROR_UNMAP_FAILED This indicates that an unmap or unregister operation has failed. CUDA_ERROR_INVALID_HANDLE This indicates that a resource handle passed to the API call was not valid. CUDA_ERROR_NOT_READY This indicates that asynchronous operations issued previously have not completed yet. This error usually indicates that the user has attempted to pass too many arguments to the device kernel. a 64-bit pointer when a 32-bit int is expected) is equivalent to passing too many arguments and can also result in this error. CUDA_ERROR_LAUNCH_FAILED An exception occurred on the device while executing a kernel.4. CUDA_ERROR_LAUNCH_TIMEOUT This indicates that the device kernel took too long to execute. CUDA_ERROR_NOT_MAPPED This indicates that a resource is not mapped. CUDA_ERROR_NOT_FOUND This indicates that a named symbol was not found. CUDA_ERROR_ALREADY_ACQUIRED This indicates that a resource has already been acquired. CUDA_ERROR_SHARED_OBJECT_INIT_FAILED This indicates that initialization of a shared object failed. Calls that may return this value include cuEventQuery() and cuStreamQuery(). Passing arguments of the wrong size (i. This result is not actually an error. or the kernel launch specifies too many threads for the kernel’s register count. Examples of symbols are global/constant variable names. CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES This indicates that a launch did not occur because it did not have appropriate resources. CUDA_ERROR_INVALID_SOURCE This indicates that the device kernel source is invalid. CUDA_ERROR_OPERATING_SYSTEM This indicates that an OS call failed. 159 CUDA_ERROR_ARRAY_IS_MAPPED This indicates that the specified array is currently mapped and thus cannot be destroyed.

ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK use CU_DEVICE_- CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY Memory available on device for __constant__ variables in a CUDA C kernel in bytes CU_DEVICE_ATTRIBUTE_WARP_SIZE Warp size in threads CU_DEVICE_ATTRIBUTE_MAX_PITCH Maximum pitch in bytes allowed by memory copies CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK Maximum number of 32-bit registers available per block CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK Deprecated. CUDA_ERROR_UNKNOWN This indicates that an unknown internal error has occurred. 4.7 enum CUdevice_attribute_enum Device properties Enumerator: CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK Maximum number of threads per block CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X Maximum block dimension X CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y Maximum block dimension Y CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z Maximum block dimension Z CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X Maximum grid dimension X CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y Maximum grid dimension Y CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z Maximum grid dimension Z CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK Maximum shared memory available per block in bytes CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK Deprecated.3.160 Module Documentation CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING This error indicates a kernel launch that uses an incompatible texturing mode.25. use CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK CU_DEVICE_ATTRIBUTE_CLOCK_RATE Peak clock frequency in kilohertz CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT Alignment requirement for textures CU_DEVICE_ATTRIBUTE_GPU_OVERLAP Device can possibly copy memory and execute a kernel concurrently CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT Number of multiprocessors on device CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT Specifies whether there is a run time limit on kernels CU_DEVICE_ATTRIBUTE_INTEGRATED Device is integrated with host memory CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY Device can map host memory into CUDA address space CU_DEVICE_ATTRIBUTE_COMPUTE_MODE Compute mode (See CUcomputemode for details) CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH Maximum 1D texture width CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH Maximum 2D texture width CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT Maximum 2D texture height CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH Maximum 3D texture width CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT Maximum 3D texture height Generated for NVIDIA CUDA Library by Doxygen .

25.10 enum CUfunc_cache_enum Function cache configurations Enumerator: CU_FUNC_CACHE_PREFER_NONE no preference for shared memory or L1 (default) CU_FUNC_CACHE_PREFER_SHARED prefer larger shared memory and smaller L1 cache CU_FUNC_CACHE_PREFER_L1 prefer larger L1 cache and smaller shared memory Generated for NVIDIA CUDA Library by Doxygen .25.25.8 enum CUevent_flags_enum Event creation flags Enumerator: CU_EVENT_DEFAULT Default event flag CU_EVENT_BLOCKING_SYNC Event uses blocking synchronization CU_EVENT_DISABLE_TIMING Event will not record timing data 4.4.3.25 Data types used by CUDA driver CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH Maximum 3D texture depth 161 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH Maximum texture array width CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT Maximum texture array height CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES Maximum slices in a texture array CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT Alignment requirement for surfaces CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS Device can possibly execute multiple kernels concurrently CU_DEVICE_ATTRIBUTE_ECC_ENABLED Device has ECC support enabled CU_DEVICE_ATTRIBUTE_PCI_BUS_ID PCI bus ID of the device CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID PCI device ID of the device CU_DEVICE_ATTRIBUTE_TCC_DRIVER Device is using TCC driver model 4.9 enum CUfilter_mode_enum Texture reference filtering modes Enumerator: CU_TR_FILTER_MODE_POINT Point filter mode CU_TR_FILTER_MODE_LINEAR Linear filter mode 4.3.3.

25. CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES The size in bytes of user-allocated constant memory required by this function. CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES The size in bytes of local memory used by each thread of this function.0.3.25.11 enum CUfunction_attribute_enum Module Documentation Function properties Enumerator: CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK The maximum number of threads per block. This does not include dynamically-allocated shared memory requested by the user at runtime. so a binary version 1.25.3.3. beyond which a launch of the function would fail. Note that this will return a value of 10 for legacy cubins that do not have a properly-encoded binary architecture version.162 4.12 enum CUgraphicsMapResourceFlags_enum Flags for mapping and unmapping interop resources 4.3. 4. This number depends on both the function and the device on which the function is currently loaded.14 enum CUjit_fallback_enum Cubin matching fallback strategies Enumerator: CU_PREFER_PTX Prefer to compile ptx CU_PREFER_BINARY Prefer to fall back to compatible binary code 4. CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES The size in bytes of statically-allocated shared memory required by this function. Option type: unsigned int Generated for NVIDIA CUDA Library by Doxygen .3 function would return the value 13. Note that this may return the undefined value of 0 for cubins compiled prior to CUDA 3.25.13 enum CUgraphicsRegisterFlags_enum Flags to register a graphics resource 4. This value is the major binary version ∗ 10 + the minor binary version.15 enum CUjit_option_enum Online compiler options Enumerator: CU_JIT_MAX_REGISTERS Max number of registers that a thread may use.25. CU_FUNC_ATTRIBUTE_NUM_REGS The number of registers used by each thread of this function. CU_FUNC_ATTRIBUTE_PTX_VERSION The PTX virtual architecture version for which the function was compiled. so a PTX version 1. This value is the major PTX version ∗ 10 + the minor PTX version. CU_FUNC_ATTRIBUTE_BINARY_VERSION The binary architecture version for which the function was compiled.3 function would return the value 13.3.

Log messages will be capped at this size (including null terminator) OUT: Amount of log buffer filled with messages Option type: unsigned int CU_JIT_OPTIMIZATION_LEVEL Level of optimizations to apply to generated code (0 . Determines the target based on the current attached context (default) Option type: No option value needed CU_JIT_TARGET Target is chosen based on supplied CUjit_target_enum.2 Compute device class 1.g. Option type: unsigned int CU_JIT_TARGET_FROM_CUCONTEXT No option value required.4. with 4 being the default and highest level of optimizations.1 Generated for NVIDIA CUDA Library by Doxygen . in milliseconds. spent creating the cubin Option type: float CU_JIT_INFO_LOG_BUFFER Pointer to a buffer in which to print any log messsages from PTXAS that are informational in nature (the buffer size is specified via option CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES) Option type: char∗ CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES IN: Log buffer size in bytes. max registers) such that a block with the given number of threads should be able to launch based on register limitations.1 Compute device class 1. Log messages will be capped at this size (including null terminator) OUT: Amount of log buffer filled with messages Option type: unsigned int CU_JIT_ERROR_LOG_BUFFER Pointer to a buffer in which to print any log messages from PTXAS that reflect errors (the buffer size is specified via option CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES) Option type: char∗ CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES IN: Log buffer size in bytes. Option type: unsigned int CU_JIT_WALL_TIME Returns a float value in the option of the wall clock time.25.0 Compute device class 2.3.0 Compute device class 1.16 enum CUjit_target_enum Online compilation targets Enumerator: CU_TARGET_COMPUTE_10 CU_TARGET_COMPUTE_11 CU_TARGET_COMPUTE_12 CU_TARGET_COMPUTE_13 CU_TARGET_COMPUTE_20 CU_TARGET_COMPUTE_21 Compute device class 1.25 Data types used by CUDA driver 163 CU_JIT_THREADS_PER_BLOCK IN: Specifies minimum number of threads per block to target compilation for OUT: Returns the number of threads the compiler actually targeted. Option type: unsigned int for enumerated type CUjit_target_enum CU_JIT_FALLBACK_STRATEGY Specifies choice of fallback strategy if matching cubin is not found. Note.3 Compute device class 2.4). such as shared memory utilization. this option does not currently take into account any other resource limitations. This restricts the resource utilization fo the compiler (e. Choice is based on supplied CUjit_fallback_enum. Option type: unsigned int for enumerated type CUjit_fallback_enum 4.

25.25.18 enum CUmemorytype_enum Memory types Enumerator: CU_MEMORYTYPE_HOST Host memory CU_MEMORYTYPE_DEVICE Device memory CU_MEMORYTYPE_ARRAY Array memory Generated for NVIDIA CUDA Library by Doxygen .164 4.17 Limits Enumerator: CU_LIMIT_STACK_SIZE GPU thread stack size CU_LIMIT_PRINTF_FIFO_SIZE GPU printf FIFO size CU_LIMIT_MALLOC_HEAP_SIZE GPU malloc heap size enum CUlimit_enum Module Documentation 4.3.3.

2. 4.26 Initialization 165 4.Initialization flag for CUDA.1 Function Documentation CUresult cuInit (unsigned int Flags) Initializes the driver API and must be called before any other function from the driver API. Generated for NVIDIA CUDA Library by Doxygen .26. CUDA_ERROR_INVALID_DEVICE Note: Note that this function may also return error codes from previous. any function from the driver API will return CUDA_ERROR_NOT_INITIALIZED.4. Returns: CUDA_SUCCESS.1 Detailed Description This section describes the initialization functions of the low-level CUDA driver application programming interface. If cuInit() has not been called. CUDA_ERROR_INVALID_VALUE. 4. Currently.26 Initialization Functions • CUresult cuInit (unsigned int Flags) Initialize the CUDA driver API.26. the Flags parameter must be 0. Parameters: Flags .2 4.26. asynchronous launches.

Parameters: driverVersion .1 Detailed Description This section describes the version management functions of the low-level CUDA driver application programming interface.27 Version Management Functions • CUresult cuDriverGetVersion (int ∗driverVersion) Returns the CUDA driver version. 4.27.27.166 Module Documentation 4.27. This function automatically returns CUDA_ERROR_INVALID_VALUE if the driverVersion argument is NULL.2. asynchronous launches.Returns the CUDA driver version Returns: CUDA_SUCCESS. 4. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous.1 Function Documentation CUresult cuDriverGetVersion (int ∗ driverVersion) Returns in ∗driverVersion the version number of the installed CUDA driver. Generated for NVIDIA CUDA Library by Doxygen .2 4.

28 Device Management 167 4. CUdevice dev) Returns properties for a selected device. CUDA_ERROR_NOT_INITIALIZED. Parameters: major .Minor revision number dev . CUdevice dev) Returns information about the device.1 Detailed Description This section describes the device management functions of the low-level CUDA driver application programming interface. int ordinal) Returns a handle to a compute device. CUdevice dev) Returns the compute capability of the device. CUdevice dev) Returns in ∗major and ∗minor the major and minor revision numbers that define the compute capability of the device dev. CUdevice dev) Returns the total amount of memory on the device.Device handle Returns: CUDA_SUCCESS. int ∗ minor.2.28 Device Management Functions • CUresult cuDeviceComputeCapability (int ∗major. • CUresult cuDeviceGetName (char ∗name. CUDA_ERROR_INVALID_VALUE. asynchronous launches. CUDA_ERROR_INVALID_CONTEXT.4.Major revision number minor .28.2 4. CUDA_ERROR_DEINITIALIZED.28. 4. CUdevice dev) Returns an identifer string for the device. • CUresult cuDeviceGetProperties (CUdevprop ∗prop. • CUresult cuDeviceGet (CUdevice ∗device. CUdevice_attribute attrib. CUDA_ERROR_INVALID_DEVICE Note: Note that this function may also return error codes from previous. int ∗minor.28. • CUresult cuDeviceTotalMem (size_t ∗bytes.1 Function Documentation CUresult cuDeviceComputeCapability (int ∗ major. int len. Generated for NVIDIA CUDA Library by Doxygen . 4. • CUresult cuDeviceGetCount (int ∗count) Returns the number of compute-capable devices. • CUresult cuDeviceGetAttribute (int ∗pi.

cuDeviceGetAttribute. cuDeviceGetCount. int ordinal) Returns in ∗device a device handle given an ordinal in the range [0. cuDeviceTotalMem 4.2.Returned device handle ordinal . • CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X: Maximum x-dimension of a block. cuDeviceGetCount()-1].2 CUresult cuDeviceGet (CUdevice ∗ device.28. cuDeviceGetName. • CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X: Maximum x-dimension of a grid. CUDA_ERROR_NOT_INITIALIZED.3 CUresult cuDeviceGetAttribute (int ∗ pi.2.28. cuDeviceGetProperties. CUDA_ERROR_INVALID_VALUE. cuDeviceGetCount. CUDA_ERROR_INVALID_CONTEXT. • CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z: Maximum z-dimension of a grid. CUDA_ERROR_DEINITIALIZED. • CU_DEVICE_ATTRIBUTE_WARP_SIZE: Warp size in threads. The supported attributes are: • CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK: Maximum number of threads per block. cuDeviceGetName.168 See also: Module Documentation cuDeviceGetAttribute. CUdevice dev) Returns in ∗pi the integer value of the attribute attrib on device dev. cuDeviceTotalMem 4. CUDA_ERROR_INVALID_DEVICE Note: Note that this function may also return error codes from previous.Device number to get handle for Returns: CUDA_SUCCESS. CUdevice_attribute attrib. Generated for NVIDIA CUDA Library by Doxygen . asynchronous launches. • CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY: Memory available on device for __constant__ variables in a CUDA C kernel in bytes. Parameters: device . this amount is shared by all thread blocks simultaneously resident on a multiprocessor. cuDeviceGetProperties. • CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y: Maximum y-dimension of a block. See also: cuDeviceComputeCapability. • CU_DEVICE_ATTRIBUTE_MAX_PITCH: Maximum pitch in bytes allowed by the memory copy functions that involve memory regions allocated through cuMemAllocPitch(). • CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z: Maximum z-dimension of a block. • CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK: Maximum amount of shared memory available to a thread block in bytes. cuDeviceGet. • CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y: Maximum y-dimension of a grid.

• CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT: Number of multiprocessors on the device. • CU_DEVICE_ATTRIBUTE_COMPUTE_MODE: Compute mode that device is currently in.Returned device attribute value attrib . CUDA_ERROR_INVALID_CONTEXT.Device is not restricted and can have multiple CUDA contexts present at a single time.28 Device Management 169 • CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK: Maximum number of 32-bit registers available to a thread block. 0 if error correction is disabled or not supported by the device. texture base addresses aligned to textureAlign bytes do not need an offset applied to texture fetches. • CU_DEVICE_ATTRIBUTE_ECC_ENABLED: 1 if error correction is enabled on the device. – CU_COMPUTEMODE_PROHIBITED: Compute-prohibited mode . or 0 if not. • CU_DEVICE_ATTRIBUTE_TCC_DRIVER: 1 if the device is using a TCC driver. or 0 if not. CUDA_ERROR_DEINITIALIZED. • CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT: 1 if there is a run time limit for kernels executed on the device. TCC is only available on Tesla hardware running Windows Vista or later. It is not guaranteed that multiple kernels will be resident on the device concurrently so this feature should not be relied upon for correctness. • CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY: 1 if the device can map host memory into the CUDA address space. Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_INVALID_DEVICE Note: Note that this function may also return error codes from previous. • CU_DEVICE_ATTRIBUTE_CLOCK_RATE: Peak clock frequency in kilohertz.Device is prohibited from creating new CUDA contexts. asynchronous launches. – CU_COMPUTEMODE_EXCLUSIVE: Compute-exclusive mode . • CU_DEVICE_ATTRIBUTE_GPU_OVERLAP: 1 if the device can concurrently copy memory between host and device while executing a kernel.4.Device handle Returns: CUDA_SUCCESS.Device can have only one CUDA context present on it at a time. • CU_DEVICE_ATTRIBUTE_PCI_BUS_ID: PCI bus identifier of the device. • CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT: Alignment requirement. • CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS: 1 if the device supports executing multiple kernels within the same context simultaneously. • CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID: PCI device (also known as slot) identifier of the device. CUDA_ERROR_INVALID_VALUE. or 0 if not. Parameters: pi . • CU_DEVICE_ATTRIBUTE_INTEGRATED: 1 if the device is integrated with the memory subsystem. Available modes are as follows: – CU_COMPUTEMODE_DEFAULT: Default mode . this number is shared by all thread blocks simultaneously resident on a multiprocessor. CUDA_ERROR_NOT_INITIALIZED.Device attribute to query dev . or 0 if not. or 0 if not.

28. CUDA_ERROR_DEINITIALIZED. cuDeviceTotalMem Generated for NVIDIA CUDA Library by Doxygen .0 that are available for execution.Device to get identifier string for Returns: CUDA_SUCCESS. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_NOT_INITIALIZED. cuDeviceGetName. cuDeviceGetProperties. cuDeviceGet. cuDeviceGetCount. Parameters: count . asynchronous launches. CUDA_ERROR_NOT_INITIALIZED. cuDeviceTotalMem CUDA_- 4. cuDeviceGetProperties.2.Maximum length of string to store in name dev . Parameters: name . CUDA_ERROR_INVALID_VALUE. CUdevice dev) Returns an ASCII string identifying the device dev in the NULL-terminated string pointed to by name. See also: cuDeviceComputeCapability. int len. ERROR_INVALID_CONTEXT.170 See also: Module Documentation cuDeviceComputeCapability.Returned number of compute-capable devices Returns: CUDA_SUCCESS. CUDA_ERROR_INVALID_DEVICE Note: Note that this function may also return error codes from previous. cuDeviceGet. cuDeviceGetCount() returns 0. cuDeviceGetProperties. cuDeviceGetAttribute. asynchronous launches. CUDA_ERROR_DEINITIALIZED. If there is no such device.28. See also: cuDeviceComputeCapability.Returned identifier string for the device len . CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. cuDeviceGetCount. cuDeviceGet. cuDeviceTotalMem 4.4 CUresult cuDeviceGetCount (int ∗ count) Returns in ∗count the number of devices with compute capability greater than or equal to 1. cuDeviceGetAttribute.2. len specifies the maximum length of the string that may be returned. cuDeviceGetName.5 CUresult cuDeviceGetName (char ∗ name.

int totalConstantMemory. CUDA_ERROR_INVALID_CONTEXT.28. • memPitch is the maximum pitch allowed by the memory copy functions that involve memory regions allocated through cuMemAllocPitch(). int clockRate. cuDeviceGetAttribute. • maxGridSize[3] is the maximum sizes of each dimension of a grid. Parameters: prop . CUDA_ERROR_DEINITIALIZED.4. • sharedMemPerBlock is the total amount of shared memory available per block in bytes. cuDeviceGetCount.Device to get properties for Returns: CUDA_SUCCESS. The CUdevprop structure is defined as: typedef struct CUdevprop_st { int maxThreadsPerBlock. cuDeviceTotalMem Generated for NVIDIA CUDA Library by Doxygen . • maxThreadsDim[3] is the maximum sizes of each dimension of a block. • SIMDWidth is the warp size. CUDA_ERROR_INVALID_DEVICE Note: Note that this function may also return error codes from previous. • textureAlign is the alignment requirement.6 CUresult cuDeviceGetProperties (CUdevprop ∗ prop. int memPitch. cuDeviceGetName. • regsPerBlock is the total number of registers available per block. cuDeviceGet.28 Device Management 4.2. • totalConstantMemory is the total amount of constant memory available on the device in bytes. int SIMDWidth. int maxGridSize[3]. int sharedMemPerBlock. int regsPerBlock. CUDA_ERROR_INVALID_VALUE. CUDA_ERROR_NOT_INITIALIZED. See also: cuDeviceComputeCapability. CUdevice dev) 171 Returns in ∗prop the properties of device dev. int textureAlign } CUdevprop. • clockRate is the clock frequency in kilohertz.Returned properties of device dev . asynchronous launches. int maxThreadsDim[3]. texture base addresses that are aligned to textureAlign bytes do not need an offset applied to texture fetches. where: • maxThreadsPerBlock is the maximum number of threads per block.

Returned memory available on device in bytes dev . CUDA_ERROR_INVALID_CONTEXT.Device handle Returns: CUDA_SUCCESS.172 4. CUDA_ERROR_INVALID_VALUE. cuDeviceGetProperties. cuDeviceGetCount. CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_DEINITIALIZED. CUDA_ERROR_INVALID_DEVICE Note: Note that this function may also return error codes from previous. Generated for NVIDIA CUDA Library by Doxygen . cuDeviceGetAttribute. asynchronous launches.7 CUresult cuDeviceTotalMem (size_t ∗ bytes. See also: cuDeviceComputeCapability.2. Parameters: bytes .28. CUdevice dev) Module Documentation Returns in ∗bytes the total amount of memory available on the device dev in bytes. cuDeviceGet. cuDeviceGetName.

4.29 Context Management Functions • CUresult cuCtxAttach (CUcontext ∗pctx. • CUresult cuCtxSetCacheConfig (CUfunc_cache config) Sets the preferred cache configuration for the current context. unsigned int flags. • CUresult cuCtxGetCacheConfig (CUfunc_cache ∗pconfig) Returns the preferred cache configuration for the current context.29 Context Management 173 4. • CUresult cuCtxGetApiVersion (CUcontext ctx. • CUresult cuCtxSynchronize (void) Block for a context’s tasks to complete. unsigned int ∗version) Gets the context’s API version. • CUresult cuCtxCreate (CUcontext ∗pctx. size_t value) Set resource limits.1 Detailed Description This section describes the context management functions of the low-level CUDA driver application programming interface. • CUresult cuCtxPopCurrent (CUcontext ∗pctx) Pops the current CUDA context from the current CPU thread. CUdevice dev) Create a CUDA context. Generated for NVIDIA CUDA Library by Doxygen .29. • CUresult cuCtxGetLimit (size_t ∗pvalue. 4. unsigned int flags) Increment a context’s usage-count. • CUresult cuCtxGetDevice (CUdevice ∗device) Returns the device ID for the current context. • CUresult cuCtxPushCurrent (CUcontext ctx) Pushes a floating context on the current CPU thread. • CUresult cuCtxDestroy (CUcontext ctx) Destroy the current context or a floating CUDA context. • CUresult cuCtxDetach (CUcontext ctx) Decrement a context’s usage-count. CUlimit limit) Returns resource limits. • CUresult cuCtxSetLimit (CUlimit limit.

CUdevice dev) Creates a new CUDA context and associates it with the calling thread. asynchronous launches. unsigned int flags) Increments the usage count of the context and passes back a context handle in ∗pctx that must be passed to cuCtxDetach() when the application is done with the context. otherwise CUDA will not yield while waiting for results and actively spin on the processor.29. • CU_CTX_BLOCKING_SYNC: Instruct CUDA to block the CPU thread on a synchronization primitive when waiting for the GPU to finish work. cuCtxGetApiVersion. uses a heuristic based on the number of active CUDA contexts in the process C and the number of logical processors in the system P. cuCtxGetLimit. then CUDA will yield to other OS threads when waiting for the GPU.2.2 CUresult cuCtxCreate (CUcontext ∗ pctx.Context attach flags (must be 0) Returns: CUDA_SUCCESS. cuCtxGetCacheConfig. it is supplanted by the newly created context and may be restored by a subsequent call to cuCtxPopCurrent().2. This can increase latency when waiting for the GPU. cuCtxDetach. The flags parameter is described below. but may lower the performance of CPU threads if they are performing work in parallel with the CUDA thread. interacts with the OS scheduler when waiting for results from the GPU. Currently. • CU_CTX_SCHED_SPIN: Instruct CUDA to actively spin when waiting for results from the GPU. The two LSBs of the flags parameter can be used to control how the OS thread. cuCtxGetDevice. CUDA_ERROR_DEINITIALIZED. See also: cuCtxCreate. cuCtxSynchronize CUDA_- 4. unsigned int flags. cuCtxPopCurrent. Parameters: pctx . ERROR_INVALID_CONTEXT. cuCtxPushCurrent. The context is created with a usage count of 1 and the caller of cuCtxCreate() must call cuCtxDestroy() or cuCtxDetach() when done using the context. cuCtxDestroy. Generated for NVIDIA CUDA Library by Doxygen .29. If C > P.174 Module Documentation 4. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. which owns the CUDA context at the time of an API call.29. • CU_CTX_SCHED_YIELD: Instruct CUDA to yield its thread when waiting for results from the GPU. This can decrease latency when waiting for the GPU.Returned context handle of the current context flags . cuCtxAttach() fails if there is no context current to the thread. cuCtxSetLimit. cuCtxSetCacheConfig.2 4. the flags parameter must be 0.1 Function Documentation CUresult cuCtxAttach (CUcontext ∗ pctx. If a context is already current to the thread. but can increase the performance of CPU threads performing work in parallel with the GPU. CUDA_ERROR_NOT_INITIALIZED. • CU_CTX_SCHED_AUTO: The default value if the flags parameter is zero.

cuCtxDestroy. cuCtxPushCurrent. cuCtxGetApiVersion. cuCtxGetCacheConfig. cuCtxGetDevice.Context to destroy Returns: CUDA_SUCCESS. cuCtxGetLimit. this function fails. CUDA_ERROR_INVALID_CONTEXT. • CU_CTX_LMEM_RESIZE_TO_MAX: Instruct CUDA to not reduce local memory after resizing local memory for a kernel. CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. Note to Linux users: Context creation will fail with CUDA_ERROR_UNKNOWN if the compute mode of the device is CU_COMPUTEMODE_PROHIBITED. CUDA_ERROR_INVALID_DEVICE. The function cuDeviceGetAttribute() can be used with CU_DEVICE_ATTRIBUTE_COMPUTE_MODE to determine the compute mode of the device. context creation will also fail with CUDA_ERROR_UNKNOWN if the compute mode for the device is set to CU_COMPUTEMODE_EXCLUSIVE and there is already an active context on the device. cuCtxPopCurrent. Generated for NVIDIA CUDA Library by Doxygen CUDA_- . Similarly. cuCtxSynchronize 4.3 CUresult cuCtxDestroy (CUcontext ctx) Destroys the CUDA context specified by ctx. CUDA_ERROR_DEINITIALIZED. asynchronous launches. CUDA_ERROR_NOT_INITIALIZED. This flag must be set in order to allocate pinned host memory that is accessible to the GPU. Documentation for nvidia-smi can be obtained by passing a -h option to it. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. cuCtxSetCacheConfig.29. asynchronous launches.Context creation flags dev . See also: cuCtxAttach.2.Device to create context on Returns: CUDA_SUCCESS. Floating contexts (detached from a CPU thread via cuCtxPopCurrent()) may be destroyed by this function. Parameters: pctx . This can prevent thrashing by local memory allocations when launching many kernels with high local memory usage at the cost of potentially increased memory usage. The nvidia-smi tool can be used to set the compute mode for devices. CUDA_ERROR_OUT_OF_MEMORY. Parameters: ctx .29 Context Management 175 • CU_CTX_MAP_HOST: Instruct CUDA to support mapped pinned allocations. or the context is current to any CPU thread other than the current one.Returned context handle of the new context flags . CUDA_ERROR_INVALID_VALUE. If the context usage count is not equal to 1. CUDA_ERROR_DEINITIALIZED. ERROR_INVALID_CONTEXT. cuCtxDetach.4. cuCtxSetLimit.

cuCtxPushCurrent. cuCtxPopCurrent. and must be current to the calling thread.2. which library developers can use to direct callers to a specific API version. Note that this API version may not be the same as returned by cuDriverGetVersion.4 CUresult cuCtxDetach (CUcontext ctx) Decrements the usage count of the context ctx. cuCtxGetLimit. cuCtxPushCurrent. 3010 or 3020). CUDA_ERROR_NOT_INITIALIZED. cuCtxSynchronize 4. cuCtxCreate. cuCtxSetLimit.29.5 CUresult cuCtxGetApiVersion (CUcontext ctx. cuCtxDetach. cuCtxSetCacheConfig. cuCtxSetCacheConfig. cuCtxCreate. asynchronous launches.29. cuCtxPopCurrent. Parameters: ctx .2. cuCtxSetLimit. ERROR_INVALID_CONTEXT.Context to check version . CUDA_- 4. cuCtxCreate. cuCtxSynchronize CUDA_- Generated for NVIDIA CUDA Library by Doxygen . cuCtxDetach. cuCtxSetCacheConfig. CUDA_ERROR_DEINITIALIZED. This wil return the API version used to create a context (for example. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. cuCtxGetApiVersion. CUDA_ERROR_DEINITIALIZED. cuCtxSetLimit. The context must be a handle that was passed back by cuCtxCreate() or cuCtxAttach(). and destroys the context if the usage count goes to 0. ERROR_INVALID_CONTEXT Note: Note that this function may also return error codes from previous. cuCtxGetDevice. cuCtxSynchronize CUDA_ERROR_NOT_INITIALIZED. See also: cuCtxAttach. cuCtxGetCacheConfig. returns the API version used to create the currently bound context. unsigned int ∗ version) Returns the API version used to create ctx in version. Parameters: ctx . cuCtxGetCacheConfig. cuCtxDestroy.176 See also: Module Documentation cuCtxAttach. cuCtxGetDevice. See also: cuCtxAttach. cuCtxPopCurrent. cuCtxPushCurrent. asynchronous launches. cuCtxGetLimit. cuCtxGetApiVersion. If ctx is NULL. cuCtxDestroy.Context to destroy Returns: CUDA_SUCCESS. cuCtxGetDevice. cuCtxGetLimit.Pointer to version Returns: CUDA_SUCCESS.

cuCtxCreate. The supported cache configurations are: • CU_FUNC_CACHE_PREFER_NONE: no preference for shared memory or L1 (default) • CU_FUNC_CACHE_PREFER_SHARED: prefer larger shared memory and smaller L1 cache • CU_FUNC_CACHE_PREFER_L1: prefer larger L1 cache and smaller shared memory Parameters: pconfig . this returns through pconfig the preferred cache configuration for the current context. asynchronous launches.Returned device ID for the current context Returns: CUDA_SUCCESS. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. Note: Note that this function may also return error codes from previous. cuCtxDestroy.Returned cache configuration Returns: CUDA_SUCCESS. cuCtxPushCurrent. cuCtxGetLimit.29. cuCtxGetDevice. CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_NOT_INITIALIZED. This is only a preference. cuFuncSetCacheConfig CUDA_- 4. cuCtxCreate. cuCtxSetCacheConfig. See also: cuCtxAttach. cuCtxGetApiVersion. cuCtxGetCacheConfig. but it is free to choose a different configuration if required to execute functions. ERROR_INVALID_CONTEXT. cuCtxSetLimit.4. cuCtxPopCurrent. cuCtxPopCurrent. asynchronous launches.2. This will return a pconfig of CU_FUNC_CACHE_PREFER_NONE on devices where the size of the L1 cache and shared memory are fixed. cuCtxDetach.29 Context Management 4. CUDA_ERROR_DEINITIALIZED. cuCtxSynchronize CUDA_- Generated for NVIDIA CUDA Library by Doxygen .7 CUresult cuCtxGetDevice (CUdevice ∗ device) Returns in ∗device the ordinal of the current context’s device. ERROR_INVALID_CONTEXT. Parameters: device . See also: cuCtxAttach. cuCtxSynchronize. The driver will use the requested configuration if possible. cuCtxDetach. CUDA_ERROR_DEINITIALIZED.29. CUDA_ERROR_INVALID_VALUE. cuCtxDestroy. cuCtxSetLimit. cuCtxGetApiVersion.6 CUresult cuCtxGetCacheConfig (CUfunc_cache ∗ pconfig) 177 On devices where the L1 cache and shared memory use the same hardware resources. cuCtxPushCurrent. cuCtxSetCacheConfig.2. cuCtxGetLimit.

cuCtxDetach.9 CUresult cuCtxPopCurrent (CUcontext ∗ pctx) Pops the current CUDA context from the CPU thread. cuCtxPopCurrent() passes back the old context handle in ∗pctx. cuCtxGetApiVersion. cuCtxSynchronize CUDA_ERROR_NOT_INITIALIZED. CUDA_- Generated for NVIDIA CUDA Library by Doxygen .Returned new context handle Returns: CUDA_SUCCESS. cuCtxSetLimit. cuCtxDestroy. Parameters: pctx .2. cuCtxSetCacheConfig. If successful. cuCtxCreate.8 CUresult cuCtxGetLimit (size_t ∗ pvalue. cuCtxGetDevice. cuCtxGetApiVersion. cuCtxCreate.29. asynchronous launches. The supported CUlimit values are: • CU_LIMIT_STACK_SIZE: stack size of each GPU thread. the usage count may be incremented with cuCtxAttach() and decremented with cuCtxDetach(). • CU_LIMIT_MALLOC_HEAP_SIZE: size of the heap used by the malloc() and free() device system calls. cuCtxGetLimit. cuCtxPushCurrent. cuCtxPopCurrent. this function makes that context current to the CPU thread again. See also: cuCtxAttach. That context may then be made current to a different CPU thread by calling cuCtxPushCurrent(). cuCtxPushCurrent. cuCtxGetCacheConfig. cuCtxGetDevice.178 4. cuCtxDestroy. ERROR_INVALID_CONTEXT Note: Note that this function may also return error codes from previous. • CU_LIMIT_PRINTF_FIFO_SIZE: size of the FIFO used by the printf() device system call. CUDA_ERROR_DEINITIALIZED. cuCtxDetach. cuCtxSynchronize 4. cuCtxSetLimit. Parameters: limit . The CUDA context must have a usage count of 1. cuCtxSetCacheConfig.29. asynchronous launches.Returned size in bytes of limit Returns: CUDA_SUCCESS. CUDA_ERROR_INVALID_VALUE. See also: cuCtxAttach. CUDA_ERROR_UNSUPPORTED_LIMIT Note: Note that this function may also return error codes from previous. cuCtxGetCacheConfig.Limit to query pvalue . If a context was current to the CPU thread before cuCtxCreate() or cuCtxPushCurrent() was called.2. Floating contexts may be destroyed by calling cuCtxDestroy(). CUDA contexts have a usage count of 1 upon creation. CUlimit limit) Module Documentation Returns in ∗pvalue the current size of limit.

cuCtxSetCacheConfig. ERROR_INVALID_CONTEXT. cuCtxGetLimit. ERROR_INVALID_CONTEXT. asynchronous launches. so all CUDA functions that operate on the current context are affected.29.Requested cache configuration Returns: CUDA_SUCCESS. cuCtxGetDevice.4. cuCtxCreate. Launching a kernel with a different preference than the most recent preference setting may insert a device-side synchronization point. The context must be "floating. CUDA_ERROR_DEINITIALIZED. CUDA_ERROR_NOT_INITIALIZED. The previous current context may be made current again by calling cuCtxDestroy() or cuCtxPopCurrent().11 CUresult cuCtxSetCacheConfig (CUfunc_cache config) On devices where the L1 cache and shared memory use the same hardware resources. Any function preference set via cuFuncSetCacheConfig() will be preferred over this context-wide setting. cuCtxDetach. CUDA_ERROR_NOT_INITIALIZED. not attached to any thread. cuCtxGetApiVersion.2.Floating context to attach Returns: CUDA_SUCCESS.29.10 CUresult cuCtxPushCurrent (CUcontext ctx) 179 Pushes the given context ctx onto the CPU thread’s stack of current contexts.2. cuCtxDestroy. Setting the context-wide cache configuration to CU_FUNC_CACHE_PREFER_NONE will cause subsequent kernel launches to prefer to not change the cache configuration unless required to launch the kernel. This is only a preference. This setting does nothing on devices where the size of the L1 cache and shared memory are fixed. cuCtxGetCacheConfig. CUDA_ERROR_DEINITIALIZED. cuCtxSynchronize CUDA_- 4. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. The driver will use the requested configuration if possible. but it is free to choose a different configuration if required to execute the function. cuCtxPopCurrent. The specified context becomes the CPU thread’s current context. See also: cuCtxAttach.29 Context Management 4. Parameters: ctx .e. Contexts are made to float by calling cuCtxPopCurrent(). CUDA_ERROR_INVALID_VALUE Generated for NVIDIA CUDA Library by Doxygen CUDA_- . The supported cache configurations are: • CU_FUNC_CACHE_PREFER_NONE: no preference for shared memory or L1 (default) • CU_FUNC_CACHE_PREFER_SHARED: prefer larger shared memory and smaller L1 cache • CU_FUNC_CACHE_PREFER_L1: prefer larger L1 cache and smaller shared memory Parameters: config ." i. cuCtxSetLimit. this sets through config the preferred cache configuration for the current context.

etc). The driver is free to modify the requested value to meet h/w requirements (this could be clamping to minimum or maximum values.0 and higher.2. Attempting to set this limit on devices of compute capability less than 2. asynchronous launches. Setting CU_LIMIT_MALLOC_HEAP_SIZE must be performed before launching any kernel that uses the malloc() or free() device system calls. Parameters: limit .12 CUresult cuCtxSetLimit (CUlimit limit. cuCtxPushCurrent. cuFuncSetCacheConfig 4. size_t value) Setting limit to value is a request by the application to update the current limit maintained by the context. • CU_LIMIT_STACK_SIZE controls the stack size of each GPU thread. cuCtxGetDevice.29. cuCtxGetApiVersion.Limit to set value . This limit is only applicable to devices of compute capability 2. cuCtxGetApiVersion.0 and higher. cuCtxGetDevice.0 will result in the error CUDA_ERROR_UNSUPPORTED_LIMIT being returned. Setting CU_LIMIT_PRINTF_FIFO_SIZE must be performed before launching any kernel that uses the printf() device system call. rounding up to nearest element size. Attempting to set this limit on devices of compute capability less than 2. The application can use cuCtxGetLimit() to find out exactly what the limit has been set to.Size in bytes of limit Returns: CUDA_SUCCESS. asynchronous launches. cuCtxDestroy. cuCtxGetLimit. cuCtxSynchronize Generated for NVIDIA CUDA Library by Doxygen . cuCtxSynchronize.0 will result in the error CUDA_ERROR_UNSUPPORTED_LIMIT being returned. Attempting to set this limit on devices of compute capability less than 2. otherwise CUDA_ERROR_INVALID_VALUE will be returned.0 will result in the error CUDA_ERROR_UNSUPPORTED_LIMIT being returned.0 and higher. cuCtxPopCurrent. CUDA_ERROR_INVALID_VALUE. cuCtxCreate. cuCtxSetCacheConfig. cuCtxGetCacheConfig. cuCtxDetach. This limit is only applicable to devices of compute capability 2.180 Note: Module Documentation Note that this function may also return error codes from previous. See also: cuCtxAttach. See also: cuCtxAttach. cuCtxGetCacheConfig. • CU_LIMIT_PRINTF_FIFO_SIZE controls the size of the FIFO used by the printf() device system call. Setting each CUlimit has its own specific restrictions. cuCtxDetach. cuCtxPushCurrent. This limit is only applicable to devices of compute capability 2. cuCtxSetLimit. cuCtxPopCurrent. so each is discussed here. cuCtxDestroy. otherwise CUDA_ERROR_INVALID_VALUE will be returned. CUDA_ERROR_UNSUPPORTED_LIMIT Note: Note that this function may also return error codes from previous. cuCtxCreate. • CU_LIMIT_MALLOC_HEAP_SIZE controls the size of the heap used by the malloc() and free() device system calls. cuCtxGetLimit.

cuCtxGetApiVersion. See also: cuCtxAttach. cuCtxCreate. cuCtxGetLimit.13 CUresult cuCtxSynchronize (void) 181 Blocks until the device has completed all preceding requested tasks. cuCtxSynchronize() returns an error if one of the preceding tasks failed. CUDA_- Generated for NVIDIA CUDA Library by Doxygen . Returns: CUDA_SUCCESS. cuCtxGetDevice. ERROR_INVALID_CONTEXT Note: Note that this function may also return error codes from previous.29 Context Management 4. cuCtxPushCurrent cuCtxSetCacheConfig. cuCtxGetCacheConfig. cuCtxDetach. cuCtxDestroy. cuCtxPopCurrent.29. If the context was created with the CU_CTX_BLOCKING_SYNC flag. CUDA_ERROR_DEINITIALIZED. the CPU thread will block until the GPU context has finished its work.4.2. asynchronous launches. cuCtxSetLimit CUDA_ERROR_NOT_INITIALIZED.

CUmodule hmod. size_t ∗bytes. • CUresult cuModuleGetGlobal (CUdeviceptr ∗dptr.Module to retrieve function from name . • CUresult cuModuleGetSurfRef (CUsurfref ∗pSurfRef. const char ∗ name) Returns in ∗hfunc the handle of the function of name name located in module hmod.Returned function handle hmod . const void ∗image) Load a module’s data. const char ∗name) Returns a handle to a surface reference. • CUresult cuModuleUnload (CUmodule hmod) Unloads a module.Name of function to retrieve Generated for NVIDIA CUDA Library by Doxygen . • CUresult cuModuleLoad (CUmodule ∗module. const char ∗name) Returns a function handle. Parameters: hfunc . CUjit_option ∗options. If no function of that name exists. const char ∗name) Returns a global pointer from a module.182 Module Documentation 4. const char ∗name) Returns a handle to a texture reference. const void ∗image. • CUresult cuModuleGetTexRef (CUtexref ∗pTexRef.30 Module Management Functions • CUresult cuModuleGetFunction (CUfunction ∗hfunc. • CUresult cuModuleLoadDataEx (CUmodule ∗module. 4.2.1 Detailed Description This section describes the module management functions of the low-level CUDA driver application programming interface. CUmodule hmod. void ∗∗optionValues) Load a module’s data with options. • CUresult cuModuleLoadData (CUmodule ∗module. 4.30. const char ∗fname) Loads a compute module.2 4.1 Function Documentation CUresult cuModuleGetFunction (CUfunction ∗ hfunc.30. cuModuleGetFunction() returns CUDA_ERROR_NOT_FOUND. • CUresult cuModuleLoadFatBinary (CUmodule ∗module. CUmodule hmod. unsigned int numOptions. const void ∗fatCubin) Load a module’s data. CUmodule hmod. CUmodule hmod.30.

4. cuModuleGetTexRef. CUDA_ERROR_NOT_FOUND Note: Note that this function may also return error codes from previous. cuModuleLoadFatBinary. If no surface reference of that name exists. cuModuleLoadData.30 Module Management Returns: 183 CUDA_SUCCESS. const char ∗ name) Returns in ∗dptr and ∗bytes the base pointer and size of the global of name name located in module hmod.Returned surface reference hmod . Both parameters dptr and bytes are optional. const char ∗ name) Returns in ∗pSurfRef the handle of the surface reference of name name in the module hmod. cuModuleGetGlobal() returns CUDA_ERROR_NOT_FOUND. asynchronous launches.30. CUDA_ERROR_NOT_INITIALIZED.Module to retrieve surface reference from name . See also: cuModuleGetFunction. CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_NOT_FOUND Note: Note that this function may also return error codes from previous. cuModuleLoadFatBinary.30. cuModuleLoad.2. size_t ∗ bytes. cuModuleLoadDataEx. CUDA_ERROR_DEINITIALIZED. If one of them is NULL. CUDA_ERROR_DEINITIALIZED. CUDA_ERROR_INVALID_VALUE. cuModuleUnload 4. cuModuleGetTexRef. CUmodule hmod.Name of surface reference to retrieve Generated for NVIDIA CUDA Library by Doxygen . See also: cuModuleGetGlobal.3 CUresult cuModuleGetSurfRef (CUsurfref ∗ pSurfRef. Parameters: dptr .Name of global to retrieve Returns: CUDA_SUCCESS. cuModuleLoadData. cuModuleLoad. cuModuleLoadDataEx. CUDA_ERROR_INVALID_CONTEXT. cuModuleUnload 4. CUDA_ERROR_INVALID_VALUE.Module to retrieve global from name . asynchronous launches. CUmodule hmod.2 CUresult cuModuleGetGlobal (CUdeviceptr ∗ dptr.Returned global device pointer bytes .Returned global size in bytes hmod . Parameters: pSurfRef . it is ignored. If no variable of that name exists. cuModuleGetSurfRef() returns CUDA_ERROR_NOT_FOUND.2.

cuModuleLoadFatBinary. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_DEINITIALIZED. Parameters: pTexRef . cuModuleUnload 4. cuModuleLoad. CUDA_ERROR_INVALID_VALUE.Returned module fname .30. Parameters: module . cuModuleGetSurfRef. This texture reference handle should not be destroyed. asynchronous launches. CUmodule hmod.30.184 Returns: Module Documentation CUDA_SUCCESS. See also: cuModuleGetFunction. cuModuleGetGlobal. CUDA_ERROR_NOT_FOUND Note: Note that this function may also return error codes from previous. const char ∗ name) Returns in ∗pTexRef the handle of the texture reference of name name in the module hmod. cuModuleGetGlobal. cuModuleLoadDataEx.2.Returned texture reference hmod .Module to retrieve texture reference from name .4 CUresult cuModuleGetTexRef (CUtexref ∗ pTexRef. CUDA_ERROR_NOT_INITIALIZED. cuModuleLoadData.5 CUresult cuModuleLoad (CUmodule ∗ module.Name of texture reference to retrieve Returns: CUDA_SUCCESS. CUDA_ERROR_INVALID_VALUE.2. CUDA_ERROR_DEINITIALIZED. cuModuleGetTexRef. CUDA_ERROR_NOT_FOUND Note: Note that this function may also return error codes from previous. either as output by nvcc or handwrtten. cuModuleLoadDataEx. if the memory for functions and data (constant and global) needed by the module cannot be allocated. The file should be a cubin file as output by nvcc or a PTX file. cuModuleLoad. cuModuleUnload 4. cuModuleLoadFatBinary. cuModuleLoadData. cuModuleGetTexRef() returns CUDA_ERROR_NOT_FOUND. See also: cuModuleGetFunction. since it will be destroyed when the module is unloaded. asynchronous launches. The CUDA driver API does not attempt to lazily allocate the resources needed by a module. If no texture reference of that name exists. cuModuleLoad() fails. const char ∗ fname) Takes a filename fname and loads the corresponding module module into the current context.Filename of module to load Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_NOT_INITIALIZED.

CUjit_option ∗ options.Returned module image .30. CUDA_ERROR_NOT_FOUND. Options are passed as an array via options and any corresponding parameters are passed in optionValues. or incorporating a cubin object into the executable resources and using operating system calls such as Windows FindResource() to obtain the pointer. cuModuleLoadFatBinary. CUDA_ERROR_INVALID_CONTEXT. cuModuleGetGlobal. cuModuleGetGlobal. CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND. CUDA_ERROR_SHARED_OBJECT_INIT_FAILED Note: Note that this function may also return error codes from previous. cuModuleUnload 4. Any outputs will be returned via optionValues. Parameters: module . CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND.2. cuModuleLoadFatBinary. CUDA_ERROR_INVALID_VALUE. cuModuleGetTexRef. CUDA_ERROR_INVALID_CONTEXT. The pointer may be obtained by mapping a cubin or PTX file. CUDA_ERROR_FILE_NOT_FOUND. cuModuleLoad. cuModuleLoadDataEx. See also: cuModuleGetFunction.6 CUresult cuModuleLoadData (CUmodule ∗ module. CUDA_ERROR_NOT_INITIALIZED. The pointer may be obtained by mapping a cubin or PTX file. passing a cubin or PTX file as a NULL-terminated text string. passing a cubin or PTX file as a NULL-terminated text string. cuModuleUnload 4. const void ∗ image) Takes a pointer image and loads the corresponding module module into the current context.7 CUresult cuModuleLoadDataEx (CUmodule ∗ module.30 Module Management Returns: 185 CUDA_SUCCESS. Supported options are (types for the option values are specified in parentheses after the option name): Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_DEINITIALIZED. cuModuleLoadData. CUDA_ERROR_DEINITIALIZED. CUDA_ERROR_OUT_OF_MEMORY.2. See also: cuModuleGetFunction. unsigned int numOptions.Module data to load Returns: CUDA_SUCCESS. cuModuleGetTexRef. CUDA_ERROR_SHARED_OBJECT_INIT_FAILED Note: Note that this function may also return error codes from previous. CUDA_ERROR_INVALID_VALUE. void ∗∗ optionValues) Takes a pointer image and loads the corresponding module module into the current context. asynchronous launches. The number of total options is supplied via numOptions. asynchronous launches. CUDA_ERROR_OUT_OF_MEMORY. cuModuleLoadDataEx. or incorporating a cubin object into the executable resources and using operating system calls such as Windows FindResource() to obtain the pointer. const void ∗ image.30.4.

Options for JIT optionValues . • CU_JIT_OPTIMIZATION_LEVEL: (unsigned int) input is the level of optimization to apply to generated code (0 . CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_DEINITIALIZED. • CU_JIT_TARGET: (unsigned int for enumerated type CUjit_target_enum) input is the compilation target based on supplied CUjit_target_enum. CUDA_ERROR_OUT_OF_MEMORY. • CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES: (unsigned int) input is the size in bytes of the buffer. output is the number of bytes filled with messages. CUDA_ERROR_NO_BINARY_FOR_GPU. possible values are: – CU_PREFER_PTX – CU_PREFER_BINARY Parameters: module . output returns the number of threads the compiler actually targeted. CUDA_ERROR_NOT_INITIALIZED. • CU_JIT_ERROR_LOG_BUFFER: (char∗) input is a pointer to a buffer in which to print any error log messages from PTX assembly (the buffer size is specified via option CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES). • CU_JIT_INFO_LOG_BUFFER: (char∗) input is a pointer to a buffer in which to print any informational log messages from PTX assembly (the buffer size is specified via option CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES).Module data to load numOptions . output is the number of bytes filled with messages.4).Number of options options .186 Module Documentation • CU_JIT_MAX_REGISTERS: (unsigned int) input specifies the maximum number of registers per thread. CUDA_ERROR_INVALID_VALUE.Returned module image . with 4 being the default and highest level.Option values for JIT Returns: CUDA_SUCCESS. CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND. • CU_JIT_THREADS_PER_BLOCK: (unsigned int) input specifies number of threads per block to target compilation for. • CU_JIT_TARGET_FROM_CUCONTEXT: (No option value) causes compilation target to be determined based on current attached context (default). • CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES: (unsigned int) input is the size in bytes of the buffer. • CU_JIT_WALL_TIME: (float) output returns the float value of wall clock time. in milliseconds. possible values are: – CU_TARGET_COMPUTE_10 – CU_TARGET_COMPUTE_11 – CU_TARGET_COMPUTE_12 – CU_TARGET_COMPUTE_13 – CU_TARGET_COMPUTE_20 • CU_JIT_FALLBACK_STRATEGY: (unsigned int for enumerated type CUjit_fallback_enum) chooses fallback strategy if matching cubin is not found. spent compiling the PTX code. CUDA_ERROR_SHARED_OBJECT_INIT_FAILED Generated for NVIDIA CUDA Library by Doxygen .

cuModuleLoad.9 CUresult cuModuleUnload (CUmodule hmod) Unloads a module hmod from the current context. The pointer represents a fat binary object. cuModuleLoadDataEx.2. cuModuleGetTexRef. asynchronous launches.4. cuModuleLoadFatBinary. cuModuleGetGlobal.30. CUDA_ERROR_DEINITIALIZED. CUDA_ERROR_NOT_FOUND. CUDA_ERROR_NOT_INITIALIZED. cuModuleGetGlobal. cuModuleGetGlobal.Returned module fatCubin . CUDA_ERROR_DEINITIALIZED. const void ∗ fatCubin) Takes a pointer fatCubin and loads the corresponding module module into the current context. all representing the same device code. There is currently no documented API for constructing and using fat binary objects by programmers. cuModuleLoadData. CUDA_ERROR_INVALID_VALUE. CUDA_ERROR_INVALID_CONTEXT. cuModuleLoadDataEx. cuModuleUnload 4. CUDA_ERROR_OUT_OF_MEMORY. cuModuleLoadData.30. CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND. cuModuleGetTexRef. CUDA_ERROR_NOT_INITIALIZED. See also: cuModuleGetFunction. More information can be found in the nvcc document. but compiled and optimized for different architectures.Fat binary to load Returns: CUDA_SUCCESS. See also: 187 cuModuleGetFunction. cuModuleUnload 4.8 CUresult cuModuleLoadFatBinary (CUmodule ∗ module. asynchronous launches. cuModuleLoad. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. which is a collection of different cubin files. cuModuleGetTexRef. ERROR_INVALID_CONTEXT. CUDA_ERROR_NO_BINARY_FOR_GPU. cuModuleLoadFatBinary CUDA_- Generated for NVIDIA CUDA Library by Doxygen . and therefore this function is an internal function in this version of CUDA.2. Parameters: module .30 Module Management Note: Note that this function may also return error codes from previous. asynchronous launches. Parameters: hmod .Module to unload Returns: CUDA_SUCCESS. See also: cuModuleGetFunction. cuModuleLoadData. cuModuleLoad. CUDA_ERROR_SHARED_OBJECT_INIT_FAILED Note: Note that this function may also return error codes from previous.

CUarray hArray) Get a 3D CUDA array descriptor. CUarray srcArray. • CUresult cuMemcpy2DAsync (const CUDA_MEMCPY2D ∗pCopy. size_t srcOffset. size_t ByteCount) Copies memory from Array to Array. const CUDA_ARRAY_DESCRIPTOR ∗pAllocateArray) Creates a 1D or 2D CUDA array.31 Memory Management Functions • CUresult cuArray3DCreate (CUarray ∗pHandle. • CUresult cuMemcpy3D (const CUDA_MEMCPY3D ∗pCopy) Copies memory for 3D arrays. size_t WidthInBytes. • CUresult cuArrayCreate (CUarray ∗pHandle. size_t ∗pPitch. unsigned int ElementSizeBytes) Allocates pitched device memory. size_t bytesize) Allocates page-locked host memory. • CUresult cuMemcpy2DUnaligned (const CUDA_MEMCPY2D ∗pCopy) Copies memory for 2D arrays. size_t srcOffset. size_t ByteCount) Generated for NVIDIA CUDA Library by Doxygen . • CUresult cuMemcpy3DAsync (const CUDA_MEMCPY3D ∗pCopy. CUstream hStream) Copies memory for 3D arrays. • CUresult cuMemAllocHost (void ∗∗pp. CUstream hStream) Copies memory for 2D arrays. size_t dstOffset. • CUresult cuMemcpyAtoA (CUarray dstArray. size_t bytesize) Allocates device memory. • CUresult cuMemAllocPitch (CUdeviceptr ∗dptr. • CUresult cuArray3DGetDescriptor (CUDA_ARRAY3D_DESCRIPTOR ∗pArrayDescriptor. const CUDA_ARRAY3D_DESCRIPTOR ∗pAllocateArray) Creates a 3D CUDA array. CUarray hArray) Get a 1D or 2D CUDA array descriptor. • CUresult cuArrayGetDescriptor (CUDA_ARRAY_DESCRIPTOR ∗pArrayDescriptor. • CUresult cuArrayDestroy (CUarray hArray) Destroys a CUDA array. CUarray srcArray. • CUresult cuMemcpyAtoD (CUdeviceptr dstDevice. • CUresult cuMemAlloc (CUdeviceptr ∗dptr.188 Module Documentation 4. size_t Height. • CUresult cuMemcpy2D (const CUDA_MEMCPY2D ∗pCopy) Copies memory for 2D arrays.

size_t srcOffset. size_t dstOffset. • CUresult cuMemcpyDtoA (CUarray dstArray. • CUresult cuMemcpyDtoHAsync (void ∗dstHost. • CUresult cuMemcpyDtoD (CUdeviceptr dstDevice. CUdeviceptr srcDevice. CUdeviceptr srcDevice. const void ∗srcHost. CUstream hStream) Copies memory from Host to Array. 189 • CUresult cuMemcpyAtoH (void ∗dstHost. CUdeviceptr dptr) Get information on memory allocations. • CUresult cuMemFree (CUdeviceptr dptr) Frees device memory. • CUresult cuMemcpyHtoAAsync (CUarray dstArray. size_t dstOffset. • CUresult cuMemcpyHtoA (CUarray dstArray. Generated for NVIDIA CUDA Library by Doxygen . • CUresult cuMemcpyHtoDAsync (CUdeviceptr dstDevice. CUdeviceptr srcDevice. CUarray srcArray. CUstream hStream) Copies memory from Device to Host. size_t ByteCount.4. size_t ByteCount) Copies memory from Device to Device. size_t ByteCount. CUstream hStream) Copies memory from Array to Host. const void ∗srcHost. CUdeviceptr srcDevice. • CUresult cuMemcpyDtoDAsync (CUdeviceptr dstDevice. CUstream hStream) Copies memory from Host to Device. • CUresult cuMemGetInfo (size_t ∗free. size_t ByteCount) Copies memory from Device to Host. const void ∗srcHost. size_t ∗total) Gets free and total memory. size_t ByteCount) Copies memory from Array to Host. size_t ByteCount) Copies memory from Device to Array. const void ∗srcHost. • CUresult cuMemGetAddressRange (CUdeviceptr ∗pbase. • CUresult cuMemFreeHost (void ∗p) Frees page-locked host memory. size_t srcOffset. size_t ByteCount. size_t dstOffset. size_t ByteCount. CUdeviceptr srcDevice. CUstream hStream) Copies memory from Device to Device.31 Memory Management Copies memory from Array to Device. • CUresult cuMemcpyAtoHAsync (void ∗dstHost. size_t ByteCount. size_t ∗psize. size_t ByteCount) Copies memory from Host to Array. • CUresult cuMemcpyHtoD (CUdeviceptr dstDevice. size_t ByteCount) Copies memory from Host to Device. CUarray srcArray. • CUresult cuMemcpyDtoH (void ∗dstHost.

size_t N. size_t bytesize. size_t dstPitch. size_t N. unsigned short us. size_t Width. Generated for NVIDIA CUDA Library by Doxygen . size_t Width. unsigned int ui. • CUresult cuMemsetD8Async (CUdeviceptr dstDevice. unsigned char uc. unsigned short us. size_t Height) Initializes device memory. • CUresult cuMemsetD2D16Async (CUdeviceptr dstDevice. size_t Height. • CUresult cuMemHostGetFlags (unsigned int ∗pFlags. CUstream hStream) Sets device memory. • CUresult cuMemsetD2D16 (CUdeviceptr dstDevice. size_t N. size_t dstPitch. • CUresult cuMemsetD8 (CUdeviceptr dstDevice. size_t Width. size_t N) Initializes device memory. • CUresult cuMemsetD2D32Async (CUdeviceptr dstDevice.190 Module Documentation • CUresult cuMemHostAlloc (void ∗∗pp. • CUresult cuMemsetD2D8 (CUdeviceptr dstDevice. unsigned char uc. void ∗p) Passes back flags that were used for a pinned allocation. • CUresult cuMemHostGetDevicePointer (CUdeviceptr ∗pdptr. unsigned char uc. void ∗p. size_t dstPitch. unsigned int ui. CUstream hStream) Sets device memory. size_t N) Initializes device memory. • CUresult cuMemsetD16Async (CUdeviceptr dstDevice. CUstream hStream) Sets device memory. • CUresult cuMemsetD32 (CUdeviceptr dstDevice. size_t N) Initializes device memory. size_t dstPitch. unsigned int Flags) Passes back device pointer of mapped pinned memory. unsigned int ui. unsigned char uc. • CUresult cuMemsetD2D8Async (CUdeviceptr dstDevice. CUstream hStream) Sets device memory. • CUresult cuMemsetD2D32 (CUdeviceptr dstDevice. • CUresult cuMemsetD16 (CUdeviceptr dstDevice. size_t Width. CUstream hStream) Sets device memory. size_t dstPitch. size_t Width. size_t Height. • CUresult cuMemsetD32Async (CUdeviceptr dstDevice. unsigned int Flags) Allocates page-locked host memory. unsigned short us. size_t Width. size_t Height. unsigned short us. unsigned int ui. size_t dstPitch. CUstream hStream) Sets device memory. size_t Height) Initializes device memory. size_t Height) Initializes device memory.

const CUDA_ARRAY3D_DESCRIPTOR ∗ pAllocateArray) Creates a CUDA array according to the CUDA_ARRAY3D_DESCRIPTOR structure pAllocateArray and returns a handle to the new CUDA array in ∗pHandle. CU_AD_FORMAT_UNSIGNED_INT16 = 0x02. CUarray_format is defined as: typedef enum CUarray_format_enum { CU_AD_FORMAT_UNSIGNED_INT8 = 0x01.NumChannels = 1. height. the CUDA array is one-dimensional if height and depth are 0. CU_AD_FORMAT_UNSIGNED_INT32 = 0x03.Height = 0. If this flag is not set. Generated for NVIDIA CUDA Library by Doxygen . cuSurfRefSetArray will fail when attempting to bind the CUDA array to a surface reference. unsigned int NumChannels. Here are examples of CUDA array descriptions: Description for a CUDA array of 2048 floats: CUDA_ARRAY3D_DESCRIPTOR desc. } CUDA_ARRAY3D_DESCRIPTOR. and depth of the CUDA array (in elements). CUarray_format Format. unsigned int Height.Format = CU_AD_FORMAT_FLOAT. The CUDA_ARRAY3D_DESCRIPTOR is defined as: typedef struct { unsigned int Width.31. and Depth are the width.Width = 2048. where: • Width.2. CU_AD_FORMAT_FLOAT = 0x20 } CUarray_format.31. two-dimensional if depth is 0. • NumChannels specifies the number of packed components per CUDA array element. CU_AD_FORMAT_SIGNED_INT32 = 0x0a. • Flags may be set to CUDA_ARRAY3D_SURFACE_LDST to enable surface references to be bound to the CUDA array. CU_AD_FORMAT_HALF = 0x10. CU_AD_FORMAT_SIGNED_INT8 = 0x08. CU_AD_FORMAT_SIGNED_INT16 = 0x09. or 4. desc. • Format specifies the format of the elements. Height.31.1 Detailed Description This section describes the memory management functions of the low-level CUDA driver application programming interface. 2.4. and three-dimensional otherwise. 4.1 Function Documentation CUresult cuArray3DCreate (CUarray ∗ pHandle. unsigned int Flags.31 Memory Management 191 4.Depth = 0. unsigned int Depth. it may be 1. desc.2 4. desc. desc. desc.

cuMemcpy2DAsync. cuMemcpyAtoD. See also: cuArray3DGetDescriptor. desc. CUDA_ERROR_NOT_INITIALIZED.Depth = 0. cuMemcpy2D. desc. cuArrayGetDescriptor. cuMemcpyAtoH. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_DEINITIALIZED. desc.31. cuMemsetD16.2 CUresult cuArray3DGetDescriptor (CUDA_ARRAY3D_DESCRIPTOR ∗ pArrayDescriptor. Parameters: pHandle . desc. cuMemcpyHtoA. cuMemsetD2D16. cuMemcpyDtoA.Returned array pAllocateArray . CUDA_ERROR_OUT_OF_MEMORY. cuMemsetD8. cuMemcpyDtoD. cuMemAlloc.NumChannels = 1. cuMemAllocPitch.FormatFlags = CU_AD_FORMAT_HALF.Height = 64. in which case the Height and/or Depth members of the descriptor struct will be set to 0. This function may be called on 1D and 2D arrays. desc. CUarray hArray) Returns in ∗pArrayDescriptor a descriptor containing information on the format and dimensions of the CUDA array hArray. cuMemcpy3DAsync. CUDA_ERROR_INVALID_VALUE. Parameters: pArrayDescriptor . cuMemFreeHost. cuMemAllocHost. cuMemcpyHtoD. 4x16-bit float16’s: CUDA_ARRAY3D_DESCRIPTOR desc. cuMemcpyHtoDAsync. cuMemsetD2D32. cuMemcpyDtoDAsync. Module Documentation Description for a width x height x depth CUDA array of 64-bit. but need to know the CUDA array parameters for validation or other purposes. cuMemcpyAtoHAsync.Format = CU_AD_FORMAT_FLOAT. cuMemcpyAtoA. cuMemcpyDtoH. desc. It is useful for subroutines that have been passed a CUDA array. cuMemGetInfo. cuMemHostAlloc.Width = 64. desc.Width = width. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. cuMemsetD32 4. cuMemFree.Returned 3D array descriptor hArray . asynchronous launches.3D array descriptor Returns: CUDA_SUCCESS. desc. cuMemGetAddressRange. cuMemsetD2D8. desc. cuMemcpy2DUnaligned. cuArrayDestroy.Height = height.192 Description for a 64 x 64 CUDA array of floats: CUDA_ARRAY3D_DESCRIPTOR desc. cuMemcpyHtoAAsync.Depth = depth. cuMemcpy3D. desc. cuMemcpyDtoHAsync. cuArrayCreate.2.3D array to get descriptor of Generated for NVIDIA CUDA Library by Doxygen .NumChannels = 4. cuMemHostGetDevicePointer.

cuMemcpyAtoHAsync. CUDA_ERROR_INVALID_VALUE. cuMemsetD32 4.31 Memory Management Returns: 193 CUDA_SUCCESS.31. CUDA_ERROR_INVALID_HANDLE Note: Note that this function may also return error codes from previous. cuMemcpyDtoHAsync. cuMemcpyHtoAAsync. • Format specifies the format of the elements. unsigned int Height.4. cuMemHostGetDevicePointer. cuArrayCreate. unsigned int NumChannels. cuArrayDestroy. See also: cuArray3DCreate. cuMemcpy2D. cuMemcpyHtoA. cuMemFreeHost. const CUDA_ARRAY_DESCRIPTOR ∗ pAllocateArray) Creates a CUDA array according to the CUDA_ARRAY_DESCRIPTOR structure pAllocateArray and returns a handle to the new CUDA array in ∗pHandle. CU_AD_FORMAT_SIGNED_INT32 = 0x0a. the CUDA array is onedimensional if height is 0. cuMemGetAddressRange.2. where: • Width. cuMemsetD2D16. cuMemcpy3D. cuMemAllocHost. cuMemsetD2D8. and height of the CUDA array (in elements). and Height are the width. it may be 1. cuMemFree. two-dimensional otherwise. cuMemcpyDtoH. CU_AD_FORMAT_SIGNED_INT16 = 0x09. CUarray_format Format. cuMemsetD2D32. cuMemAlloc. cuMemcpy3DAsync. cuMemHostAlloc. cuMemcpyAtoA. or 4. cuMemcpy2DAsync. asynchronous launches. cuMemcpyAtoH. } CUDA_ARRAY_DESCRIPTOR. cuMemcpyDtoD. 2. Here are examples of CUDA array descriptions: Description for a CUDA array of 2048 floats: Generated for NVIDIA CUDA Library by Doxygen . cuMemsetD8. cuMemcpy2DUnaligned.3 CUresult cuArrayCreate (CUarray ∗ pHandle. CUDA_ERROR_NOT_INITIALIZED. cuMemcpyHtoDAsync. cuArrayGetDescriptor. CUDA_ERROR_DEINITIALIZED. cuMemcpyDtoA. cuMemcpyDtoDAsync. The CUDA_ARRAY_DESCRIPTOR is defined as: typedef struct { unsigned int Width. CUarray_format is defined as: typedef enum CUarray_format_enum { CU_AD_FORMAT_UNSIGNED_INT8 = 0x01. CU_AD_FORMAT_SIGNED_INT8 = 0x08. cuMemcpyAtoD. • NumChannels specifies the number of packed components per CUDA array element. cuMemcpyHtoD. cuMemAllocPitch. CUDA_ERROR_INVALID_CONTEXT. CU_AD_FORMAT_HALF = 0x10. cuMemGetInfo. CU_AD_FORMAT_FLOAT = 0x20 } CUarray_format. CU_AD_FORMAT_UNSIGNED_INT32 = 0x03. cuMemsetD16. CU_AD_FORMAT_UNSIGNED_INT16 = 0x02.

CUDA_ERROR_INVALID_CONTEXT.194 CUDA_ARRAY_DESCRIPTOR desc. desc. cuMemcpy2DUnaligned.Height = 64. cuMemcpy2DAsync.FormatFlags = CU_AD_FORMAT_UNSIGNED_INT8. cuMemcpyDtoD. desc. cuMemsetD8. cuMemFreeHost.FormatFlags = CU_AD_FORMAT_HALF. cuArrayDestroy.Height = height. cuMemcpyAtoA. cuMemcpyAtoH. cuMemGetInfo. CUDA_ERROR_OUT_OF_MEMORY. cuMemcpyDtoHAsync. 4x16-bit float16’s: CUDA_ARRAY_DESCRIPTOR desc. desc. asynchronous launches. CUDA_ERROR_DEINITIALIZED. cuMemAllocHost.NumChannels = 2.Returned array pAllocateArray .Array descriptor Returns: CUDA_SUCCESS. cuMemAllocPitch. cuMemcpy3DAsync. See also: cuArray3DCreate. cuMemcpyAtoD. cuMemHostAlloc. cuMemcpyHtoDAsync. cuMemcpy3D.Height = 1.Format = CU_AD_FORMAT_FLOAT. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. each of which is two 8-bit unsigned chars: CUDA_ARRAY_DESCRIPTOR arrayDesc.Width = 2048. desc. cuMemcpyHtoA. cuArray3DGetDescriptor. desc. desc. cuArrayGetDescriptor. cuMemcpyDtoDAsync. desc. cuMemsetD2D16. cuMemFree. cuMemcpyAtoHAsync. cuMemcpyHtoAAsync. desc. desc. desc. cuMemsetD2D8.Width = 64. cuMemGetAddressRange.Height = height. Module Documentation Description for a 64 x 64 CUDA array of floats: CUDA_ARRAY_DESCRIPTOR desc. desc. desc.Width = width. Description for a width x height CUDA array of 64-bit. Parameters: pHandle .NumChannels = 4. Description for a width x height CUDA array of 16-bit elements. cuMemsetD32 Generated for NVIDIA CUDA Library by Doxygen .Format = CU_AD_FORMAT_FLOAT. CUDA_ERROR_INVALID_VALUE. cuMemsetD16. desc.Width = width.NumChannels = 1. cuMemAlloc. cuMemHostGetDevicePointer. cuMemcpyDtoA. desc. cuMemcpyHtoD. desc. desc. cuMemsetD2D32.NumChannels = 1. cuMemcpy2D. CUDA_ERROR_NOT_INITIALIZED. cuMemcpyDtoH.

cuArray3DGetDescriptor. CUDA_ERROR_INVALID_HANDLE Note: Note that this function may also return error codes from previous. cuMemAllocHost. cuMemsetD2D32.Array to destroy Returns: CUDA_SUCCESS. cuMemAlloc. cuMemcpyDtoDAsync. CUDA_ERROR_INVALID_CONTEXT. cuMemcpyDtoH.Returned array descriptor hArray . cuMemcpy2D. cuMemcpyDtoD. cuMemFree. cuMemGetInfo. cuMemsetD8. Parameters: pArrayDescriptor . cuMemsetD32 Generated for NVIDIA CUDA Library by Doxygen . cuMemcpyAtoD. CUDA_ERROR_NOT_INITIALIZED. cuMemAllocHost. cuMemsetD2D16. CUDA_ERROR_NOT_INITIALIZED. cuMemAllocPitch.4 CUresult cuArrayDestroy (CUarray hArray) 195 Destroys the CUDA array hArray. cuMemcpyDtoHAsync. cuMemcpyAtoHAsync. cuMemFree. cuMemcpyDtoDAsync. cuMemFreeHost. cuMemcpy2DUnaligned. cuMemcpyHtoA. cuMemHostGetDevicePointer. cuMemAllocPitch. cuArrayGetDescriptor. cuArrayCreate. cuMemsetD2D8. cuMemcpy2D. CUDA_ERROR_DEINITIALIZED. cuMemGetAddressRange.4. cuMemcpyHtoDAsync. cuMemsetD2D16. cuMemcpyHtoDAsync. CUarray hArray) Returns in ∗pArrayDescriptor a descriptor containing information on the format and dimensions of the CUDA array hArray. cuArrayCreate. cuMemGetInfo. asynchronous launches. cuMemcpy3DAsync. cuMemsetD32 4. cuMemHostGetDevicePointer. cuMemcpyDtoD. cuMemcpyAtoH. cuMemcpyHtoAAsync. cuMemcpy2DAsync.2. cuMemsetD16. cuMemcpyDtoH. cuMemcpyHtoA. cuMemcpyAtoA. cuMemHostAlloc. but need to know the CUDA array parameters for validation or other purposes. cuMemHostAlloc.31.5 CUresult cuArrayGetDescriptor (CUDA_ARRAY_DESCRIPTOR ∗ pArrayDescriptor. cuMemcpyAtoHAsync. cuMemcpyDtoA. cuMemGetAddressRange. CUDA_ERROR_ARRAY_IS_MAPPED Note: Note that this function may also return error codes from previous. cuMemcpyAtoD. It is useful for subroutines that have been passed a CUDA array. asynchronous launches. CUDA_ERROR_INVALID_VALUE. See also: cuArray3DCreate. CUDA_ERROR_INVALID_HANDLE.Array to get descriptor of Returns: CUDA_SUCCESS. See also: cuArray3DCreate. cuMemcpy2DUnaligned. Parameters: hArray . CUDA_ERROR_INVALID_CONTEXT. cuMemsetD8. cuMemcpyHtoD. cuMemcpyHtoAAsync.2. cuMemFreeHost. cuArrayDestroy. cuMemsetD16. CUDA_ERROR_DEINITIALIZED. cuMemcpy3DAsync. cuMemcpyDtoA.31 Memory Management 4. cuMemsetD2D8. cuMemcpyAtoH. cuArray3DGetDescriptor.31. cuMemcpy3D. cuMemsetD2D32. cuMemcpy2DAsync. cuMemcpyDtoHAsync. cuMemcpyAtoA. cuMemcpy3D. cuMemcpyHtoD. cuMemAlloc.

cuMemcpy3DAsync. cuMemsetD16. cuArray3DGetDescriptor. cuMemcpyDtoD. cuMemcpyDtoDAsync.Returned host pointer to page-locked memory bytesize . CUDA_ERROR_INVALID_VALUE. CUDA_ERROR_NOT_INITIALIZED. cuMemHostAlloc. CUDA_ERROR_INVALID_VALUE. As a result. cuMemFree.31. cuMemcpyHtoDAsync. CUDA_ERROR_NOT_INITIALIZED. cuMemcpy3D. Generated for NVIDIA CUDA Library by Doxygen .Returned device pointer bytesize . CUDA_ERROR_OUT_OF_MEMORY Note: Note that this function may also return error codes from previous.7 CUresult cuMemAllocHost (void ∗∗ pp. cuMemcpyAtoA. asynchronous launches. since it reduces the amount of memory available to the system for paging. cuMemGetInfo. The allocated memory is suitably aligned for any kind of variable. cuMemcpy2DUnaligned. cuMemcpyHtoA. cuMemcpyAtoHAsync. cuArrayCreate. it can be read or written with much higher bandwidth than pageable memory obtained with functions such as malloc(). cuMemAllocPitch. Parameters: pp . CUDA_ERROR_OUT_OF_MEMORY Note: Note that this function may also return error codes from previous. cuMemGetAddressRange. cuMemcpy2D.Requested allocation size in bytes Returns: CUDA_SUCCESS. cuMemcpyDtoA. cuMemcpy2DAsync. The memory is not cleared. cuMemcpyDtoH. cuMemcpyDtoHAsync. CUDA_ERROR_DEINITIALIZED. cuMemcpyAtoD. Since the memory can be accessed directly by the device. size_t bytesize) Module Documentation Allocates bytesize bytes of linear memory on the device and returns in ∗dptr a pointer to the allocated memory. cuMemsetD8. The driver tracks the virtual memory ranges allocated with this function and automatically accelerates calls to functions such as cuMemcpy().2. Allocating excessive amounts of memory with cuMemAllocHost() may degrade system performance. See also: cuArray3DCreate. size_t bytesize) Allocates bytesize bytes of host memory that is page-locked and accessible to the device.2.6 CUresult cuMemAlloc (CUdeviceptr ∗ dptr. cuMemAllocHost. asynchronous launches. If bytesize is 0. CUDA_ERROR_INVALID_CONTEXT.31. cuMemsetD2D16. cuMemsetD2D8. cuMemFreeHost. cuArrayGetDescriptor. cuMemcpyHtoAAsync. cuMemHostGetDevicePointer. cuArrayDestroy.196 4. cuMemAlloc() returns CUDA_ERROR_INVALID_VALUE.Requested allocation size in bytes Returns: CUDA_SUCCESS. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_DEINITIALIZED. cuMemcpyAtoH. this function is best used sparingly to allocate staging areas for data exchange between host and device. cuMemcpyHtoD. Parameters: dptr . cuMemsetD32 4. cuMemsetD2D32.

The byte alignment of the pitch returned by cuMemAllocPitch() is guaranteed to match or exceed the alignment requirement for texture binding with cuTexRefSetAddress2D(). cuMemcpyAtoH.Requested allocation height in rows ElementSizeBytes . cuMemcpyDtoA.31. cuArray3DGetDescriptor. cuMemHostAlloc.Requested allocation width in bytes Height . See also: cuArray3DCreate. cuMemGetInfo. cuMemcpy2D. cuMemAlloc.Returned device pointer pPitch .31 Memory Management See also: 197 cuArray3DCreate. cuMemcpyAtoHAsync. it is recommended that programmers consider performing pitch allocations using cuMemAllocPitch(). this is especially true if the application will be performing 2D memory copies between different regions of device memory (whether linear memory or CUDA arrays).Returned pitch of allocation in bytes WidthInBytes . CUDA_ERROR_INVALID_VALUE. cuMemcpyAtoH. cuMemFreeHost. ElementSizeBytes specifies the size of the largest reads and writes that will be performed on the memory range. unsigned int ElementSizeBytes) Allocates at least WidthInBytes ∗ Height bytes of linear memory on the device and returns in ∗dptr a pointer to the allocated memory. cuMemcpyHtoA. cuMemcpy2DUnaligned. cuMemcpy3D. cuMemcpyHtoD. cuMemAllocHost. CUDA_ERROR_INVALID_CONTEXT. cuMemcpyDtoDAsync. cuMemsetD32 4. size_t ∗ pPitch. cuArrayGetDescriptor. cuMemcpy2DAsync. cuArrayCreate. cuMemGetAddressRange. cuMemcpyDtoA. The intended usage of pitch is as a separate parameter of the allocation. the address is computed as: T* pElement = (T*)((char*)BaseAddress + Row * Pitch) + Column. cuArrayCreate.4. cuMemcpyAtoA.8 CUresult cuMemAllocPitch (CUdeviceptr ∗ dptr. cuMemcpy3DAsync. The pitch returned by cuMemAllocPitch() is guaranteed to work with cuMemcpy2D() under all circumstances. cuMemcpyDtoHAsync. cuMemcpy2DUnaligned. cuMemcpyHtoDAsync. Due to alignment restrictions in the hardware. cuArrayGetDescriptor. cuArrayDestroy. cuMemcpyAtoA. cuMemAllocPitch.Size of largest reads/writes for range Returns: CUDA_SUCCESS. cuMemcpy3D. size_t WidthInBytes. cuMemcpyDtoD. The pitch returned in ∗pPitch by cuMemAllocPitch() is the width in bytes of the allocation. cuArrayDestroy. used to compute addresses within the 2D array. cuMemFree. ElementSizeBytes may be 4. If ElementSizeBytes is smaller than the actual read/write size of a kernel. cuMemcpy3DAsync. Given the row and column of an array element of type T. CUDA_ERROR_NOT_INITIALIZED.2. cuMemcpy2DAsync. but possibly at reduced speed. cuMemHostGetDevicePointer. cuMemcpyAtoD. cuArray3DGetDescriptor. cuMemsetD2D8. size_t Height. 8 or 16 (since coalesced memory transactions are not possible on other data sizes). cuMemcpyAtoHAsync. cuMemcpyAtoD. The function may pad the allocation to ensure that corresponding pointers in any given row will continue to meet the alignment requirements for coalescing as the address is updated from row to row. cuMemsetD16. cuMemcpy2D. cuMemsetD8. cuMemcpyHtoAAsync. cuMemcpyDtoH. Parameters: dptr . Generated for NVIDIA CUDA Library by Doxygen . cuMemsetD2D16. cuMemAlloc. CUDA_ERROR_OUT_OF_MEMORY Note: Note that this function may also return error codes from previous. cuMemsetD2D32. the kernel will run correctly. CUDA_ERROR_DEINITIALIZED. For allocations of 2D arrays. asynchronous launches.

CUmemorytype_enum is defined as: typedef enum CUmemorytype_enum { CU_MEMORYTYPE_HOST = 0x01. cuMemsetD2D32.9 CUresult cuMemcpy2D (const CUDA_MEMCPY2D ∗ pCopy) Perform a 2D memory copy according to the parameters specified in pCopy. unsigned int dstXInBytes. cuMemcpyHtoDAsync. CU_MEMORYTYPE_DEVICE = 0x02. Generated for NVIDIA CUDA Library by Doxygen . srcArray is ignored. cuMemcpyHtoD. CU_MEMORYTYPE_ARRAY = 0x03 } CUmemorytype. cuMemsetD16. unsigned int srcPitch. srcArray specifies the handle of the source data. cuMemFreeHost. srcY. cuMemsetD32 4. cuMemHostGetDevicePointer. CUmemorytype dstMemoryType. cuMemcpyHtoAAsync. CUdeviceptr srcDevice. cuMemcpyHtoA. respectively. CUarray srcArray. If srcMemoryType is CU_MEMORYTYPE_HOST. srcArray is ignored. unsigned int Height. CUarray dstArray. srcDevice and srcPitch are ignored.31. cuMemHostAlloc. If dstMemoryType is CU_MEMORYTYPE_HOST. void *dstHost.198 Module Documentation cuMemcpyDtoD. } CUDA_MEMCPY2D. srcHost. cuMemGetAddressRange. CUmemorytype srcMemoryType. dstArray is ignored.2. cuMemFree. unsigned int dstPitch. cuMemcpyDtoDAsync. cuMemcpyDtoHAsync. The CUDA_MEMCPY2D structure is defined as: typedef struct CUDA_MEMCPY2D_st { unsigned int srcXInBytes. srcDevice and srcPitch specify the (device) base address of the source data and the bytes per row to apply. cuMemsetD2D8. CUdeviceptr dstDevice. If srcMemoryType is CU_MEMORYTYPE_ARRAY. cuMemsetD2D16. dstY. where: • srcMemoryType and dstMemoryType specify the type of memory of the source and destination. cuMemsetD8. If srcMemoryType is CU_MEMORYTYPE_DEVICE. srcHost and srcPitch specify the (host) base address of the source data and the bytes per row to apply. cuMemGetInfo. const void *srcHost. unsigned int WidthInBytes. dstHost and dstPitch specify the (host) base address of the destination data and the bytes per row to apply. cuMemcpyDtoH.

• srcXInBytes and srcY specify the base address of the source data for the copy. For device pointers. srcXInBytes must be evenly divisible by the array element size. cuMemcpy2D() may fail for pitches not computed by cuMemAllocPitch(). If dstMemoryType is CU_MEMORYTYPE_ARRAY. cuMemcpy2DUnaligned() does not have this restriction. ERROR_INVALID_CONTEXT.4. • WidthInBytes and Height specify the width (in bytes) and height of the 2D copy being performed. dstDevice and dstPitch specify the (device) base address of the destination data and the bytes per row to apply. For CUDA arrays. CUDA_ERROR_NOT_INITIALIZED. • If specified. CUDA_ERROR_DEINITIALIZED. For CUDA arrays. Parameters: pCopy . dstDevice and dstPitch are ignored.31 Memory Management 199 If dstMemoryType is CU_MEMORYTYPE_DEVICE. cuMemAllocPitch() passes back pitches that always work with cuMemcpy2D(). dstArray is ignored. For device pointers. CUDA array ? device. dstXInBytes must be evenly divisible by the array element size. but may run significantly slower in the cases where cuMemcpy2D() would have returned an error code.Parameters for the memory copy Returns: CUDA_SUCCESS. CUDA array ? CUDA array). dstHost. For host pointers. For host pointers. the starting address is CUdeviceptr dstStart = dstDevice+dstY*dstPitch+dstXInBytes. the starting address is void* Start = (void*)((char*)srcHost+srcY*srcPitch + srcXInBytes). srcPitch must be greater than or equal to WidthInBytes + srcXInBytes. CUDA_ERROR_INVALID_VALUE Generated for NVIDIA CUDA Library by Doxygen CUDA_- . dstArray specifies the handle of the destination data. cuMemcpy2D() returns an error if any pitch is greater than the maximum allowed (CU_DEVICE_ATTRIBUTE_MAX_PITCH). On intra-device memory copies (device ? device. the base address is void* dstStart = (void*)((char*)dstHost+dstY*dstPitch + dstXInBytes). • dstXInBytes and dstY specify the base address of the destination data for the copy. the starting address is CUdeviceptr Start = srcDevice+srcY*srcPitch+srcXInBytes. and dstPitch must be greater than or equal to WidthInBytes + dstXInBytes.

srcArray is ignored. cuMemsetD2D16. CUdeviceptr dstDevice. unsigned int dstXInBytes. asynchronous launches. void *dstHost. cuMemcpyHtoDAsync. srcArray is ignored.2. const void *srcHost. unsigned int dstPitch. cuMemcpyAtoA. CUmemorytype_enum is defined as: typedef enum CUmemorytype_enum { CU_MEMORYTYPE_HOST = 0x01. cuArrayGetDescriptor. cuMemsetD16. See also: cuArray3DCreate. cuMemcpyHtoD. CUdeviceptr srcDevice.200 Note: Module Documentation Note that this function may also return error codes from previous. cuMemAlloc. cuMemsetD2D8. CUmemorytype srcMemoryType. CU_MEMORYTYPE_ARRAY = 0x03 } CUmemorytype. cuMemcpy3DAsync. cuMemcpyAtoH. Generated for NVIDIA CUDA Library by Doxygen . If srcMemoryType is CU_MEMORYTYPE_DEVICE. where: • srcMemoryType and dstMemoryType specify the type of memory of the source and destination. cuMemcpyHtoA. unsigned int WidthInBytes. cuMemcpyDtoHAsync.10 CUresult cuMemcpy2DAsync (const CUDA_MEMCPY2D ∗ pCopy. cuMemGetInfo. cuMemcpyAtoD. cuMemHostAlloc. cuMemcpyHtoAAsync. If srcMemoryType is CU_MEMORYTYPE_HOST. srcDevice and srcPitch specify the (device) base address of the source data and the bytes per row to apply. unsigned int Height. } CUDA_MEMCPY2D. srcHost. cuMemsetD2D32. cuArrayCreate. cuMemcpy2DUnaligned. cuMemsetD8. dstY. cuMemGetAddressRange. respectively. cuMemcpy2DAsync. cuMemcpyAtoHAsync. cuMemFree. cuArrayDestroy. srcY. CUarray dstArray. cuMemFreeHost. cuMemcpyDtoDAsync. cuArray3DGetDescriptor. cuMemAllocPitch. CUarray srcArray. CUmemorytype dstMemoryType. cuMemAllocHost.31. cuMemcpyDtoH. srcHost and srcPitch specify the (host) base address of the source data and the bytes per row to apply. cuMemsetD32 4. srcDevice and srcPitch are ignored. cuMemcpy3D. cuMemcpyDtoD. CUstream hStream) Perform a 2D memory copy according to the parameters specified in pCopy. If srcMemoryType is CU_MEMORYTYPE_ARRAY. The CUDA_MEMCPY2D structure is defined as: typedef struct CUDA_MEMCPY2D_st { unsigned int srcXInBytes. cuMemcpyDtoA. CU_MEMORYTYPE_DEVICE = 0x02. srcArray specifies the handle of the source data. unsigned int srcPitch. cuMemHostGetDevicePointer.

dstDevice and dstPitch specify the (device) base address of the destination data and the bytes per row to apply. but may run significantly slower in the cases where cuMemcpy2D() would have returned an error code. the starting address is CUdeviceptr dstStart = dstDevice+dstY*dstPitch+dstXInBytes. CUDA array ? device. • If specified. and dstPitch must be greater than or equal to WidthInBytes + dstXInBytes. For CUDA arrays. • srcXInBytes and srcY specify the base address of the source data for the copy. cuMemcpy2DUnaligned() does not have this restriction. • If specified. srcXInBytes must be evenly divisible by the array element size. Generated for NVIDIA CUDA Library by Doxygen . dstArray is ignored. If dstMemoryType is CU_MEMORYTYPE_DEVICE. and dstPitch must be greater than or equal to WidthInBytes + dstXInBytes. cuMemAllocPitch() passes back pitches that always work with cuMemcpy2D(). dstXInBytes must be evenly divisible by the array element size. the base address is void* dstStart = (void*)((char*)dstHost+dstY*dstPitch + dstXInBytes). dstDevice and dstPitch are ignored. srcPitch must be greater than or equal to WidthInBytes + srcXInBytes. dstArray is ignored. For device pointers. • dstXInBytes and dstY specify the base address of the destination data for the copy. For host pointers. On intra-device memory copies (device ? device. CUDA array ? CUDA array). • WidthInBytes and Height specify the width (in bytes) and height of the 2D copy being performed. dstHost and dstPitch specify the (host) base address of the destination data and the bytes per row to apply. the starting address is void* Start = (void*)((char*)srcHost+srcY*srcPitch + srcXInBytes). and dstHeight must be greater than or equal to Height + dstY. cuMemcpy2D() may fail for pitches not computed by cuMemAllocPitch(). dstHost. the starting address is CUdeviceptr Start = srcDevice+srcY*srcPitch+srcXInBytes.31 Memory Management 201 If dstMemoryType is CU_MEMORYTYPE_HOST. For device pointers. dstArray specifies the handle of the destination data. srcHeight must be greater than or equal to Height + srcY. For CUDA arrays. srcPitch must be greater than or equal to WidthInBytes + srcXInBytes. If dstMemoryType is CU_MEMORYTYPE_ARRAY. For host pointers. • If specified. cuMemcpy2D() returns an error if any pitch is greater than the maximum allowed (CU_DEVICE_ATTRIBUTE_MAX_PITCH).4.

cuMemcpyDtoD. cuMemsetD8Async. cuMemFreeHost. cuMemAlloc. cuMemcpy3DAsync. CUdeviceptr dstDevice. cuMemcpy3D. cuMemsetD2D16Async. cuMemAllocPitch. cuMemGetInfo. CUmemorytype dstMemoryType.11 CUresult cuMemcpy2DUnaligned (const CUDA_MEMCPY2D ∗ pCopy) Perform a 2D memory copy according to the parameters specified in pCopy. CUmemorytype srcMemoryType. cuMemsetD32Async CUDA_- 4. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. CUDA_ERROR_DEINITIALIZED. dstY. respectively. It only works on page-locked host memory and returns an error if a pointer to pageable memory is passed as input. cuArrayCreate. cuMemcpyHtoD. cuMemHostGetDevicePointer. where: • srcMemoryType and dstMemoryType specify the type of memory of the source and destination. CUmemorytype_enum is defined as: Generated for NVIDIA CUDA Library by Doxygen .Stream identifier Returns: CUDA_SUCCESS. cuMemcpyAtoD. unsigned int Height. unsigned int dstPitch. cuMemAllocHost. cuMemcpyDtoH. cuMemsetD16Async. cuMemcpyAtoA. cuMemHostAlloc.202 Module Documentation cuMemcpy2DAsync() is asynchronous and can optionally be associated to a stream by passing a non-zero hStream argument. cuMemcpyDtoHAsync. unsigned int WidthInBytes. The CUDA_MEMCPY2D structure is defined as: typedef struct CUDA_MEMCPY2D_st { unsigned int srcXInBytes. ERROR_INVALID_CONTEXT. cuMemsetD2D8Async. Parameters: pCopy . } CUDA_MEMCPY2D. CUarray srcArray. CUDA_ERROR_NOT_INITIALIZED. cuArrayGetDescriptor. asynchronous launches. cuMemFree.2. cuMemcpyDtoA. cuMemsetD8. cuMemcpyHtoA. cuMemGetAddressRange. cuMemcpy2DUnaligned. unsigned int dstXInBytes. cuMemcpy2D. cuMemsetD2D32Async. cuMemsetD2D8. CUdeviceptr srcDevice. cuMemsetD2D32. cuMemcpyHtoAAsync. cuArray3DGetDescriptor. cuArrayDestroy. cuMemcpyHtoDAsync. unsigned int srcPitch. cuMemsetD2D16.31. See also: cuArray3DCreate. srcY. cuMemsetD32. cuMemcpyAtoH. const void *srcHost.Parameters for the memory copy hStream . CUarray dstArray. void *dstHost. cuMemcpyAtoHAsync. cuMemsetD16. cuMemcpyDtoDAsync.

CU_MEMORYTYPE_ARRAY = 0x03 } CUmemorytype. the starting address is CUdeviceptr Start = srcDevice+srcY*srcPitch+srcXInBytes. srcDevice and srcPitch specify the (device) base address of the source data and the bytes per row to apply. srcArray specifies the handle of the source data. If srcMemoryType is CU_MEMORYTYPE_DEVICE. dstHost and dstPitch specify the (host) base address of the destination data and the bytes per row to apply. srcXInBytes must be evenly divisible by the array element size. For CUDA arrays.31 Memory Management typedef enum CUmemorytype_enum { CU_MEMORYTYPE_HOST = 0x01. dstArray is ignored. the starting address is void* Start = (void*)((char*)srcHost+srcY*srcPitch + srcXInBytes). For device pointers. srcHost and srcPitch specify the (host) base address of the source data and the bytes per row to apply. srcArray is ignored. If dstMemoryType is CU_MEMORYTYPE_HOST. For device pointers. • dstXInBytes and dstY specify the base address of the destination data for the copy. dstDevice and dstPitch specify the (device) base address of the destination data and the bytes per row to apply. the base address is void* dstStart = (void*)((char*)dstHost+dstY*dstPitch + dstXInBytes). If srcMemoryType is CU_MEMORYTYPE_ARRAY. • srcXInBytes and srcY specify the base address of the source data for the copy. If dstMemoryType is CU_MEMORYTYPE_ARRAY. For host pointers. dstArray is ignored. srcArray is ignored. 203 If srcMemoryType is CU_MEMORYTYPE_HOST. dstDevice and dstPitch are ignored. CU_MEMORYTYPE_DEVICE = 0x02. dstHost. srcDevice and srcPitch are ignored. If dstMemoryType is CU_MEMORYTYPE_DEVICE. dstArray specifies the handle of the destination data.4. Generated for NVIDIA CUDA Library by Doxygen . the starting address is CUdeviceptr dstStart = dstDevice+dstY*dstPitch+dstXInBytes. srcHost. For host pointers.

CUmemorytype dstMemoryType. cuMemcpyDtoH.2. cuMemcpy2DUnaligned() does not have this restriction. cuMemsetD2D16. CUDA_ERROR_NOT_INITIALIZED. cuMemsetD32 CUDA_- 4. cuMemcpy2D() may fail for pitches not computed by cuMemAllocPitch(). // ignored when src is array. may be 0 if Depth==1 unsigned int dstXInBytes. and dstPitch must be greater than or equal to WidthInBytes + dstXInBytes. asynchronous launches. Parameters: pCopy . cuArrayGetDescriptor. cuMemGetInfo.12 CUresult cuMemcpy3D (const CUDA_MEMCPY3D ∗ pCopy) Perform a 3D memory copy according to the parameters specified in pCopy. cuMemcpy2D() returns an error if any pitch is greater than the maximum allowed (CU_DEVICE_ATTRIBUTE_MAX_PITCH). cuMemcpy3D. cuMemAllocPitch. // ignored when src is array unsigned int srcHeight. cuMemcpy2D. unsigned int dstLOD. cuMemcpyAtoH. const void *srcHost. cuMemGetAddressRange. srcY. cuArrayDestroy.Parameters for the memory copy Returns: CUDA_SUCCESS. cuMemcpy3DAsync. srcPitch must be greater than or equal to WidthInBytes + srcXInBytes. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. cuArray3DGetDescriptor. CUmemorytype srcMemoryType. cuMemAlloc. cuMemHostGetDevicePointer. cuArrayCreate. cuMemcpy2DAsync. CUdeviceptr srcDevice. The CUDA_MEMCPY3D structure is defined as: typedef struct CUDA_MEMCPY3D_st { unsigned int srcXInBytes. Generated for NVIDIA CUDA Library by Doxygen . cuMemcpyHtoA. CUDA array ? CUDA array). cuMemFreeHost. On intra-device memory copies (device ? device. cuMemFree. dstXInBytes must be evenly divisible by the array element size. CUDA_ERROR_DEINITIALIZED. cuMemcpyDtoA. unsigned int srcLOD. cuMemAllocPitch() passes back pitches that always work with cuMemcpy2D(). cuMemcpyHtoD. cuMemAllocHost. cuMemcpyAtoHAsync. cuMemsetD2D8. • If specified. unsigned int srcPitch. cuMemcpyHtoAAsync. cuMemsetD8. cuMemsetD16. cuMemcpyDtoHAsync. dstY. cuMemcpyAtoD. srcZ. cuMemsetD2D32.204 Module Documentation For CUDA arrays. cuMemcpyDtoDAsync. ERROR_INVALID_CONTEXT. cuMemcpyHtoDAsync. but may run significantly slower in the cases where cuMemcpy2D() would have returned an error code. cuMemHostAlloc. cuMemcpyDtoD. • WidthInBytes and Height specify the width (in bytes) and height of the 2D copy being performed.31. CUDA array ? device. cuMemcpyAtoA. CUarray srcArray. dstZ. See also: cuArray3DCreate.

srcHost. dstHost and dstPitch specify the (host) base address of the destination data. If dstMemoryType is CU_MEMORYTYPE_HOST. CUarray dstArray. } CUDA_MEMCPY3D. 205 where: • srcMemoryType and dstMemoryType specify the type of memory of the source and destination. dstDevice. srcPitch and srcHeight are ignored. unsigned int Depth. the bytes per row. the bytes per row. unsigned int dstPitch. and the height of each 2D slice of the 3D array. CU_MEMORYTYPE_DEVICE = 0x02. For host pointers. CU_MEMORYTYPE_ARRAY = 0x03 } CUmemorytype. If srcMemoryType is CU_MEMORYTYPE_DEVICE. and the height of each 2D slice of the 3D array. CUmemorytype_enum is defined as: typedef enum CUmemorytype_enum { CU_MEMORYTYPE_HOST = 0x01. srcArray specifies the handle of the source data. the bytes per row. srcPitch and srcHeight specify the (host) base address of the source data. If srcMemoryType is CU_MEMORYTYPE_HOST. If srcMemoryType is CU_MEMORYTYPE_ARRAY. dstArray is ignored. • srcXInBytes. For device pointers. If dstMemoryType is CU_MEMORYTYPE_DEVICE. CUdeviceptr dstDevice. and the height of each 2D slice of the 3D array. srcDevice. respectively. srcArray is ignored. may be 0 if Depth==1 unsigned int WidthInBytes. srcPitch and srcHeight specify the (device) base address of the source data. dstHost. dstArray is ignored.4. and the height of each 2D slice of the 3D array. // ignored when dst is array unsigned int dstHeight. srcArray is ignored. the starting address is Generated for NVIDIA CUDA Library by Doxygen . dstPitch and dstHeight are ignored. srcY and srcZ specify the base address of the source data for the copy. srcDevice. the starting address is void* Start = (void*)((char*)srcHost+(srcZ*srcHeight+srcY)*srcPitch + srcXInBytes).31 Memory Management void *dstHost. dstArray specifies the handle of the destination data. // ignored when dst is array. srcHost. unsigned int Height. the bytes per row. dstDevice and dstPitch specify the (device) base address of the destination data. If dstMemoryType is CU_MEMORYTYPE_ARRAY.

cuMemcpy3D() returns an error if any pitch is greater than the maximum allowed (CU_DEVICE_ATTRIBUTE_MAX_PITCH). cuMemsetD8. cuMemFree. cuMemcpyDtoDAsync. cuMemcpyAtoD. height and depth of the 3D copy being performed. the base address is void* dstStart = (void*)((char*)dstHost+(dstZ*dstHeight+dstY)*dstPitch + dstXInBytes). cuMemcpyAtoHAsync. cuMemcpyDtoA. cuMemcpyAtoH. cuMemsetD16. For host pointers. cuMemFreeHost. cuMemcpy2DAsync. Height and Depth specify the width (in bytes). For device pointers. cuMemcpyHtoA. cuArrayGetDescriptor. cuMemAlloc. cuArray3DGetDescriptor. and dstHeight must be greater than or equal to Height + dstY. srcPitch must be greater than or equal to WidthInBytes + srcXInBytes. • WidthInBytes. cuMemcpyHtoD. cuMemsetD32 CUDA_- Generated for NVIDIA CUDA Library by Doxygen . cuArrayCreate. CUDA_ERROR_DEINITIALIZED. cuMemHostAlloc. cuMemcpyHtoDAsync. cuMemcpyDtoHAsync. and dstPitch must be greater than or equal to WidthInBytes + dstXInBytes. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. cuMemcpy2DUnaligned. srcHeight must be greater than or equal to Height + srcY. srcXInBytes must be evenly divisible by the array element size. CUDA_ERROR_NOT_INITIALIZED.Parameters for the memory copy Returns: CUDA_SUCCESS. For CUDA arrays. dstY and dstZ specify the base address of the destination data for the copy. • If specified. • If specified. cuMemcpy3DAsync. cuMemcpyAtoA. ERROR_INVALID_CONTEXT. cuMemGetInfo. cuMemcpyHtoAAsync. For CUDA arrays. cuMemAllocPitch. dstXInBytes must be evenly divisible by the array element size. cuMemHostGetDevicePointer. • dstXInBytes. See also: cuArray3DCreate. cuMemcpy2D.206 Module Documentation CUdeviceptr Start = srcDevice+(srcZ*srcHeight+srcY)*srcPitch+srcXInBytes. The srcLOD and dstLOD members of the CUDA_MEMCPY3D structure must be set to 0. cuMemGetAddressRange. cuMemcpyDtoD. cuMemAllocHost. cuArrayDestroy. the starting address is CUdeviceptr dstStart = dstDevice+(dstZ*dstHeight+dstY)*dstPitch+dstXInBytes. cuMemsetD2D8. asynchronous launches. Parameters: pCopy . cuMemsetD2D32. cuMemcpyDtoH. cuMemsetD2D16.

srcPitch and srcHeight specify the (host) base address of the source data. and the height of each 2D slice of the 3D array. CUmemorytype_enum is defined as: typedef enum CUmemorytype_enum { CU_MEMORYTYPE_HOST = 0x01. dstZ. const void *srcHost. and the height of each 2D slice of the 3D array. CUarray srcArray. srcArray is ignored. // ignored when dst is array unsigned int dstHeight. } CUDA_MEMCPY3D. and the height of each 2D slice of the 3D array. srcHost. unsigned int srcPitch. srcArray specifies the handle of the source data. dstDevice and dstPitch specify the (device) base address of the destination data. may be 0 if Depth==1 unsigned int dstXInBytes. Generated for NVIDIA CUDA Library by Doxygen . srcDevice.13 CUresult cuMemcpy3DAsync (const CUDA_MEMCPY3D ∗ pCopy. CU_MEMORYTYPE_ARRAY = 0x03 } CUmemorytype.2. unsigned int dstLOD. srcY.31. If srcMemoryType is CU_MEMORYTYPE_ARRAY. unsigned int dstPitch. srcPitch and srcHeight are ignored. the bytes per row. the bytes per row. // ignored when src is array. srcPitch and srcHeight specify the (device) base address of the source data. unsigned int Height. // ignored when src is array unsigned int srcHeight. If srcMemoryType is CU_MEMORYTYPE_HOST.31 Memory Management 4. the bytes per row. CUdeviceptr dstDevice. // ignored when dst is array. may be 0 if Depth==1 unsigned int WidthInBytes. CUstream hStream) 207 Perform a 3D memory copy according to the parameters specified in pCopy. srcZ. where: • srcMemoryType and dstMemoryType specify the type of memory of the source and destination. unsigned int srcLOD. srcDevice.4. unsigned int Depth. respectively. CUmemorytype srcMemoryType. If dstMemoryType is CU_MEMORYTYPE_DEVICE. srcHost. dstArray is ignored. The CUDA_MEMCPY3D structure is defined as: typedef struct CUDA_MEMCPY3D_st { unsigned int srcXInBytes. and the height of each 2D slice of the 3D array. CUdeviceptr srcDevice. void *dstHost. srcArray is ignored. the bytes per row. dstHost and dstPitch specify the (host) base address of the destination data. If dstMemoryType is CU_MEMORYTYPE_HOST. dstArray is ignored. If srcMemoryType is CU_MEMORYTYPE_DEVICE. CUmemorytype dstMemoryType. dstY. CUarray dstArray. CU_MEMORYTYPE_DEVICE = 0x02.

Parameters: pCopy . • If specified. the starting address is CUdeviceptr dstStart = dstDevice+(dstZ*dstHeight+dstY)*dstPitch+dstXInBytes. For device pointers. and dstPitch must be greater than or equal to WidthInBytes + dstXInBytes. srcY and srcZ specify the base address of the source data for the copy. For host pointers. For host pointers. • dstXInBytes. srcHeight must be greater than or equal to Height + srcY. srcXInBytes must be evenly divisible by the array element size.Stream identifier Generated for NVIDIA CUDA Library by Doxygen . • WidthInBytes. dstHost. The srcLOD and dstLOD members of the CUDA_MEMCPY3D structure must be set to 0. and dstHeight must be greater than or equal to Height + dstY. dstY and dstZ specify the base address of the destination data for the copy. dstArray specifies the handle of the destination data. srcPitch must be greater than or equal to WidthInBytes + srcXInBytes. • srcXInBytes. • If specified. cuMemcpy3DAsync() is asynchronous and can optionally be associated to a stream by passing a non-zero hStream argument. Height and Depth specify the width (in bytes). the starting address is void* Start = (void*)((char*)srcHost+(srcZ*srcHeight+srcY)*srcPitch + srcXInBytes). dstPitch and dstHeight are ignored. For device pointers. dstXInBytes must be evenly divisible by the array element size. height and depth of the 3D copy being performed. It only works on page-locked host memory and returns an error if a pointer to pageable memory is passed as input. the base address is void* dstStart = (void*)((char*)dstHost+(dstZ*dstHeight+dstY)*dstPitch + dstXInBytes). For CUDA arrays. For CUDA arrays. cuMemcpy3D() returns an error if any pitch is greater than the maximum allowed (CU_DEVICE_ATTRIBUTE_MAX_PITCH). the starting address is CUdeviceptr Start = srcDevice+(srcZ*srcHeight+srcY)*srcPitch+srcXInBytes. dstDevice.Parameters for the memory copy hStream .208 Module Documentation If dstMemoryType is CU_MEMORYTYPE_ARRAY.

cuMemFree. cuMemsetD2D8. cuMemAllocHost. cuArrayDestroy. cuArrayDestroy. cuMemcpy3D. cuMemcpy2D. cuMemcpy2DUnaligned. CUDA_ERROR_DEINITIALIZED. cuMemcpyAtoD. size_t ByteCount) Copies from one 1D CUDA array to another. cuMemHostAlloc.Destination array dstOffset . cuMemcpyHtoAAsync. cuMemGetAddressRange. cuMemsetD8. cuMemcpyDtoDAsync. cuMemcpyHtoAAsync. size_t srcOffset. asynchronous launches. CUDA_ERROR_NOT_INITIALIZED. cuMemAllocPitch. cuMemcpy2DAsync. cuMemcpyAtoD. CUDA_ERROR_NOT_INITIALIZED. cuMemcpy2DAsync. cuMemsetD2D8Async. cuMemsetD2D16Async. ERROR_INVALID_CONTEXT. cuMemcpyAtoH.14 CUresult cuMemcpyAtoA (CUarray dstArray. CUarray srcArray. CUDA_ERROR_DEINITIALIZED. cuMemHostGetDevicePointer. cuMemsetD2D8. cuMemsetD16. cuMemcpyHtoDAsync. dstArray and srcArray specify the handles of the destination and source CUDA arrays for the copy. cuMemsetD32 CUDA_- Generated for NVIDIA CUDA Library by Doxygen . cuMemFreeHost. cuArrayGetDescriptor. dstOffset and srcOffset specify the destination and source offsets in bytes into the CUDA arrays. cuMemcpyAtoHAsync.Offset in bytes of source array ByteCount . See also: cuArray3DCreate. but the elements must be the same size. cuMemsetD8. cuMemGetInfo. cuMemsetD2D32. cuArray3DGetDescriptor. cuMemHostAlloc. cuMemcpyAtoH. cuMemcpyHtoA. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. cuMemsetD32Async 4. cuMemcpyDtoH. cuMemcpyDtoHAsync. Parameters: dstArray . cuMemcpyHtoA. and count must be evenly divisible by that size. cuArray3DGetDescriptor. cuArrayGetDescriptor.Offset in bytes of destination array srcArray . cuMemcpyHtoD. cuMemcpyDtoH. cuMemcpyDtoA. ERROR_INVALID_CONTEXT. cuArrayCreate. cuMemAllocPitch. cuMemGetInfo. cuMemsetD2D32Async. cuMemsetD16. cuMemAlloc. cuMemcpyHtoD. cuMemsetD16Async. cuMemsetD2D16.Size of memory copy in bytes Returns: CUDA_SUCCESS. cuMemsetD32. respectively.Source array srcOffset . cuMemcpyDtoDAsync.31. cuMemcpyAtoA. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous.31 Memory Management Returns: CUDA_SUCCESS. cuMemsetD2D32. cuMemHostGetDevicePointer.2. cuMemcpyHtoDAsync. cuMemcpyDtoHAsync. cuMemGetAddressRange.4. cuMemcpy3D. cuMemcpyAtoHAsync. cuMemcpyDtoA. cuMemcpyDtoD. asynchronous launches. cuMemsetD8Async. cuMemcpy3DAsync. ByteCount is the number of bytes to be copied. cuMemcpyDtoD. cuArrayCreate. size_t dstOffset. cuMemAlloc. cuMemFreeHost. cuMemcpy2D. See also: 209 CUDA_- cuArray3DCreate. cuMemFree. cuMemsetD2D16. cuMemAllocHost. cuMemcpy2DUnaligned. The size of the elements in the CUDA arrays need not be the same format.

CUDA_ERROR_NOT_INITIALIZED. cuMemcpy3D. size_t srcOffset.Destination device pointer srcArray . asynchronous launches.Destination device pointer srcArray .210 4. cuMemsetD8. CUarray srcArray. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. cuMemsetD16. cuMemsetD2D32. cuMemFreeHost.15 Module Documentation CUresult cuMemcpyAtoD (CUdeviceptr dstDevice.Source array srcOffset . cuMemcpy2DAsync. CUarray srcArray. CUDA_ERROR_DEINITIALIZED. cuMemcpy3DAsync. Parameters: dstDevice . cuMemsetD2D16. cuMemAlloc.2. cuMemAllocHost. ByteCount specifies the number of bytes to copy and must be evenly divisible by the array element size. asynchronous launches. cuMemcpyDtoDAsync.31. cuMemcpy2D. cuMemcpyDtoHAsync. Generated for NVIDIA CUDA Library by Doxygen CUDA_- . cuMemcpyAtoA. ERROR_INVALID_CONTEXT. cuMemcpyDtoA. cuMemGetAddressRange. cuMemcpyAtoH. cuMemcpy2DUnaligned.Size of memory copy in bytes Returns: CUDA_SUCCESS. cuMemcpyAtoHAsync. cuMemFree. cuArrayGetDescriptor. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. See also: cuArray3DCreate.Source array srcOffset . cuMemsetD32 CUDA_- 4. cuMemcpyHtoD. ByteCount specifies the number of bytes to copy. dstDevice specifies the base pointer of the destination and must be naturally aligned with the CUDA array elements. cuMemcpyHtoA.Offset in bytes of source array ByteCount . cuMemcpyHtoAAsync.2.16 CUresult cuMemcpyAtoH (void ∗ dstHost. CUDA_ERROR_NOT_INITIALIZED. cuMemcpyHtoDAsync. CUDA_ERROR_DEINITIALIZED. cuMemGetInfo. size_t ByteCount) Copies from one 1D CUDA array to device memory. cuMemcpyDtoD.Offset in bytes of source array ByteCount . cuArray3DGetDescriptor. Parameters: dstHost . size_t srcOffset. srcArray and srcOffset specify the CUDA array handle and starting offset in bytes of the source data. cuMemsetD2D8. dstHost specifies the base pointer of the destination. cuMemHostAlloc. cuMemcpyDtoH. cuArrayDestroy. cuArrayCreate.31. cuMemAllocPitch. srcArray and srcOffset specify the CUDA array handle and the offset in bytes into the array where the copy is to begin. size_t ByteCount) Copies from one 1D CUDA array to host memory.Size of memory copy in bytes Returns: CUDA_SUCCESS. ERROR_INVALID_CONTEXT. cuMemHostGetDevicePointer.

4.31 Memory Management See also:

211

cuArray3DCreate, cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost, cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoHAsync, cuMemcpyDtoA, cuMemcpyDtoD, cuMemcpyDtoDAsync, cuMemcpyDtoH, cuMemcpyDtoHAsync, cuMemcpyHtoA, cuMemcpyHtoAAsync, cuMemcpyHtoD, cuMemcpyHtoDAsync, cuMemFree, cuMemFreeHost, cuMemGetAddressRange, cuMemGetInfo, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D16, cuMemsetD2D32, cuMemsetD8, cuMemsetD16, cuMemsetD32

4.31.2.17

CUresult cuMemcpyAtoHAsync (void ∗ dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream)

Copies from one 1D CUDA array to host memory. dstHost specifies the base pointer of the destination. srcArray and srcOffset specify the CUDA array handle and starting offset in bytes of the source data. ByteCount specifies the number of bytes to copy. cuMemcpyAtoHAsync() is asynchronous and can optionally be associated to a stream by passing a non-zero stream argument. It only works on page-locked host memory and returns an error if a pointer to pageable memory is passed as input. Parameters: dstHost - Destination pointer srcArray - Source array srcOffset - Offset in bytes of source array ByteCount - Size of memory copy in bytes hStream - Stream identifier Returns: CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous, asynchronous launches. See also: cuArray3DCreate, cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost, cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyDtoA, cuMemcpyDtoD, cuMemcpyDtoDAsync, cuMemcpyDtoH, cuMemcpyDtoHAsync, cuMemcpyHtoA, cuMemcpyHtoAAsync, cuMemcpyHtoD, cuMemcpyHtoDAsync, cuMemFree, cuMemFreeHost, cuMemGetAddressRange, cuMemGetInfo, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D8Async, cuMemsetD2D16, cuMemsetD2D16Async, cuMemsetD2D32, cuMemsetD2D32Async, cuMemsetD8, cuMemsetD8Async, cuMemsetD16, cuMemsetD16Async, cuMemsetD32, cuMemsetD32Async CUDA_-

4.31.2.18

CUresult cuMemcpyDtoA (CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount)

Copies from device memory to a 1D CUDA array. dstArray and dstOffset specify the CUDA array handle and starting index of the destination data. srcDevice specifies the base pointer of the source. ByteCount specifies the number of bytes to copy.
Generated for NVIDIA CUDA Library by Doxygen

212 Parameters: dstArray - Destination array dstOffset - Offset in bytes of destination array srcDevice - Source device pointer ByteCount - Size of memory copy in bytes Returns:

Module Documentation

CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous, asynchronous launches. See also:

CUDA_-

cuArray3DCreate, cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost, cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyAtoHAsync, cuMemcpyDtoD, cuMemcpyDtoDAsync, cuMemcpyDtoH, cuMemcpyDtoHAsync, cuMemcpyHtoA, cuMemcpyHtoAAsync, cuMemcpyHtoD, cuMemcpyHtoDAsync, cuMemFree, cuMemFreeHost, cuMemGetAddressRange, cuMemGetInfo, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D16, cuMemsetD2D32, cuMemsetD8, cuMemsetD16, cuMemsetD32

4.31.2.19

CUresult cuMemcpyDtoD (CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount)

Copies from device memory to device memory. dstDevice and srcDevice are the base pointers of the destination and source, respectively. ByteCount specifies the number of bytes to copy. Note that this function is asynchronous. Parameters: dstDevice - Destination device pointer srcDevice - Source device pointer ByteCount - Size of memory copy in bytes Returns: CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous, asynchronous launches. See also: cuArray3DCreate, cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost, cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyAtoHAsync, cuMemcpyDtoA, cuMemcpyDtoH, cuMemcpyDtoHAsync, cuMemcpyHtoA, cuMemcpyHtoAAsync, cuMemcpyHtoD, cuMemcpyHtoDAsync, cuMemFree, cuMemFreeHost, cuMemGetAddressRange, cuMemGetInfo, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D16, cuMemsetD2D32, cuMemsetD8, cuMemsetD16, cuMemsetD32 CUDA_-

Generated for NVIDIA CUDA Library by Doxygen

4.31 Memory Management 4.31.2.20

213

CUresult cuMemcpyDtoDAsync (CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream)

Copies from device memory to device memory. dstDevice and srcDevice are the base pointers of the destination and source, respectively. ByteCount specifies the number of bytes to copy. Note that this function is asynchronous and can optionally be associated to a stream by passing a non-zero hStream argument Parameters: dstDevice - Destination device pointer srcDevice - Source device pointer ByteCount - Size of memory copy in bytes hStream - Stream identifier Returns: CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous, asynchronous launches. See also: cuArray3DCreate, cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost, cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyAtoHAsync, cuMemcpyDtoA, cuMemcpyDtoD, cuMemcpyDtoH, cuMemcpyDtoHAsync, cuMemcpyHtoA, cuMemcpyHtoAAsync, cuMemcpyHtoD, cuMemcpyHtoDAsync, cuMemFree, cuMemFreeHost, cuMemGetAddressRange, cuMemGetInfo, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D8Async, cuMemsetD2D16, cuMemsetD2D16Async, cuMemsetD2D32, cuMemsetD2D32Async, cuMemsetD8, cuMemsetD8Async, cuMemsetD16, cuMemsetD16Async, cuMemsetD32, cuMemsetD32Async CUDA_-

4.31.2.21

CUresult cuMemcpyDtoH (void ∗ dstHost, CUdeviceptr srcDevice, size_t ByteCount)

Copies from device to host memory. dstHost and srcDevice specify the base pointers of the destination and source, respectively. ByteCount specifies the number of bytes to copy. Note that this function is synchronous. Parameters: dstHost - Destination host pointer srcDevice - Source device pointer ByteCount - Size of memory copy in bytes Returns: CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous, asynchronous launches.
Generated for NVIDIA CUDA Library by Doxygen

CUDA_-

214 See also:

Module Documentation

cuArray3DCreate, cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost, cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyAtoHAsync, cuMemcpyDtoA, cuMemcpyDtoD, cuMemcpyDtoDAsync, cuMemcpyDtoHAsync, cuMemcpyHtoA, cuMemcpyHtoAAsync, cuMemcpyHtoD, cuMemcpyHtoDAsync, cuMemFree, cuMemFreeHost, cuMemGetAddressRange, cuMemGetInfo, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D16, cuMemsetD2D32, cuMemsetD8, cuMemsetD16, cuMemsetD32

4.31.2.22

CUresult cuMemcpyDtoHAsync (void ∗ dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream)

Copies from device to host memory. dstHost and srcDevice specify the base pointers of the destination and source, respectively. ByteCount specifies the number of bytes to copy. cuMemcpyDtoHAsync() is asynchronous and can optionally be associated to a stream by passing a non-zero hStream argument. It only works on page-locked memory and returns an error if a pointer to pageable memory is passed as input. Parameters: dstHost - Destination host pointer srcDevice - Source device pointer ByteCount - Size of memory copy in bytes hStream - Stream identifier Returns: CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous, asynchronous launches. See also: cuArray3DCreate, cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost, cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyAtoHAsync, cuMemcpyDtoA, cuMemcpyDtoD, cuMemcpyDtoDAsync, cuMemcpyDtoH, cuMemcpyHtoA, cuMemcpyHtoAAsync, cuMemcpyHtoD, cuMemcpyHtoDAsync, cuMemFree, cuMemFreeHost, cuMemGetAddressRange, cuMemGetInfo, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D8Async, cuMemsetD2D16, cuMemsetD2D16Async, cuMemsetD2D32, cuMemsetD2D32Async, cuMemsetD8, cuMemsetD8Async, cuMemsetD16, cuMemsetD16Async, cuMemsetD32, cuMemsetD32Async CUDA_-

4.31.2.23

CUresult cuMemcpyHtoA (CUarray dstArray, size_t dstOffset, const void ∗ srcHost, size_t ByteCount)

Copies from host memory to a 1D CUDA array. dstArray and dstOffset specify the CUDA array handle and starting offset in bytes of the destination data. pSrc specifies the base address of the source. ByteCount specifies the number of bytes to copy.
Generated for NVIDIA CUDA Library by Doxygen

4.31 Memory Management Parameters: dstArray - Destination array dstOffset - Offset in bytes of destination array srcHost - Source host pointer ByteCount - Size of memory copy in bytes Returns: CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous, asynchronous launches. See also:

215

CUDA_-

cuArray3DCreate, cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost, cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyAtoHAsync, cuMemcpyDtoA, cuMemcpyDtoD, cuMemcpyDtoDAsync, cuMemcpyDtoH, cuMemcpyDtoHAsync, cuMemcpyHtoAAsync, cuMemcpyHtoD, cuMemcpyHtoDAsync, cuMemFree, cuMemFreeHost, cuMemGetAddressRange, cuMemGetInfo, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D16, cuMemsetD2D32, cuMemsetD8, cuMemsetD16, cuMemsetD32

4.31.2.24

CUresult cuMemcpyHtoAAsync (CUarray dstArray, size_t dstOffset, const void ∗ srcHost, size_t ByteCount, CUstream hStream)

Copies from host memory to a 1D CUDA array. dstArray and dstOffset specify the CUDA array handle and starting offset in bytes of the destination data. srcHost specifies the base address of the source. ByteCount specifies the number of bytes to copy. cuMemcpyHtoAAsync() is asynchronous and can optionally be associated to a stream by passing a non-zero hStream argument. It only works on page-locked memory and returns an error if a pointer to pageable memory is passed as input. Parameters: dstArray - Destination array dstOffset - Offset in bytes of destination array srcHost - Source host pointer ByteCount - Size of memory copy in bytes hStream - Stream identifier Returns: CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous, asynchronous launches.
Generated for NVIDIA CUDA Library by Doxygen

CUDA_-

216 See also:

Module Documentation

cuArray3DCreate, cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost, cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyAtoHAsync, cuMemcpyDtoA, cuMemcpyDtoD, cuMemcpyDtoDAsync, cuMemcpyDtoH, cuMemcpyDtoHAsync, cuMemcpyHtoA, cuMemcpyHtoD, cuMemcpyHtoDAsync, cuMemFree, cuMemFreeHost, cuMemGetAddressRange, cuMemGetInfo, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D8Async, cuMemsetD2D16, cuMemsetD2D16Async, cuMemsetD2D32, cuMemsetD2D32Async, cuMemsetD8, cuMemsetD8Async, cuMemsetD16, cuMemsetD16Async, cuMemsetD32, cuMemsetD32Async

4.31.2.25

CUresult cuMemcpyHtoD (CUdeviceptr dstDevice, const void ∗ srcHost, size_t ByteCount)

Copies from host memory to device memory. dstDevice and srcHost are the base addresses of the destination and source, respectively. ByteCount specifies the number of bytes to copy. Note that this function is synchronous. Parameters: dstDevice - Destination device pointer srcHost - Source host pointer ByteCount - Size of memory copy in bytes Returns: CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous, asynchronous launches. See also: cuArray3DCreate, cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost, cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyAtoHAsync, cuMemcpyDtoA, cuMemcpyDtoD, cuMemcpyDtoDAsync, cuMemcpyDtoH, cuMemcpyDtoHAsync, cuMemcpyHtoA, cuMemcpyHtoAAsync, cuMemcpyHtoDAsync, cuMemFree, cuMemFreeHost, cuMemGetAddressRange, cuMemGetInfo, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D16, cuMemsetD2D32, cuMemsetD8, cuMemsetD16, cuMemsetD32 CUDA_-

4.31.2.26

CUresult cuMemcpyHtoDAsync (CUdeviceptr dstDevice, const void ∗ srcHost, size_t ByteCount, CUstream hStream)

Copies from host memory to device memory. dstDevice and srcHost are the base addresses of the destination and source, respectively. ByteCount specifies the number of bytes to copy. cuMemcpyHtoDAsync() is asynchronous and can optionally be associated to a stream by passing a non-zero hStream argument. It only works on page-locked memory and returns an error if a pointer to pageable memory is passed as input. Parameters: dstDevice - Destination device pointer
Generated for NVIDIA CUDA Library by Doxygen

4.31 Memory Management srcHost - Source host pointer ByteCount - Size of memory copy in bytes hStream - Stream identifier Returns: CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous, asynchronous launches. See also:

217

CUDA_-

cuArray3DCreate, cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost, cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyAtoHAsync, cuMemcpyDtoA, cuMemcpyDtoD, cuMemcpyDtoDAsync, cuMemcpyDtoH, cuMemcpyDtoHAsync, cuMemcpyHtoA, cuMemcpyHtoAAsync, cuMemcpyHtoD, cuMemFree, cuMemFreeHost, cuMemGetAddressRange, cuMemGetInfo, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D8Async, cuMemsetD2D16, cuMemsetD2D16Async, cuMemsetD2D32, cuMemsetD2D32Async, cuMemsetD8, cuMemsetD8Async, cuMemsetD16, cuMemsetD16Async, cuMemsetD32, cuMemsetD32Async

4.31.2.27

CUresult cuMemFree (CUdeviceptr dptr)

Frees the memory space pointed to by dptr, which must have been returned by a previous call to cuMemAlloc() or cuMemAllocPitch(). Parameters: dptr - Pointer to memory to free Returns: CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous, asynchronous launches. See also: cuArray3DCreate, cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost, cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyAtoHAsync, cuMemcpyDtoA, cuMemcpyDtoD, cuMemcpyDtoDAsync, cuMemcpyDtoH, cuMemcpyDtoHAsync, cuMemcpyHtoA, cuMemcpyHtoAAsync, cuMemcpyHtoD, cuMemcpyHtoDAsync, cuMemFreeHost, cuMemGetAddressRange, cuMemGetInfo, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D16, cuMemsetD2D32, cuMemsetD8, cuMemsetD16, cuMemsetD32 CUDA_-

Generated for NVIDIA CUDA Library by Doxygen

218 4.31.2.28 CUresult cuMemFreeHost (void ∗ p)

Module Documentation

Frees the memory space pointed to by p, which must have been returned by a previous call to cuMemAllocHost(). Parameters: p - Pointer to memory to free Returns: CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous, asynchronous launches. See also: cuArray3DCreate, cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost, cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyAtoHAsync, cuMemcpyDtoA, cuMemcpyDtoD, cuMemcpyDtoDAsync, cuMemcpyDtoH, cuMemcpyDtoHAsync, cuMemcpyHtoA, cuMemcpyHtoAAsync, cuMemcpyHtoD, cuMemcpyHtoDAsync, cuMemFree, cuMemGetAddressRange, cuMemGetInfo, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D16, cuMemsetD2D32, cuMemsetD8, cuMemsetD16, cuMemsetD32 CUDA_-

4.31.2.29

CUresult cuMemGetAddressRange (CUdeviceptr ∗ pbase, size_t ∗ psize, CUdeviceptr dptr)

Returns the base address in ∗pbase and size in ∗psize of the allocation by cuMemAlloc() or cuMemAllocPitch() that contains the input pointer dptr. Both parameters pbase and psize are optional. If one of them is NULL, it is ignored. Parameters: pbase - Returned base address psize - Returned size of device memory allocation dptr - Device pointer to query Returns: CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous, asynchronous launches. See also: cuArray3DCreate, cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost, cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyAtoHAsync, cuMemcpyDtoA, cuMemcpyDtoD, cuMemcpyDtoDAsync, cuMemcpyDtoH, cuMemcpyDtoHAsync, cuMemcpyHtoA, cuMemcpyHtoAAsync, cuMemcpyHtoD, cuMemcpyHtoDAsync, cuMemFree, cuMemFreeHost, cuMemGetInfo, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D16, cuMemsetD2D32, cuMemsetD8, cuMemsetD16, cuMemsetD32 CUDA_-

Generated for NVIDIA CUDA Library by Doxygen

4.31 Memory Management 4.31.2.30 CUresult cuMemGetInfo (size_t ∗ free, size_t ∗ total)

219

Returns in ∗free and ∗total respectively, the free and total amount of memory available for allocation by the CUDA context, in bytes. Parameters: free - Returned free memory in bytes total - Returned total memory in bytes Returns: CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous, asynchronous launches. See also: cuArray3DCreate, cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost, cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyAtoHAsync, cuMemcpyDtoA, cuMemcpyDtoD, cuMemcpyDtoDAsync, cuMemcpyDtoH, cuMemcpyDtoHAsync, cuMemcpyHtoA, cuMemcpyHtoAAsync, cuMemcpyHtoD, cuMemcpyHtoDAsync, cuMemFree, cuMemFreeHost, cuMemGetAddressRange, cuMemHostAlloc, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D16, cuMemsetD2D32, cuMemsetD8, cuMemsetD16, cuMemsetD32 CUDA_-

4.31.2.31

CUresult cuMemHostAlloc (void ∗∗ pp, size_t bytesize, unsigned int Flags)

Allocates bytesize bytes of host memory that is page-locked and accessible to the device. The driver tracks the virtual memory ranges allocated with this function and automatically accelerates calls to functions such as cuMemcpyHtoD(). Since the memory can be accessed directly by the device, it can be read or written with much higher bandwidth than pageable memory obtained with functions such as malloc(). Allocating excessive amounts of pinned memory may degrade system performance, since it reduces the amount of memory available to the system for paging. As a result, this function is best used sparingly to allocate staging areas for data exchange between host and device. The Flags parameter enables different options to be specified that affect the allocation, as follows. • CU_MEMHOSTALLOC_PORTABLE: The memory returned by this call will be considered as pinned memory by all CUDA contexts, not just the one that performed the allocation. • CU_MEMHOSTALLOC_DEVICEMAP: Maps the allocation into the CUDA address space. The device pointer to the memory may be obtained by calling cuMemHostGetDevicePointer(). This feature is available only on GPUs with compute capability greater than or equal to 1.1. • CU_MEMHOSTALLOC_WRITECOMBINED: Allocates the memory as write-combined (WC). WC memory can be transferred across the PCI Express bus more quickly on some system configurations, but cannot be read efficiently by most CPUs. WC memory is a good option for buffers that will be written by the CPU and read by the GPU via mapped pinned memory or host->device transfers. All of these flags are orthogonal to one another: a developer may allocate memory that is portable, mapped and/or write-combined with no restrictions.
Generated for NVIDIA CUDA Library by Doxygen

220

Module Documentation

The CUDA context must have been created with the CU_CTX_MAP_HOST flag in order for the CU_MEMHOSTALLOC_MAPPED flag to have any effect. The CU_MEMHOSTALLOC_MAPPED flag may be specified on CUDA contexts for devices that do not support mapped pinned memory. The failure is deferred to cuMemHostGetDevicePointer() because the memory may be mapped into other CUDA contexts via the CU_MEMHOSTALLOC_PORTABLE flag. The memory allocated by this function must be freed with cuMemFreeHost(). Parameters: pp - Returned host pointer to page-locked memory bytesize - Requested allocation size in bytes Flags - Flags for allocation request Returns: CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_OUT_OF_MEMORY Note: Note that this function may also return error codes from previous, asynchronous launches. See also: cuArray3DCreate, cuArray3DGetDescriptor, cuArrayCreate, cuArrayDestroy, cuArrayGetDescriptor, cuMemAlloc, cuMemAllocHost, cuMemAllocPitch, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync, cuMemcpyAtoA, cuMemcpyAtoD, cuMemcpyAtoH, cuMemcpyAtoHAsync, cuMemcpyDtoA, cuMemcpyDtoD, cuMemcpyDtoDAsync, cuMemcpyDtoH, cuMemcpyDtoHAsync, cuMemcpyHtoA, cuMemcpyHtoAAsync, cuMemcpyHtoD, cuMemcpyHtoDAsync, cuMemFree, cuMemFreeHost, cuMemGetAddressRange, cuMemGetInfo, cuMemHostGetDevicePointer, cuMemsetD2D8, cuMemsetD2D16, cuMemsetD2D32, cuMemsetD8, cuMemsetD16, cuMemsetD32

4.31.2.32

CUresult cuMemHostGetDevicePointer (CUdeviceptr ∗ pdptr, void ∗ p, unsigned int Flags)

Passes back the device pointer pdptr corresponding to the mapped, pinned host buffer p allocated by cuMemHostAlloc. cuMemHostGetDevicePointer() will fail if the CU_MEMALLOCHOST_DEVICEMAP flag was not specified at the time the memory was allocated, or if the function is called on a GPU that does not support mapped pinned memory. Flags provides for future releases. For now, it must be set to 0. Parameters: pdptr - Returned device pointer p - Host pointer Flags - Options (must be 0) Returns: CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous, asynchronous launches.
Generated for NVIDIA CUDA Library by Doxygen

CUDA_-

cuMemHostGetFlags() will fail if the pointer does not reside in an allocation performed by cuMemAllocHost() or cuMemHostAlloc(). cuMemcpyDtoHAsync. cuMemcpyHtoAAsync. cuMemcpyDtoH.Destination device pointer us . cuMemAllocPitch. Parameters: pFlags . ERROR_INVALID_CONTEXT. cuMemcpyAtoD. CUDA_ERROR_NOT_INITIALIZED. cuMemcpyHtoA. Parameters: dstDevice . cuMemcpy2D. unsigned short us.33 CUresult cuMemHostGetFlags (unsigned int ∗ pFlags. cuMemcpyDtoD. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. cuMemFreeHost. cuMemFree.2. See also: cuMemAllocHost.Host pointer Returns: CUDA_SUCCESS. CUDA_ERROR_DEINITIALIZED. void ∗ p) Passes back the flags pFlags that were specified when allocating the pinned host buffer p allocated by cuMemHostAlloc. cuMemAllocHost.Value to set N .31.4. cuMemHostAlloc. cuMemsetD16. cuArrayDestroy.Number of elements Returns: CUDA_SUCCESS. cuMemcpyAtoA. asynchronous launches.2. CUDA_ERROR_NOT_INITIALIZED. size_t N) Sets the memory range of N 16-bit values to the specified value us. cuArray3DGetDescriptor.34 CUresult cuMemsetD16 (CUdeviceptr dstDevice. cuMemcpyAtoH. CUDA_ERROR_DEINITIALIZED. cuMemcpyHtoDAsync. cuMemcpyDtoDAsync. cuMemcpy2DAsync. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. asynchronous launches. cuMemAlloc. cuMemsetD32 4. cuMemcpyDtoA.31. cuArrayGetDescriptor.31 Memory Management See also: 221 cuArray3DCreate. cuMemcpy2DUnaligned. cuMemcpy3DAsync. cuMemGetInfo. cuMemsetD8. cuMemsetD2D32. ERROR_INVALID_CONTEXT. cuMemcpy3D.Returned flags word p . Generated for NVIDIA CUDA Library by Doxygen CUDA_- . cuMemGetAddressRange. cuArrayCreate. cuMemcpyHtoD. cuMemcpyAtoHAsync. cuMemsetD2D8. cuMemsetD2D16. cuMemHostAlloc CUDA_- 4.

cuMemcpy3D. cuMemsetD2D32. and dstPitch specifies the number of bytes between each row.Number of elements hStream . cuMemcpyAtoH. size_t dstPitch. cuMemcpyDtoDAsync. cuMemcpy2DAsync. cuMemAllocPitch. cuMemsetD8. cuArrayDestroy. cuArray3DGetDescriptor. cuMemsetD16Async. cuArrayGetDescriptor. cuMemAlloc. cuArrayCreate.31. asynchronous launches. cuMemcpyAtoHAsync. cuMemcpy3DAsync. unsigned short us.31. cuMemHostAlloc. cuMemAllocPitch. size_t Width. cuMemcpyAtoA. size_t N. cuMemcpyDtoH. cuMemsetD8Async. cuMemcpyHtoAAsync. size_t Height) Sets the 2D memory range of Width 16-bit values to the specified value us. cuMemsetD8Async. cuMemHostGetDevicePointer. cuMemcpy2D. cuArrayDestroy. cuMemcpyDtoHAsync. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. cuMemcpyAtoD. cuMemsetD16Async() is asynchronous and can optionally be associated to a stream by passing a non-zero stream argument. cuMemcpyDtoA. cuMemcpy2D. cuMemsetD2D32. cuMemsetD2D8Async. cuArray3DGetDescriptor. cuMemAllocHost.35 CUresult cuMemsetD16Async (CUdeviceptr dstDevice.Destination device pointer us . cuMemFreeHost. cuArrayGetDescriptor. ERROR_INVALID_CONTEXT.2. cuMemsetD2D16. cuMemHostGetDevicePointer. cuMemcpyAtoHAsync.222 See also: Module Documentation cuArray3DCreate. cuMemsetD32Async 4. unsigned short us. cuMemcpyAtoH. cuMemcpy2DUnaligned. cuMemsetD2D32Async. cuMemsetD8. Height specifies the number of rows to set. cuMemGetInfo. cuMemcpyHtoA. cuMemcpyHtoDAsync. cuMemFree. cuMemsetD2D16Async. cuMemAllocHost. cuMemcpyDtoA. cuMemcpy2DUnaligned. cuMemcpyDtoD. CUstream hStream) Sets the memory range of N 16-bit values to the specified value us. This function performs fastest when the pitch is one that has been passed back by cuMemAllocPitch(). cuMemFreeHost. CUDA_ERROR_NOT_INITIALIZED. See also: cuArray3DCreate.Value to set N . CUDA_ERROR_DEINITIALIZED. cuMemcpyHtoD. cuMemcpyDtoD. cuMemsetD2D32Async. cuMemcpy3DAsync.Stream identifier Returns: CUDA_SUCCESS. cuMemcpyHtoAAsync. cuMemsetD2D16Async. cuMemsetD2D8. cuMemcpyHtoDAsync. cuArrayCreate. cuMemsetD2D8. cuMemGetAddressRange. cuMemcpyDtoHAsync. cuMemsetD2D16. cuMemcpyAtoD.36 CUresult cuMemsetD2D16 (CUdeviceptr dstDevice. cuMemsetD2D8Async. cuMemFree. cuMemAlloc. Parameters: dstDevice . cuMemcpyDtoH.2. cuMemGetAddressRange. cuMemcpyHtoD. cuMemGetInfo. cuMemcpy2DAsync. cuMemsetD32Async CUDA_- 4. Generated for NVIDIA CUDA Library by Doxygen . cuMemcpyHtoA. cuMemcpy3D. cuMemHostAlloc. cuMemcpyDtoDAsync. cuMemsetD32. cuMemsetD32. cuMemcpyAtoA. cuMemsetD16.

asynchronous launches. cuMemcpyHtoAAsync. cuMemAllocPitch.Value to set Width . cuMemsetD2D32. cuMemcpy3DAsync. cuMemAlloc. cuMemGetAddressRange.Stream identifier Returns: CUDA_SUCCESS. Generated for NVIDIA CUDA Library by Doxygen CUDA_- . cuMemHostGetDevicePointer. cuMemcpy2D.Width of row Height .Value to set Width . cuMemcpyAtoHAsync. cuMemsetD16Async. cuMemsetD32Async 4. cuMemcpyDtoA. cuMemcpyDtoH.Destination device pointer dstPitch . CUDA_ERROR_NOT_INITIALIZED. cuMemcpy3D. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. cuMemcpyHtoDAsync.31. cuMemcpy2DAsync. cuMemcpyDtoDAsync.Number of rows hStream . cuArrayCreate. size_t dstPitch. cuMemsetD2D8. This function performs fastest when the pitch is one that has been passed back by cuMemAllocPitch().4. cuMemFreeHost. cuMemsetD16. Parameters: dstDevice . cuMemGetInfo. size_t Height. cuMemsetD8.31 Memory Management Parameters: dstDevice .37 CUresult cuMemsetD2D16Async (CUdeviceptr dstDevice. cuArrayGetDescriptor. cuMemsetD32. and dstPitch specifies the number of bytes between each row. cuMemcpyHtoA. cuMemcpyAtoH.Width of row Height .Number of rows Returns: CUDA_SUCCESS. cuMemsetD2D16Async() is asynchronous and can optionally be associated to a stream by passing a non-zero stream argument. cuMemcpyDtoD. See also: 223 CUDA_- cuArray3DCreate. cuArray3DGetDescriptor. cuMemcpyDtoHAsync. ERROR_INVALID_CONTEXT. cuMemcpyHtoD. asynchronous launches. unsigned short us.2. cuArrayDestroy. cuMemsetD2D8Async.Pitch of destination device pointer us . cuMemcpy2DUnaligned. cuMemsetD2D32Async. cuMemHostAlloc. cuMemsetD8Async. cuMemAllocHost. CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. CUDA_ERROR_DEINITIALIZED. size_t Width.Destination device pointer dstPitch . cuMemFree. cuMemcpyAtoD. cuMemcpyAtoA. cuMemsetD2D16Async. ERROR_INVALID_CONTEXT.Pitch of destination device pointer us . Height specifies the number of rows to set. CUDA_ERROR_DEINITIALIZED. CUstream hStream) Sets the 2D memory range of Width 16-bit values to the specified value us.

cuArrayCreate. cuMemcpy3D.Number of rows Returns: CUDA_SUCCESS. cuMemsetD2D32Async. cuMemcpyHtoD.39 CUresult cuMemsetD2D32Async (CUdeviceptr dstDevice. asynchronous launches. cuMemcpyDtoD. cuMemHostGetDevicePointer. Height specifies the number of rows to set. cuMemGetAddressRange. cuMemsetD16Async.31. cuArrayDestroy. cuMemsetD16. cuMemsetD2D32. unsigned int ui. cuMemsetD8. CUstream hStream) Sets the 2D memory range of Width 32-bit values to the specified value ui. cuMemHostAlloc. Generated for NVIDIA CUDA Library by Doxygen . ERROR_INVALID_CONTEXT. cuMemcpyHtoA. cuMemcpyAtoD. cuMemcpyAtoH.2. cuMemcpyAtoA. cuMemAllocPitch. cuMemsetD32Async 4.224 See also: Module Documentation cuArray3DCreate. cuMemsetD16Async. cuArray3DGetDescriptor. cuArrayCreate. cuMemcpy3D. cuMemsetD2D16. cuMemcpyDtoHAsync. cuMemcpy3DAsync.2. cuMemcpy2DAsync. cuMemcpyAtoD. CUDA_ERROR_NOT_INITIALIZED. cuMemsetD16. and dstPitch specifies the number of bytes between each row. Height specifies the number of rows to set. cuMemcpyHtoA. cuMemcpyDtoA. cuMemcpyHtoDAsync. cuMemcpy2DUnaligned. size_t dstPitch. cuMemsetD2D8Async. cuMemHostAlloc. cuMemcpyDtoA. cuMemcpyHtoAAsync.31. cuArrayGetDescriptor. cuMemcpyAtoHAsync. cuMemsetD32Async CUDA_- 4. size_t Width. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. CUDA_ERROR_DEINITIALIZED. cuMemAllocHost. cuMemAllocPitch. cuMemcpyAtoH. cuMemcpyDtoDAsync. cuMemAlloc. cuMemcpy2DAsync. cuMemsetD8Async. cuMemGetInfo.Value to set Width . This function performs fastest when the pitch is one that has been passed back by cuMemAllocPitch(). cuMemsetD2D32Async() is asynchronous and can optionally be associated to a stream by passing a non-zero stream argument. cuMemGetInfo.Destination device pointer dstPitch . cuMemcpyHtoAAsync. cuMemcpyAtoA. Parameters: dstDevice . This function performs fastest when the pitch is one that has been passed back by cuMemAllocPitch(). cuMemFree.Width of row Height . cuMemsetD2D8. cuMemcpyHtoDAsync. cuMemAllocHost. cuMemcpy2D. See also: cuArray3DCreate. cuMemsetD2D32Async.Pitch of destination device pointer ui . cuMemsetD8. cuArrayDestroy. cuMemsetD2D16Async. cuMemcpyAtoHAsync. cuMemcpyDtoH. cuMemcpyHtoD. size_t dstPitch. size_t Height. cuMemsetD8Async. cuMemcpy3DAsync. cuMemcpyDtoHAsync. cuMemsetD2D16. cuMemFree. cuMemcpy2DUnaligned. cuMemFreeHost. cuMemcpy2D. unsigned int ui. cuMemsetD32. cuMemGetAddressRange. cuArray3DGetDescriptor. size_t Width. cuMemsetD2D8. cuMemcpyDtoH. cuMemAlloc. cuMemcpyDtoDAsync. cuMemsetD32. cuMemcpyDtoD. size_t Height) Sets the 2D memory range of Width 32-bit values to the specified value ui. cuMemHostGetDevicePointer.38 CUresult cuMemsetD2D32 (CUdeviceptr dstDevice. and dstPitch specifies the number of bytes between each row. cuMemFreeHost. cuMemsetD2D8Async. cuArrayGetDescriptor.

Generated for NVIDIA CUDA Library by Doxygen CUDA_- . cuMemsetD2D32.2.31 Memory Management Parameters: dstDevice .Number of rows hStream .Value to set Width . cuMemsetD32Async 4. cuMemsetD2D8Async. cuMemcpyDtoH. cuMemcpy3DAsync. cuMemFree. cuMemcpyHtoAAsync. cuMemcpyHtoA.31.Value to set Width . size_t Width. asynchronous launches. cuMemsetD8. cuMemAllocPitch. cuMemcpy2DUnaligned. cuArrayDestroy. cuArrayGetDescriptor. This function performs fastest when the pitch is one that has been passed back by cuMemAllocPitch(). cuMemHostGetDevicePointer.Width of row Height . cuMemsetD2D16. cuMemcpy3D. CUDA_ERROR_DEINITIALIZED. cuMemsetD8Async. cuMemcpyHtoDAsync. cuMemsetD32. cuMemHostAlloc. cuMemsetD16.4. cuMemFreeHost.Width of row Height . cuMemcpyDtoA.Number of rows Returns: CUDA_SUCCESS. size_t dstPitch. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. cuMemsetD16Async. Parameters: dstDevice . CUDA_ERROR_NOT_INITIALIZED. cuMemGetAddressRange. See also: 225 CUDA_- cuArray3DCreate. cuMemAlloc. cuMemcpyAtoA. Height specifies the number of rows to set.40 CUresult cuMemsetD2D8 (CUdeviceptr dstDevice.Destination device pointer dstPitch . cuMemcpy2DAsync.Pitch of destination device pointer ui . cuMemcpy2D. CUDA_ERROR_DEINITIALIZED. cuArray3DGetDescriptor. cuMemGetInfo. asynchronous launches. cuMemcpyDtoHAsync. unsigned char uc. cuMemcpyHtoD. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous.Stream identifier Returns: CUDA_SUCCESS. cuMemcpyAtoD. cuMemcpyDtoD. cuMemsetD2D16Async. cuMemcpyDtoDAsync. CUDA_ERROR_NOT_INITIALIZED. cuMemcpyAtoHAsync. size_t Height) Sets the 2D memory range of Width 8-bit values to the specified value uc. ERROR_INVALID_CONTEXT. ERROR_INVALID_CONTEXT. cuMemAllocHost. cuMemsetD2D8. cuMemcpyAtoH.Destination device pointer dstPitch . cuArrayCreate.Pitch of destination device pointer uc . and dstPitch specifies the number of bytes between each row.

cuMemFreeHost. cuMemcpyAtoHAsync.31. cuArrayGetDescriptor. cuMemcpyHtoD. and dstPitch specifies the number of bytes between each row.Destination device pointer dstPitch . size_t N) Sets the memory range of N 32-bit values to the specified value ui. cuMemsetD8Async. cuMemsetD32. size_t dstPitch. cuMemHostGetDevicePointer. cuMemcpy3D. cuMemsetD8. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. CUDA_ERROR_DEINITIALIZED. cuMemsetD2D16Async. cuMemcpyDtoH. cuMemcpy2DAsync. cuMemsetD2D32. unsigned char uc. cuMemAllocPitch. Height specifies the number of rows to set. cuMemHostGetDevicePointer. cuMemcpyDtoDAsync. cuMemsetD16. CUstream hStream) Sets the 2D memory range of Width 8-bit values to the specified value uc. cuMemcpyDtoA. cuMemcpy3DAsync. cuMemsetD32. cuMemFree. cuMemcpyDtoHAsync. cuMemsetD2D8Async. cuMemcpy3DAsync. cuMemAllocPitch. cuMemsetD8. cuMemAllocHost. cuMemcpyAtoH. size_t Width.42 CUresult cuMemsetD32 (CUdeviceptr dstDevice. cuMemAlloc. cuMemcpy2D. cuMemsetD32Async 4. cuArray3DGetDescriptor. cuMemGetInfo. asynchronous launches. cuMemsetD8Async. This function performs fastest when the pitch is one that has been passed back by cuMemAllocPitch(). cuMemcpyDtoHAsync. cuMemcpy2DAsync. cuMemGetAddressRange.Stream identifier Returns: CUDA_SUCCESS.Width of row Height . cuMemcpyHtoDAsync. cuMemGetInfo.Number of rows hStream . cuMemcpyDtoH. cuMemcpy2D. cuArray3DGetDescriptor. cuMemsetD16. See also: cuArray3DCreate. cuMemcpyAtoA. cuMemcpyHtoAAsync.2. cuMemsetD16Async. cuMemcpyDtoD. cuMemcpyHtoA. Parameters: dstDevice . cuMemFreeHost. cuMemsetD2D8Async() is asynchronous and can optionally be associated to a stream by passing a non-zero stream argument. CUDA_ERROR_NOT_INITIALIZED. cuMemcpyDtoA. cuMemcpyAtoD.Value to set Width . cuMemsetD32Async CUDA_- 4. Generated for NVIDIA CUDA Library by Doxygen . cuMemcpyHtoAAsync. cuMemcpy2DUnaligned. cuMemHostAlloc. cuMemAllocHost. cuMemcpy2DUnaligned. cuArrayDestroy.41 CUresult cuMemsetD2D8Async (CUdeviceptr dstDevice. unsigned int ui. cuMemcpyAtoH. cuMemsetD2D32Async. cuMemcpyHtoDAsync. cuMemcpyAtoA. cuArrayGetDescriptor.31. cuArrayCreate.226 See also: Module Documentation cuArray3DCreate. cuMemcpyDtoD.2. cuMemGetAddressRange. cuMemsetD2D32Async. cuMemsetD2D16. cuMemcpyDtoDAsync. cuMemAlloc. cuArrayCreate. cuMemsetD2D16Async. size_t Height. ERROR_INVALID_CONTEXT. cuArrayDestroy. cuMemsetD2D16.Pitch of destination device pointer uc . cuMemHostAlloc. cuMemsetD16Async. cuMemsetD2D8. cuMemcpyAtoHAsync. cuMemcpyAtoD. cuMemcpy3D. cuMemsetD2D32. cuMemFree. cuMemcpyHtoA. cuMemcpyHtoD.

Number of elements Returns: CUDA_SUCCESS. cuMemsetD2D16Async. cuMemcpyDtoA. cuMemsetD8Async. Generated for NVIDIA CUDA Library by Doxygen CUDA_- . cuMemsetD2D32. cuMemsetD16. cuMemsetD32Async 4. cuMemcpy2DAsync.Value to set N . cuMemAllocHost.31. cuMemcpy3DAsync. cuMemsetD2D32Async. cuArrayGetDescriptor. cuMemcpyAtoHAsync. cuMemcpyDtoDAsync. CUstream hStream) Sets the memory range of N 32-bit values to the specified value ui. cuMemGetAddressRange. cuMemcpyDtoDAsync. cuMemcpyDtoHAsync.2. cuMemcpyDtoH. cuMemcpyAtoA. cuArray3DGetDescriptor. cuMemsetD16Async. cuMemHostGetDevicePointer. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. cuMemAllocPitch. cuArrayDestroy. cuArrayCreate.Number of elements hStream . cuMemcpy2DAsync. cuMemcpyHtoAAsync. cuArrayCreate. cuArrayGetDescriptor.Destination device pointer ui . cuMemcpyAtoH. cuMemAlloc.Value to set N . cuMemsetD8. cuMemcpyHtoA. CUDA_ERROR_DEINITIALIZED. cuMemcpy2DUnaligned. cuMemFree. cuMemsetD2D8Async. unsigned int ui.31 Memory Management Parameters: dstDevice . cuMemcpy2D. cuMemsetD32Async() is asynchronous and can optionally be associated to a stream by passing a non-zero stream argument.Stream identifier Returns: CUDA_SUCCESS. cuMemcpy3DAsync. cuMemcpyAtoHAsync. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. ERROR_INVALID_CONTEXT. cuMemAlloc. cuMemcpyDtoA. cuMemcpy3D. cuMemHostAlloc. CUDA_ERROR_DEINITIALIZED. CUDA_ERROR_NOT_INITIALIZED.43 CUresult cuMemsetD32Async (CUdeviceptr dstDevice. cuMemcpyAtoA. ERROR_INVALID_CONTEXT. cuMemcpyAtoH. cuMemcpy2DUnaligned. cuMemAllocHost. cuArray3DGetDescriptor. cuMemcpy3D. cuMemcpyDtoHAsync. cuMemcpyAtoD. asynchronous launches.Destination device pointer ui . Parameters: dstDevice . cuMemcpyAtoD. cuMemGetInfo. See also: 227 CUDA_- cuArray3DCreate. cuMemAllocPitch. cuMemcpy2D. cuMemsetD2D16. cuMemcpyHtoD.4. cuMemcpyHtoDAsync. cuMemcpyDtoD. cuMemsetD2D8. cuMemcpyDtoH. CUDA_ERROR_NOT_INITIALIZED. See also: cuArray3DCreate. asynchronous launches. cuMemFreeHost. cuArrayDestroy. size_t N. cuMemcpyDtoD.

CUDA_ERROR_NOT_INITIALIZED. cuArrayDestroy.31. unsigned char uc. cuMemsetD32Async CUDA_- 4. cuMemsetD2D32. cuMemcpyHtoD. cuMemGetAddressRange.Destination device pointer uc . cuMemsetD2D8. cuMemsetD2D32Async. cuMemcpyDtoA. cuMemGetInfo. cuMemHostAlloc. cuMemcpyDtoHAsync. cuMemGetAddressRange. See also: cuArray3DCreate. cuMemAlloc. cuMemsetD16Async. cuMemsetD8Async. cuMemsetD8Async() is asynchronous and can optionally be associated to a stream by passing a non-zero stream argument. cuMemGetInfo. cuMemsetD16. cuMemsetD2D8Async. size_t N.228 Module Documentation cuMemcpyHtoA. cuMemAllocPitch. cuMemcpy2DAsync. cuMemsetD32 4. asynchronous launches. cuMemHostGetDevicePointer. cuArrayCreate. size_t N) Sets the memory range of N 8-bit values to the specified value uc. CUDA_ERROR_NOT_INITIALIZED. cuMemcpyHtoD. cuMemcpyDtoDAsync.31.2.Stream identifier Returns: CUDA_SUCCESS. CUDA_ERROR_DEINITIALIZED.Number of elements Returns: CUDA_SUCCESS. cuMemcpyAtoHAsync. cuMemcpyHtoDAsync. cuMemcpyAtoA. ERROR_INVALID_CONTEXT. unsigned char uc. cuMemsetD2D8Async. CUDA_ERROR_INVALID_VALUE CUDA_- Generated for NVIDIA CUDA Library by Doxygen .Number of elements hStream . CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. cuMemsetD2D16. CUDA_ERROR_DEINITIALIZED. cuMemsetD16Async. Parameters: dstDevice . cuMemcpyHtoA. cuMemFreeHost. cuMemcpyDtoH. cuMemsetD8Async. cuMemcpy2DUnaligned. cuMemcpyHtoAAsync.45 CUresult cuMemsetD8Async (CUdeviceptr dstDevice. Parameters: dstDevice .44 CUresult cuMemsetD8 (CUdeviceptr dstDevice. cuMemsetD8. cuMemcpyAtoD. cuArray3DGetDescriptor. cuMemAllocHost. CUstream hStream) Sets the memory range of N 8-bit values to the specified value uc. cuMemcpy3DAsync. cuMemHostAlloc. cuMemsetD2D16Async.Value to set N . cuMemsetD2D16. cuMemFreeHost. cuMemHostGetDevicePointer. cuMemcpyDtoD. cuMemcpyHtoDAsync. cuMemcpyAtoH. cuMemFree.Value to set N . cuMemsetD16. cuMemsetD2D32Async. cuMemsetD2D8.2. cuMemFree. cuMemsetD32. ERROR_INVALID_CONTEXT. cuMemcpy3D.Destination device pointer uc . cuMemcpyHtoAAsync. cuMemsetD2D32. cuArrayGetDescriptor. cuMemcpy2D. cuMemsetD2D16Async.

cuMemsetD2D32. cuMemsetD16Async. cuMemsetD16. cuMemAllocHost.4. cuMemHostAlloc. cuMemcpyHtoA. cuMemFree. cuMemcpy2D. cuMemcpyAtoA. cuMemcpyDtoH. cuMemAllocPitch. cuMemsetD32. cuArrayGetDescriptor. asynchronous launches. cuArray3DGetDescriptor. cuMemcpyDtoDAsync. cuArrayDestroy. cuMemsetD32Async Generated for NVIDIA CUDA Library by Doxygen . cuMemcpyAtoH. cuMemcpyAtoD. cuMemsetD2D16Async. cuMemHostGetDevicePointer. cuMemsetD2D16. cuMemcpyHtoAAsync. cuMemcpyDtoD. cuMemcpyAtoHAsync. cuMemcpy3D. cuMemcpyHtoDAsync. cuMemsetD2D8Async. See also: 229 cuArray3DCreate. cuMemcpyDtoA. cuMemcpyDtoHAsync. cuMemcpy2DAsync. cuMemsetD8. cuMemFreeHost. cuMemAlloc. cuMemsetD2D32Async. cuMemGetAddressRange. cuMemcpyHtoD. cuMemGetInfo.31 Memory Management Note: Note that this function may also return error codes from previous. cuMemcpy2DUnaligned. cuMemcpy3DAsync. cuArrayCreate. cuMemsetD2D8.

1 Detailed Description This section describes the stream management functions of the low-level CUDA driver application programming interface. unsigned int Flags) Creates a stream and returns a handle in phStream. CUDA_ERROR_INVALID_VALUE. • CUresult cuStreamWaitEvent (CUstream hStream. 4. • CUresult cuStreamSynchronize (CUstream hStream) Wait until a stream’s tasks are completed. CUDA_ERROR_DEINITIALIZED. See also: cuStreamDestroy.32 Stream Management Functions • CUresult cuStreamCreate (CUstream ∗phStream.2 4. unsigned int Flags) Make a compute stream wait on an event. Parameters: phStream . unsigned int Flags) Create a stream. CUDA_ERROR_NOT_INITIALIZED.230 Module Documentation 4. CUevent hEvent.Returned newly created stream Flags . cuStreamSynchronize Generated for NVIDIA CUDA Library by Doxygen .Parameters for stream creation (must be 0) Returns: CUDA_SUCCESS. asynchronous launches. cuStreamQuery. • CUresult cuStreamQuery (CUstream hStream) Determine status of a compute stream.32.32. CUDA_ERROR_OUT_OF_MEMORY Note: Note that this function may also return error codes from previous. cuStreamWaitEvent. Flags is required to be 0. 4. CUDA_ERROR_INVALID_CONTEXT. • CUresult cuStreamDestroy (CUstream hStream) Destroys a stream.32.1 Function Documentation CUresult cuStreamCreate (CUstream ∗ phStream.2.

2 CUresult cuStreamDestroy (CUstream hStream) 231 Destroys the stream specified by hStream. CUDA_ERROR_NOT_INITIALIZED. cuStreamSynchronize CUDA_- 4. ERROR_INVALID_CONTEXT. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. Parameters: hStream . CUDA_ERROR_DEINITIALIZED. cuStreamWaitEvent. If the context was created with the CU_CTX_BLOCKING_SYNC flag. CUDA_ERROR_NOT_INITIALIZED. cuStreamDestroy.32. See also: cuStreamCreate. cuStreamSynchronize 4. CUDA_ERROR_DEINITIALIZED. CUDA_ERROR_NOT_READY Note: Note that this function may also return error codes from previous.4 CUresult cuStreamSynchronize (CUstream hStream) Waits until the device has completed all operations in the stream specified by hStream.3 CUresult cuStreamQuery (CUstream hStream) Returns CUDA_SUCCESS if all operations in the stream specified by hStream have completed.4.2. CUDA_ERROR_INVALID_HANDLE Generated for NVIDIA CUDA Library by Doxygen CUDA_- .Stream to wait for Returns: CUDA_SUCCESS. cuStreamQuery. Parameters: hStream . or CUDA_ERROR_NOT_READY if not. asynchronous launches. Parameters: hStream . CUDA_ERROR_DEINITIALIZED. CUDA_ERROR_INVALID_CONTEXT.32.2. asynchronous launches.32 Stream Management 4.Stream to destroy Returns: CUDA_SUCCESS. CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_INVALID_HANDLE. cuStreamWaitEvent.2.Stream to query status of Returns: CUDA_SUCCESS.32. the CPU thread will block until the stream is finished with all of its tasks. ERROR_INVALID_CONTEXT. See also: cuStreamCreate.

232 Note: Module Documentation Note that this function may also return error codes from previous.Stream to wait hEvent .32. See also: cuStreamCreate.Parameters for the operation (must be 0) Returns: CUDA_SUCCESS. cuStreamQuery 4. Parameters: hStream . ERROR_INVALID_CONTEXT. any functions (including cuEventRecord() and cuEventDestroy()) may be called on hEvent again. cuStreamQuery.5 CUresult cuStreamWaitEvent (CUstream hStream. CUDA_ERROR_NOT_INITIALIZED. asynchronous launches.Event to wait on (may not be NULL) Flags . cuStreamWaitEvent. See also: cuStreamCreate. asynchronous launches. CUDA_ERROR_INVALID_HANDLE. cuStreamDestroy. If hStream is 0 (the NULL stream) any future work submitted in any stream will wait for hEvent to complete before beginning execution. Note: Note that this function may also return error codes from previous. unsigned int Flags) Makes all future work submitted to hStream wait until hEvent reports completion before beginning execution. and the subsequent calls will not have any effect on hStream. If cuEventRecord() has not been called on hEvent. Once this call has returned. CUevent hEvent. cuStreamDestroy CUDA_- Generated for NVIDIA CUDA Library by Doxygen .2. CUDA_ERROR_DEINITIALIZED. cuEventRecord. cuStreamSynchronize. This synchronization will be performed efficiently on the device. The stream hStream will wait only for the completion of the most recent host call to cuEventRecord() on hEvent. This effectively creates a barrier for all future work submitted to the context. this call acts as if the record has already completed. and so is a functional no-op.

• CUresult cuEventSynchronize (CUevent hEvent) Waits for an event to complete. unsigned int Flags) Creates an event. • CU_EVENT_BLOCKING_SYNC: Specifies that the created event should use blocking synchronization. • CUresult cuEventElapsedTime (float ∗pMilliseconds. • CU_EVENT_DISABLE_TIMING: Specifies that the created event does not need to record timing data.2. A CPU thread that uses cuEventSynchronize() to wait on an event created with this flag will block until the event has actually been recorded.1 Function Documentation CUresult cuEventCreate (CUevent ∗ phEvent. • CUresult cuEventQuery (CUevent hEvent) Queries an event’s status.1 Detailed Description This section describes the event management functions of the low-level CUDA driver application programming interface.33 Event Management Functions • CUresult cuEventCreate (CUevent ∗phEvent. Events created with this flag specified and the CU_EVENT_BLOCKING_SYNC flag not specified will provide the best performance when used with cuStreamWaitEvent() and cuEventQuery(). unsigned int Flags) Creates an event ∗phEvent with the flags specified via Flags. • CUresult cuEventDestroy (CUevent hEvent) Destroys an event. CUevent hEnd) Computes the elapsed time between two events. Valid flags include: • CU_EVENT_DEFAULT: Default event creation flag. CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_OUT_OF_MEMORY Generated for NVIDIA CUDA Library by Doxygen .33.4.33 Event Management 233 4.Returns newly created event Flags . CUevent hStart. CUstream hStream) Records an event. CUDA_ERROR_INVALID_CONTEXT. 4.33. CUDA_ERROR_INVALID_VALUE. • CUresult cuEventRecord (CUevent hEvent. Parameters: phEvent .33. 4.2 4. CUDA_ERROR_DEINITIALIZED.Event creation flags Returns: CUDA_SUCCESS.

If cuEventRecord() has been called on both events but one or both of them has not yet been completed (that is. CUDA_ERROR_DEINITIALIZED. This happens because the cuEventRecord() operation takes place asynchronously and there is no guarantee that the measured latency is actually just between the two events.2 CUresult cuEventDestroy (CUevent hEvent) Destroys the event specified by hEvent. cuEventElapsedTime CUDA_- 4. CUDA_ERROR_NOT_READY Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_DEINITIALIZED. cuEventRecord.33. See also: cuEventRecord. cuEventElapsedTime 4.234 Note: Module Documentation Note that this function may also return error codes from previous. cuEventSynchronize. the resulting time may be greater than expected (even if both used the same stream handle). CUDA_ERROR_INVALID_HANDLE. CUDA_ERROR_NOT_READY is returned. asynchronous launches.Starting event hEnd . If either event was created with the CU_EVENT_DISABLE_TIMING flag. Parameters: hEvent .2.3 CUresult cuEventElapsedTime (float ∗ pMilliseconds. thus altering the timing in a significant way. ERROR_INVALID_CONTEXT. See also: cuEventCreate. cuEventDestroy. cuEventQuery.Event to destroy Returns: CUDA_SUCCESS. Any number of other different stream operations could execute in between the two measured events.Ending event Returns: CUDA_SUCCESS. CUDA_ERROR_NOT_INITIALIZED.2. then this function will return CUDA_ERROR_INVALID_HANDLE. CUDA_ERROR_INVALID_CONTEXT. CUevent hEnd) Computes the elapsed time between two events (in milliseconds with a resolution of around 0. If either event was last recorded in a non-NULL stream. CUevent hStart.Time between hStart and hEnd in ms hStart .33. Parameters: pMilliseconds . CUDA_ERROR_NOT_INITIALIZED. If cuEventRecord() has not been called on either event then CUDA_ERROR_INVALID_HANDLE is returned. cuEventQuery() would return CUDA_ERROR_NOT_READY on at least one of the events). asynchronous launches. cuEventQuery.5 microseconds). CUDA_ERROR_INVALID_HANDLE Note: Note that this function may also return error codes from previous. cuEventSynchronize.

4. CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_DEINITIALIZED. the event is recorded after all preceding operations in hStream have been completed. cuEventDestroy 235 4.Event to record hStream . CUDA_ERROR_INVALID_VALUE Generated for NVIDIA CUDA Library by Doxygen .2.5 CUresult cuEventRecord (CUevent hEvent. asynchronous launches. cuEventDestroy. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_NOT_READY Note: Note that this function may also return error codes from previous. cuEventRecord. CUDA_ERROR_NOT_INITIALIZED.2. Since operation is asynchronous. CUstream hStream) Records an event. CUDA_ERROR_INVALID_VALUE.4 CUresult cuEventQuery (CUevent hEvent) Query the status of all device work preceding the most recent call to cuEventRecord() (in the appropriate compute streams. See also: cuEventCreate. CUDA_ERROR_DEINITIALIZED.Stream to record event for Returns: CUDA_SUCCESS. cuEventQuery.33 Event Management Note: Note that this function may also return error codes from previous. See also: cuEventCreate. otherwise. asynchronous launches. Parameters: hEvent . If this work has not yet been completed by the device then CUDA_ERROR_NOT_READY is returned. or if cuEventRecord() has not been called on hEvent. it is recorded after all preceding operations in the CUDA context have been completed. CUDA_ERROR_INVALID_HANDLE. then this call will overwrite any existing state in hEvent. cuEventQuery and/or cuEventSynchronize() must be used to determine when the event has actually been recorded. CUDA_ERROR_INVALID_HANDLE. Parameters: hEvent . cuEventSynchronize. then CUDA_SUCCESS is returned. Any subsequent calls which examine the status of hEvent will only examine the completion of this most recent call to cuEventRecord().33.33. If hStream is non-zero. If cuEventRecord() has previously been called on hEvent. CUDA_ERROR_INVALID_CONTEXT. cuEventRecord. If this work has successfully been completed by the device. as specified by the arguments to cuEventRecord()).Event to query Returns: CUDA_SUCCESS. cuEventElapsedTime 4. cuEventSynchronize.

CUDA_ERROR_INVALID_HANDLE Note: Note that this function may also return error codes from previous. See also: cuEventCreate. cuEventQuery.236 Note: Module Documentation Note that this function may also return error codes from previous. then the CPU thread will busy-wait until the event has been completed by the device. If cuEventRecord() has not been called on hEvent. as specified by the arguments to cuEventRecord()). asynchronous launches. asynchronous launches. cuEventDestroy. cuEventSynchronize. See also: cuEventCreate. Waiting for an event that was created with the CU_EVENT_BLOCKING_SYNC flag will cause the calling CPU thread to block until the event has been completed by the device.2. cuEventElapsedTime 4. CUDA_ERROR_DEINITIALIZED.33.Event to wait for Returns: CUDA_SUCCESS. CUDA_SUCCESS is returned immediately. Parameters: hEvent .6 CUresult cuEventSynchronize (CUevent hEvent) Wait until the completion of all device work preceding the most recent call to cuEventRecord() (in the appropriate compute streams. If the CU_EVENT_BLOCKING_SYNC flag has not been set. cuEventRecord. cuStreamWaitEvent. cuEventElapsedTime CUDA_- Generated for NVIDIA CUDA Library by Doxygen . cuEventDestroy. CUDA_ERROR_NOT_INITIALIZED. cuEventQuery. ERROR_INVALID_CONTEXT.

int x. • CUresult cuParamSeti (CUfunction hfunc. Generated for NVIDIA CUDA Library by Doxygen . • CUresult cuParamSetSize (CUfunction hfunc. int z) Sets the block-dimensions for the function. CUfunction_attribute attrib. • CUresult cuLaunch (CUfunction f) Launches a CUDA function. float value) Adds a floating-point parameter to the function’s argument list.4. • CUresult cuFuncSetBlockShape (CUfunction hfunc.1 Detailed Description This section describes the execution control functions of the low-level CUDA driver application programming interface. int offset. int y. CUstream hStream) Launches a CUDA function.34.34 Execution Control 237 4. CUfunc_cache config) Sets the preferred cache configuration for a device function. • CUresult cuFuncSetSharedSize (CUfunction hfunc.34 Execution Control Modules • Execution Control [DEPRECATED] Functions • CUresult cuFuncGetAttribute (int ∗pi. int offset. • CUresult cuLaunchGrid (CUfunction f. unsigned int numbytes) Adds arbitrary data to the function’s argument list. • CUresult cuFuncSetCacheConfig (CUfunction hfunc. int grid_height) Launches a CUDA function. int offset. int grid_width. • CUresult cuParamSetf (CUfunction hfunc. CUfunction hfunc) Returns information about a function. void ∗ptr. int grid_width. unsigned int numbytes) Sets the parameter size for the function. unsigned int value) Adds an integer parameter to the function’s argument list. 4. • CUresult cuLaunchGridAsync (CUfunction f. unsigned int bytes) Sets the dynamic shared-memory size for the function. int grid_height. • CUresult cuParamSetv (CUfunction hfunc.

Function to query attribute of Returns: CUDA_SUCCESS. This number depends on both the function and the device on which the function is currently loaded.3 function would return the value 13. • CU_FUNC_ATTRIBUTE_PTX_VERSION: The PTX virtual architecture version for which the function was compiled. CUfunction_attribute attrib. CUDA_ERROR_INVALID_HANDLE. The supported attributes are: • CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK: The maximum number of threads per block. cuFuncSetSharedSize. Parameters: pi .3 function would return the value 13. Note that this will return a value of 10 for legacy cubins that do not have a properly-encoded binary architecture version. cuParamSetv. • CU_FUNC_ATTRIBUTE_BINARY_VERSION: The binary architecture version for which the function was compiled.2. CUDA_ERROR_INVALID_CONTEXT. beyond which a launch of the function would fail. This does not include dynamically-allocated shared memory requested by the user at runtime.Attribute requested hfunc . cuParamSetf.34. cuLaunchGrid. Note that this may return the undefined value of 0 for cubins compiled prior to CUDA 3. • CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES: The size in bytes of user-allocated constant memory required by this function. CUDA_ERROR_DEINITIALIZED. cuLaunchGridAsync Generated for NVIDIA CUDA Library by Doxygen .0. • CU_FUNC_ATTRIBUTE_NUM_REGS: The number of registers used by each thread of this function. asynchronous launches.238 Module Documentation 4. • CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES: The size in bytes of statically-allocated shared memory per block required by this function. cuParamSeti. See also: cuFuncSetBlockShape. cuLaunch.34.1 Function Documentation CUresult cuFuncGetAttribute (int ∗ pi. so a PTX version 1. • CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES: The size in bytes of local memory used by each thread of this function. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous.Returned attribute value attrib . so a binary version 1. This value is the major binary version ∗ 10 + the minor binary version. CUfunction hfunc) Returns in ∗pi the integer value of the attribute attrib on the kernel given by hfunc. CUDA_ERROR_NOT_INITIALIZED. cuParamSetSize. cuFuncSetCacheConfig. This value is the major PTX version ∗ 10 + the minor PTX version.2 4.

34. cuLaunch. This setting does nothing on devices where the size of the L1 cache and shared memory are fixed. this sets through config the preferred cache configuration for the device function hfunc. int z) 239 Specifies the x. ERROR_INVALID_CONTEXT Generated for NVIDIA CUDA Library by Doxygen CUDA_ERROR_NOT_INITIALIZED. cuParamSetSize.34. int x. CUfunc_cache config) On devices where the L1 cache and shared memory use the same hardware resources. CUDA_ERROR_INVALID_CONTEXT. The driver will use the requested configuration if possible. In that case. y. int y.Kernel to specify dimensions of x . See also: cuFuncSetSharedSize. cuFuncGetAttribute.2.X dimension y . cuLaunchGridAsync 4.Z dimension Returns: CUDA_SUCCESS.34 Execution Control 4. cuLaunchGrid. This is only a preference.2. CUDA_ERROR_INVALID_HANDLE.4.Requested cache configuration Returns: CUDA_SUCCESS.Y dimension z . and z dimensions of the thread blocks that are created when the kernel given by hfunc is launched. CUDA_ERROR_NOT_INITIALIZED. the current context-wide setting will be used. Parameters: hfunc .3 CUresult cuFuncSetCacheConfig (CUfunction hfunc. asynchronous launches. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. Launching a kernel with a different preference than the most recent preference setting may insert a device-side synchronization point. but it is free to choose a different configuration if required to execute hfunc. Any context-wide preference set via cuCtxSetCacheConfig() will be overridden by this per-function setting unless the per-function setting is CU_FUNC_CACHE_PREFER_NONE.2 CUresult cuFuncSetBlockShape (CUfunction hfunc. cuParamSetv. CUDA_ERROR_DEINITIALIZED.Kernel to configure cache for config . cuParamSetf. The supported cache configurations are: • CU_FUNC_CACHE_PREFER_NONE: no preference for shared memory or L1 (default) • CU_FUNC_CACHE_PREFER_SHARED: prefer larger shared memory and smaller L1 cache • CU_FUNC_CACHE_PREFER_L1: prefer larger L1 cache and smaller shared memory Parameters: hfunc . CUDA_- . cuParamSeti. CUDA_ERROR_DEINITIALIZED. cuFuncSetCacheConfig.

CUDA_ERROR_DEINITIALIZED. CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES. cuLaunchGridAsync 4.240 Note: Module Documentation Note that this function may also return error codes from previous.2. asynchronous launches.5 CUresult cuLaunch (CUfunction f) Invokes the kernel f on a 1 x 1 x 1 grid of blocks.34. cuLaunchGrid. cuFuncSetSharedSize. CUDA_ERROR_INVALID_VALUE. CUDA_ERROR_INVALID_CONTEXT. cuParamSetSize. cuParamSetv. cuParamSetf. cuParamSeti. See also: cuFuncSetBlockShape. cuParamSetf.2. The block contains the number of threads specified by a previous call to cuFuncSetBlockShape(). CUDA_ERROR_NOT_INITIALIZED. cuLaunch. Parameters: f . CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING. See also: cuCtxGetCacheConfig. cuParamSetf.34. cuLaunchGridAsync 4. cuFuncGetAttribute. cuFuncGetAttribute. CUDA_ERROR_LAUNCH_FAILED. cuParamSetv. cuLaunch. asynchronous launches. See also: cuFuncSetBlockShape.4 CUresult cuFuncSetSharedSize (CUfunction hfunc. CUDA_ERROR_INVALID_HANDLE. Parameters: hfunc . cuCtxSetCacheConfig. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous.Kernel to specify dynamic shared-memory size for bytes .Dynamic shared-memory size per thread in bytes Returns: CUDA_SUCCESS. CUDA_ERROR_INVALID_CONTEXT.Kernel to launch Returns: CUDA_SUCCESS. cuParamSetv. cuParamSeti. CUDA_ERROR_DEINITIALIZED. cuFuncGetAttribute. CUDA_ERROR_SHARED_OBJECT_INIT_FAILED Note: Note that this function may also return error codes from previous. cuLaunchGrid. cuParamSetSize. cuLaunchGrid. cuParamSetSize. CUDA_ERROR_LAUNCH_TIMEOUT. cuParamSeti. CUDA_ERROR_NOT_INITIALIZED. asynchronous launches. unsigned int bytes) Sets through bytes the amount of dynamic shared memory that will be available to each thread block when the kernel given by hfunc is launched. cuFuncSetBlockShape. cuLaunchGridAsync Generated for NVIDIA CUDA Library by Doxygen . cuFuncSetCacheConfig.

cuParamSeti.Kernel to launch grid_width . CUDA_ERROR_SHARED_OBJECT_INIT_FAILED Note: Note that this function may also return error codes from previous. CUstream hStream) Invokes the kernel f on a grid_width x grid_height grid of blocks. cuFuncGetAttribute.34 Execution Control 4. cuParamSetv.Width of grid in blocks grid_height .Kernel to launch grid_width . See also: cuFuncSetBlockShape.4. cuLaunchGrid Generated for NVIDIA CUDA Library by Doxygen .34. CUDA_ERROR_INVALID_CONTEXT. See also: cuFuncSetBlockShape.34. CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING. asynchronous launches. int grid_height) 241 Invokes the kernel f on a grid_width x grid_height grid of blocks. CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING. cuParamSeti. Each block contains the number of threads specified by a previous call to cuFuncSetBlockShape(). CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_SHARED_OBJECT_INIT_FAILED Note: Note that this function may also return error codes from previous. cuParamSetf. CUDA_ERROR_LAUNCH_FAILED.Stream identifier Returns: CUDA_SUCCESS. cuFuncSetSharedSize.2.Height of grid in blocks Returns: CUDA_SUCCESS. cuParamSetf. CUDA_ERROR_LAUNCH_TIMEOUT. cuParamSetSize. CUDA_ERROR_LAUNCH_FAILED. Parameters: f . CUDA_ERROR_NOT_INITIALIZED. cuParamSetv. int grid_height. CUDA_ERROR_INVALID_VALUE. cuFuncSetSharedSize. cuFuncGetAttribute. CUDA_ERROR_LAUNCH_TIMEOUT. CUDA_ERROR_NOT_INITIALIZED. int grid_width.Height of grid in blocks hStream . asynchronous launches. cuLaunchGridAsync() can optionally be associated to a stream by passing a non-zero hStream argument.2.Width of grid in blocks grid_height .6 CUresult cuLaunchGrid (CUfunction f. cuParamSetSize. cuLaunch. CUDA_ERROR_INVALID_VALUE. CUDA_ERROR_DEINITIALIZED. cuLaunchGridAsync 4. CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES. CUDA_ERROR_DEINITIALIZED. cuLaunch. CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES. int grid_width. Each block contains the number of threads specified by a previous call to cuFuncSetBlockShape(). Parameters: f .7 CUresult cuLaunchGridAsync (CUfunction f.

cuLaunchGridAsync CUDA_- 4. cuLaunch.2. cuLaunch. offset is a byte offset. asynchronous launches.Offset to add parameter to argument list value . offset is a byte offset. cuParamSetf.9 CUresult cuParamSeti (CUfunction hfunc. cuFuncSetSharedSize. asynchronous launches. CUDA_ERROR_NOT_INITIALIZED.Value of parameter Returns: CUDA_SUCCESS.Kernel to add parameter to offset . cuLaunchGrid.34. int offset. cuParamSetSize. cuParamSetv. CUDA_ERROR_DEINITIALIZED. CUDA_ERROR_NOT_INITIALIZED. unsigned int value) Sets an integer parameter that will be specified the next time the kernel corresponding to hfunc will be invoked. Parameters: hfunc . cuParamSetSize. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. cuFuncSetSharedSize. int offset. cuParamSeti. ERROR_INVALID_CONTEXT. CUDA_ERROR_DEINITIALIZED.Kernel to add parameter to offset . float value) Module Documentation Sets a floating-point parameter that will be specified the next time the kernel corresponding to hfunc will be invoked. cuFuncGetAttribute. Parameters: hfunc . cuLaunchGridAsync CUDA_- Generated for NVIDIA CUDA Library by Doxygen . ERROR_INVALID_CONTEXT.34. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous.Offset to add parameter to argument list value . cuFuncGetAttribute.8 CUresult cuParamSetf (CUfunction hfunc.2. See also: cuFuncSetBlockShape.Value of parameter Returns: CUDA_SUCCESS. cuParamSetv. cuLaunchGrid. See also: cuFuncSetBlockShape.242 4.

34. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous.Offset to add data to argument list ptr . int offset. cuLaunchGrid. cuParamSetf. cuParamSeti.11 CUresult cuParamSetv (CUfunction hfunc. cuLaunchGridAsync CUDA_- 4. cuLaunch.4. cuFuncSetSharedSize.Kernel to set parameter size for numbytes . cuLaunchGridAsync CUDA_- Generated for NVIDIA CUDA Library by Doxygen .Size of data to copy in bytes Returns: CUDA_SUCCESS. CUDA_ERROR_DEINITIALIZED.34. asynchronous launches.34 Execution Control 4. cuParamSetv. cuLaunchGrid. cuFuncGetAttribute. cuParamSetSize. CUDA_ERROR_NOT_INITIALIZED.10 CUresult cuParamSetSize (CUfunction hfunc. See also: cuFuncSetBlockShape. CUDA_ERROR_NOT_INITIALIZED. offset is a byte offset. See also: cuFuncSetBlockShape. ERROR_INVALID_CONTEXT. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous.2.Kernel to add data to offset . cuParamSeti. unsigned int numbytes) 243 Sets through numbytes the total size in bytes needed by the function parameters of the kernel corresponding to hfunc. unsigned int numbytes) Copies an arbitrary amount of data (specified in numbytes) from ptr into the parameter space of the kernel corresponding to hfunc. cuLaunch. cuParamSetf.2. CUDA_ERROR_DEINITIALIZED. Parameters: hfunc . asynchronous launches.Size of parameter list in bytes Returns: CUDA_SUCCESS. ERROR_INVALID_CONTEXT.Pointer to arbitrary data numbytes . cuFuncGetAttribute. Parameters: hfunc . void ∗ ptr. cuFuncSetSharedSize.

ERROR_INVALID_CONTEXT.Kernel to add texture-reference to texunit .Texture unit (must be CU_PARAM_TR_DEFAULT) hTexRef .35. CUDA_- Generated for NVIDIA CUDA Library by Doxygen . Parameters: hfunc . CUDA_ERROR_NOT_INITIALIZED.244 Module Documentation 4. 4.35. CUtexref hTexRef) Deprecated Makes the CUDA array or linear memory bound to the texture reference hTexRef available to a device program as a texture.2 4. 4. CUtexref hTexRef) Adds a texture-reference to the function’s argument list. int texunit. In this version of CUDA.35 Execution Control [DEPRECATED] Functions • CUresult cuParamSetTexRef (CUfunction hfunc.2.1 Function Documentation CUresult cuParamSetTexRef (CUfunction hfunc.1 Detailed Description This section describes the deprecated execution control functions of the low-level CUDA driver application programming interface. the texture-reference must be obtained via cuModuleGetTexRef() and the texunit parameter must be set to CU_PARAM_TR_DEFAULT.35. CUDA_ERROR_DEINITIALIZED. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. asynchronous launches.Texture-reference to add to argument list Returns: CUDA_SUCCESS. int texunit.

36 Texture Reference Management Modules • Texture Reference Management [DEPRECATED] Functions • CUresult cuTexRefGetAddress (CUdeviceptr ∗pdptr. CUtexref hTexRef. • CUresult cuTexRefSetFormat (CUtexref hTexRef. CUfilter_mode fm) Sets the filtering mode for a texture reference. const CUDA_ARRAY_DESCRIPTOR ∗desc. CUtexref hTexRef) Gets the address associated with a texture reference. • CUresult cuTexRefGetFormat (CUarray_format ∗pFormat. int dim) Gets the addressing mode used by a texture reference. CUaddress_mode am) Sets the addressing mode for a texture reference. • CUresult cuTexRefGetAddressMode (CUaddress_mode ∗pam. size_t Pitch) Binds an address as a 2D texture reference. CUdeviceptr dptr. int NumPackedComponents) Sets the format for a texture reference. CUdeviceptr dptr. • CUresult cuTexRefSetAddress (size_t ∗ByteOffset. • CUresult cuTexRefGetFilterMode (CUfilter_mode ∗pfm. int dim.4. CUarray_format fmt. • CUresult cuTexRefSetAddressMode (CUtexref hTexRef. CUtexref hTexRef) Gets the format used by a texture reference. CUarray hArray. • CUresult cuTexRefGetArray (CUarray ∗phArray.36 Texture Reference Management 245 4. unsigned int Flags) Binds an array as a texture reference. CUtexref hTexRef) Gets the filter-mode used by a texture reference. int ∗pNumChannels. • CUresult cuTexRefSetAddress2D (CUtexref hTexRef. • CUresult cuTexRefSetArray (CUtexref hTexRef. size_t bytes) Binds an address as a texture reference. • CUresult cuTexRefSetFilterMode (CUtexref hTexRef. • CUresult cuTexRefGetFlags (unsigned int ∗pFlags. CUtexref hTexRef) Gets the array bound to a texture reference. unsigned int Flags) Sets the flags for a texture reference. CUtexref hTexRef) Gets the flags used by a texture reference. Generated for NVIDIA CUDA Library by Doxygen . • CUresult cuTexRefSetFlags (CUtexref hTexRef. CUtexref hTexRef.

2 CUresult cuTexRefGetAddressMode (CUaddress_mode ∗ pam. the only valid value for dim are 0 and 1.2. cuTexRefGetFilterMode.246 Module Documentation 4.36. cuTexRefGetFormat CUDA_- 4. cuTexRefSetFlags.1 Function Documentation CUresult cuTexRefGetAddress (CUdeviceptr ∗ pdptr. cuTexRefGetFlags.36. or returns CUDA_ERROR_INVALID_VALUE if the texture reference is not bound to any device memory range.Dimension Returns: CUDA_SUCCESS. CUtexref hTexRef) Returns in ∗pdptr the base address bound to the texture reference hTexRef. cuTexRefSetAddressMode. CUDA_ERROR_NOT_INITIALIZED.2 4.1 Detailed Description This section describes the texture reference management functions of the low-level CUDA driver application programming interface. cuTexRefSetFormat. Currently. CUDA_ERROR_INVALID_VALUE See also: cuTexRefSetAddress. ERROR_INVALID_CONTEXT.Texture reference dim . CUDA_ERROR_INVALID_VALUE See also: cuTexRefSetAddress. cuTexRefGetArray. cuTexRefGetFormat CUDA_- Generated for NVIDIA CUDA Library by Doxygen .2. ERROR_INVALID_CONTEXT. cuTexRefSetArray. cuTexRefGetAddressMode. cuTexRefSetArray. cuTexRefSetFormat. Parameters: pam . CUDA_ERROR_NOT_INITIALIZED. cuTexRefGetFlags. int dim) Returns in ∗pam the addressing mode corresponding to the dimension dim of the texture reference hTexRef.36. cuTexRefSetFilterMode. CUDA_ERROR_DEINITIALIZED. CUtexref hTexRef.Returned addressing mode hTexRef . 4. CUDA_ERROR_DEINITIALIZED.Texture reference Returns: CUDA_SUCCESS. cuTexRefSetFlags. cuTexRefSetFilterMode.Returned device address hTexRef . cuTexRefGetAddress. cuTexRefSetAddressMode. cuTexRefGetArray. cuTexRefGetFilterMode. cuTexRefSetAddress2D. Parameters: pdptr . cuTexRefSetAddress2D.36.

CUtexref hTexRef) Returns in ∗pfm the filtering mode of the texture reference hTexRef. cuTexRefSetFlags.Texture reference Returns: CUDA_SUCCESS. CUDA_ERROR_INVALID_VALUE See also: cuTexRefSetAddress.4 CUresult cuTexRefGetFilterMode (CUfilter_mode ∗ pfm. cuTexRefSetAddress2D. cuTexRefSetArray. CUtexref hTexRef) 247 Returns in ∗phArray the CUDA array bound to the texture reference hTexRef. or returns CUDA_ERROR_INVALID_VALUE if the texture reference is not bound to any CUDA array. cuTexRefGetFormat CUDA_- 4. cuTexRefSetArray. CUDA_ERROR_DEINITIALIZED. Parameters: pfm . cuTexRefSetFlags. CUDA_ERROR_NOT_INITIALIZED. cuTexRefGetFlags. CUDA_ERROR_DEINITIALIZED. cuTexRefGetFilterMode. cuTexRefSetFilterMode. cuTexRefSetFormat.36 Texture Reference Management 4.Texture reference Returns: CUDA_SUCCESS. CUtexref hTexRef) Returns in ∗pFlags the flags of the texture reference hTexRef. CUDA_ERROR_INVALID_VALUE Generated for NVIDIA CUDA Library by Doxygen CUDA_- .2.36.5 CUresult cuTexRefGetFlags (unsigned int ∗ pFlags. CUDA_ERROR_NOT_INITIALIZED. Parameters: phArray .36. CUDA_ERROR_INVALID_VALUE See also: cuTexRefSetAddress.2. ERROR_INVALID_CONTEXT.Returned filtering mode hTexRef . CUDA_ERROR_NOT_INITIALIZED. cuTexRefSetFilterMode. cuTexRefGetArray.36.Returned flags hTexRef . cuTexRefGetFlags. cuTexRefGetAddress. cuTexRefSetFormat. ERROR_INVALID_CONTEXT. cuTexRefGetAddressMode. ERROR_INVALID_CONTEXT. cuTexRefGetAddressMode. Parameters: pFlags .3 CUresult cuTexRefGetArray (CUarray ∗ phArray. cuTexRefSetAddressMode. cuTexRefGetFormat CUDA_- 4. cuTexRefGetAddress. CUDA_ERROR_DEINITIALIZED. cuTexRefSetAddress2D.2.Returned array hTexRef .Texture reference Returns: CUDA_SUCCESS.4. cuTexRefSetAddressMode.

CUDA_ERROR_INVALID_VALUE CUDA_- Generated for NVIDIA CUDA Library by Doxygen . cuTexRefSetAddressMode. it will be ignored.Texture reference to bind dptr . cuTexRefGetAddressMode.7 CUresult cuTexRefSetAddress (size_t ∗ ByteOffset.6 CUresult cuTexRefGetFormat (CUarray_format ∗ pFormat. cuTexRefSetFilterMode. int ∗ pNumChannels.Returned byte offset hTexRef . CUtexref hTexRef) Returns in ∗pFormat and ∗pNumChannels the format and number of components of the CUDA array bound to the texture reference hTexRef.2. cuTexRefSetArray. cuTexRefGetAddressMode.Returned number of components hTexRef . CUDA_ERROR_NOT_INITIALIZED.36. CUtexref hTexRef. CUDA_ERROR_INVALID_VALUE See also: cuTexRefSetAddress. cuTexRefGetFormat 4.248 See also: Module Documentation cuTexRefSetAddress. This offset must be divided by the texel size and passed to kernels that read from the texture so they can be applied to the tex1Dfetch() function. cuTexRefGetArray. ERROR_INVALID_CONTEXT. cuTexRefGetFilterMode.2.Texture reference Returns: CUDA_SUCCESS. cuTexRefSetAddress() passes back a byte offset in ∗ByteOffset that must be applied to texture fetches in order to read from the desired memory. cuTexRefGetFilterMode. cuTexRefSetAddress2D. ERROR_INVALID_CONTEXT. cuTexRefSetFlags. Since the hardware enforces an alignment requirement on texture base addresses. CUDA_ERROR_NOT_INITIALIZED. Any previous address or CUDA array state associated with the texture reference is superseded by this function. CUDA_ERROR_DEINITIALIZED. Parameters: ByteOffset . cuTexRefSetAddressMode. cuTexRefGetArray. If the device memory pointer was returned from cuMemAlloc(). size_t bytes) Binds a linear address range to the texture reference hTexRef. cuTexRefGetAddress. Any memory previously bound to hTexRef is unbound.36. cuTexRefGetAddress. CUDA_ERROR_DEINITIALIZED. cuTexRefSetFormat.Returned format pNumChannels .Size of memory to bind in bytes Returns: CUDA_SUCCESS. the offset is guaranteed to be 0 and NULL may be passed as the ByteOffset parameter. cuTexRefSetFlags. cuTexRefGetFlags CUDA_- 4. CUdeviceptr dptr. Parameters: pFormat . cuTexRefSetFilterMode. cuTexRefSetArray. cuTexRefSetAddress2D. cuTexRefSetFormat.Device pointer to bind bytes . If pFormat or pNumChannels is NULL.

cuTexRefGetFlags. the second. cuTexRefGetFilterMode.8 CUresult cuTexRefSetAddress2D (CUtexref hTexRef. It is required that dptr be aligned to the appropriate hardware-specific texture alignment. const CUDA_ARRAY_DESCRIPTOR ∗ desc.Texture reference to bind desc . cuTexRefSetArray. int dim.2. Function calls to cuTexRefSetFormat() cannot follow calls to cuTexRefSetAddress2D() for the same texture reference. cuTexRefGetAddress. cuTexRefGetAddressMode. cuTexRefGetFlags.36.36 Texture Reference Management See also: 249 cuTexRefSetAddress2D. CUdeviceptr dptr. if dim is 1. CU_TR_ADDRESS_MODE_MIRROR = 2. Parameters: hTexRef .4. the addressing mode is applied to the first parameter of the functions used to fetch from the texture. size_t Pitch) Binds a linear address range to the texture reference hTexRef. cuTexRefGetAddressMode. If an unaligned dptr is supplied. CUDA_ERROR_DEINITIALIZED.2. cuTexRefSetFlags.36. CUDA_ERROR_NOT_INITIALIZED. CU_TR_ADDRESS_MODE_CLAMP = 1. cuTexRefSetFormat. cuTexRefGetFormat 4. Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_INVALID_VALUE See also: cuTexRefSetAddress. cuTexRefGetArray.Line pitch in bytes Returns: CUDA_SUCCESS. Any previous address or CUDA array state associated with the texture reference is superseded by this function. or cuTexRefSetAddress2D() to bind the texture reference to linear memory.9 CUresult cuTexRefSetAddressMode (CUtexref hTexRef. ERROR_INVALID_CONTEXT. If dim is zero. cuTexRefGetArray. cuTexRefSetArray. cuTexRefSetFormat. and so on. cuTexRefSetFlags.Descriptor of CUDA array dptr . Note that this call has no effect if hTexRef is bound to linear memory. cuTexRefSetFilterMode. cuTexRefGetAddress. CUaddress_mode am) Specifies the addressing mode am for the given dimension dim of the texture reference hTexRef. CUDA_ERROR_INVALID_VALUE is returned. CU_TR_ADDRESS_MODE_BORDER = 3 } CUaddress_mode. Any memory previously bound to hTexRef is unbound. Using a tex2D() function inside a kernel requires a call to either cuTexRefSetArray() to bind the corresponding texture reference to an array. cuTexRefSetAddressMode. cuTexRefSetFilterMode. You can query this value using the device attribute CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT.Device pointer to bind Pitch . CUaddress_mode is defined as: typedef enum CUaddress_mode_enum { CU_TR_ADDRESS_MODE_WRAP = 0. cuTexRefGetFilterMode. cuTexRefSetAddressMode. cuTexRefGetFormat CUDA_- 4.

CUfilter_mode_enum is defined as: typedef enum CUfilter_mode_enum { CU_TR_FILTER_MODE_POINT = 0. cuTexRefGetAddressMode. cuTexRefGetAddressMode. CUDA_ERROR_INVALID_VALUE See also: cuTexRefSetAddress.Texture reference Generated for NVIDIA CUDA Library by Doxygen . CU_TR_FILTER_MODE_LINEAR = 1 } CUfilter_mode. cuTexRefSetFlags. cuTexRefSetFilterMode. cuTexRefSetAddress2D. Any CUDA array previously bound to hTexRef is unbound. cuTexRefSetAddress2D.Options (must be CU_TRSA_OVERRIDE_FORMAT) Returns: CUDA_SUCCESS. ERROR_INVALID_CONTEXT.Dimension am . CUfilter_mode fm) Specifies the filtering mode fm to be used when reading memory through the texture reference hTexRef. cuTexRefGetArray. Parameters: hTexRef . cuTexRefGetAddress. Flags must be set to CU_TRSA_OVERRIDE_FORMAT. CUDA_ERROR_NOT_INITIALIZED. cuTexRefSetFlags.Array to bind Flags . CUDA_ERROR_DEINITIALIZED. cuTexRefGetFormat CUDA_- 4.10 CUresult cuTexRefSetArray (CUtexref hTexRef. cuTexRefSetArray. cuTexRefGetFlags. CUarray hArray. cuTexRefSetFormat. CUDA_ERROR_DEINITIALIZED. Parameters: hTexRef .36. cuTexRefSetFormat.Addressing mode to set Returns: Module Documentation CUDA_SUCCESS. Any previous address or CUDA array state associated with the texture reference is superseded by this function. ERROR_INVALID_CONTEXT.2.11 CUresult cuTexRefSetFilterMode (CUtexref hTexRef. cuTexRefGetFilterMode. cuTexRefGetFilterMode. cuTexRefGetFormat 4.250 Parameters: hTexRef .2. cuTexRefGetFlags. cuTexRefGetArray. Note that this call has no effect if hTexRef is bound to linear memory. CUDA_ERROR_INVALID_VALUE See also: CUDA_- cuTexRefSetAddress. unsigned int Flags) Binds the CUDA array hArray to the texture reference hTexRef. cuTexRefGetAddress. cuTexRefSetAddressMode. CUDA_ERROR_NOT_INITIALIZED.36.Texture reference dim . cuTexRefSetFilterMode.Texture reference to bind hArray .

CUDA_ERROR_INVALID_VALUE See also: 251 CUDA_- cuTexRefSetAddress. cuTexRefGetAddressMode. CUDA_ERROR_DEINITIALIZED. cuTexRefSetAddressMode. Parameters: hTexRef . cuTexRefSetAddress2D.12 CUresult cuTexRefSetFlags (CUtexref hTexRef.Number of components per array element Generated for NVIDIA CUDA Library by Doxygen . which suppresses the default behavior of having the texture promote integer data to floating point data in the range [0. ERROR_INVALID_CONTEXT.4. CUarray_format fmt. cuTexRefGetFilterMode. cuTexRefGetFilterMode.Texture reference fmt . cuTexRefGetFlags.36 Texture Reference Management fm . cuTexRefGetFlags.36. cuTexRefSetArray. cuTexRefGetAddress. Instead.Filtering mode to set Returns: CUDA_SUCCESS. cuTexRefSetFormat.36. CUDA_ERROR_NOT_INITIALIZED. The valid flags are: • CU_TRSF_READ_AS_INTEGER.Texture reference Flags . CUDA_ERROR_DEINITIALIZED.Optional flags to set Returns: CUDA_SUCCESS. cuTexRefSetArray. cuTexRefSetAddressMode.13 CUresult cuTexRefSetFormat (CUtexref hTexRef. unsigned int Flags) Specifies optional flags via Flags to specify the behavior of data returned through the texture reference hTexRef.Format to set NumPackedComponents . Parameters: hTexRef . ERROR_INVALID_CONTEXT.0) reference the entire breadth of the array dimension. the texture coordinates [0. fmt and NumPackedComponents are exactly analogous to the Format and NumChannels members of the CUDA_ARRAY_DESCRIPTOR structure: They specify the format of each component and the number of components per array element. CUDA_ERROR_INVALID_VALUE See also: cuTexRefSetAddress. cuTexRefGetAddress. cuTexRefGetFormat 4. cuTexRefSetFilterMode. cuTexRefGetAddressMode. 1. int NumPackedComponents) Specifies the format of the data to be read by the texture reference hTexRef. 1]. cuTexRefGetArray. • CU_TRSF_NORMALIZED_COORDINATES. cuTexRefSetFormat. Dim) where Dim is the width or height of the CUDA array. cuTexRefSetFlags. cuTexRefGetArray. which suppresses the default behavior of having the texture coordinates range from [0. cuTexRefGetFormat CUDA_- 4.2. CUDA_ERROR_NOT_INITIALIZED. cuTexRefSetAddress2D.2.

cuTexRefSetArray. CUDA_ERROR_DEINITIALIZED. cuTexRefGetArray. cuTexRefGetFilterMode.252 Returns: Module Documentation CUDA_SUCCESS. ERROR_INVALID_CONTEXT. cuTexRefSetFlags. CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_INVALID_VALUE See also: CUDA_- cuTexRefSetAddress. cuTexRefSetAddress2D. cuTexRefSetAddressMode. cuTexRefSetFilterMode. cuTexRefGetAddressMode. cuTexRefGetAddress. cuTexRefGetFlags. cuTexRefGetFormat Generated for NVIDIA CUDA Library by Doxygen .

CUDA_ERROR_DEINITIALIZED.37. Parameters: hTexRef .1 Function Documentation CUresult cuTexRefCreate (CUtexref ∗ pTexRef) Deprecated Creates a texture reference and returns its handle in ∗pTexRef.) to be used when the memory is read through this texture reference.37.Texture reference to destroy Generated for NVIDIA CUDA Library by Doxygen .2 CUresult cuTexRefDestroy (CUtexref hTexRef) Deprecated Destroys the texture reference specified by hTexRef. 4. ERROR_INVALID_CONTEXT.Returned texture reference Returns: CUDA_SUCCESS. Once created. 4.37. etc.2.37 Texture Reference Management [DEPRECATED] 253 4.2 4. CUDA_ERROR_NOT_INITIALIZED. filtering. CUDA_ERROR_INVALID_VALUE See also: cuTexRefDestroy CUDA_- 4. Other texture reference functions are used to specify the format and interpretation (addressing.2. • CUresult cuTexRefDestroy (CUtexref hTexRef) Destroys a texture reference.37.37 Texture Reference Management [DEPRECATED] Functions • CUresult cuTexRefCreate (CUtexref ∗pTexRef) Creates a texture reference.1 Detailed Description This section describes the deprecated texture reference management functions of the low-level CUDA driver application programming interface.4. the application must call cuTexRefSetArray() or cuTexRefSetAddress() to associate the reference with allocated memory. Parameters: pTexRef .

CUDA_ERROR_NOT_INITIALIZED. ERROR_INVALID_CONTEXT. CUDA_ERROR_INVALID_VALUE See also: cuTexRefCreate CUDA_- Generated for NVIDIA CUDA Library by Doxygen .254 Returns: Module Documentation CUDA_SUCCESS. CUDA_ERROR_DEINITIALIZED.

4. Flags must be set to 0. or returns CUDA_ERROR_INVALID_VALUE if the surface reference is not bound to any CUDA array. The CUDA_ARRAY3D_SURFACE_LDST flag must have been set for the CUDA array.38.Surface reference handle Returns: CUDA_SUCCESS.38. Parameters: hSurfRef .CUDA array handle Flags . CUDA_ERROR_DEINITIALIZED. 4.2.Surface reference handle hSurfRef . Parameters: phArray .38.38 Surface Reference Management Functions • CUresult cuSurfRefGetArray (CUarray ∗phArray. CUDA_ERROR_INVALID_VALUE See also: cuModuleGetSurfRef. cuSurfRefSetArray CUDA_- 4.set to 0 Generated for NVIDIA CUDA Library by Doxygen .Surface reference handle hArray . CUsurfref hSurfRef) Returns in ∗phArray the CUDA array bound to the surface reference hSurfRef.2.38.1 Function Documentation CUresult cuSurfRefGetArray (CUarray ∗ phArray. CUsurfref hSurfRef) Passes back the CUDA array bound to a surface reference.38 Surface Reference Management 255 4. unsigned int Flags) Sets the CUDA array for a surface reference. CUarray hArray. Any CUDA array previously bound to hSurfRef is unbound. Any previous CUDA array state associated with the surface reference is superseded by this function.2 4. unsigned int Flags) Sets the CUDA array hArray to be read and written by the surface reference hSurfRef.4. CUarray hArray.2 CUresult cuSurfRefSetArray (CUsurfref hSurfRef.1 Detailed Description This section describes the surface reference management functions of the low-level CUDA driver application programming interface. CUDA_ERROR_NOT_INITIALIZED. ERROR_INVALID_CONTEXT. • CUresult cuSurfRefSetArray (CUsurfref hSurfRef.

CUDA_ERROR_INVALID_VALUE See also: cuModuleGetSurfRef.256 Returns: Module Documentation CUDA_SUCCESS. ERROR_INVALID_CONTEXT. cuSurfRefGetArray CUDA_- Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_DEINITIALIZED.

unsigned int flags) Set usage flags for mapping a graphics resource. If an application does so. unsigned int arrayIndex. • CUresult cuGraphicsResourceSetMapFlags (CUgraphicsResource resource. CUstream hStream) Maps the count graphics resources in resources for access by CUDA. CUgraphicsResource ∗resources. The resources in resources may be accessed by CUDA until they are unmapped.39. CUstream hStream) Unmap graphics resources.4.39. • CUresult cuGraphicsResourceGetMappedPointer (CUdeviceptr ∗pDevPtr. • CUresult cuGraphicsSubResourceGetMappedArray (CUarray ∗pArray. size_t ∗pSize. 4. Parameters: count . the results are undefined. • CUresult cuGraphicsUnregisterResource (CUgraphicsResource resource) Unregisters a graphics resource for access by CUDA. • CUresult cuGraphicsUnmapResources (unsigned int count. unsigned int mipLevel) Get an array through which to access a subresource of a mapped graphics resource.39.39 Graphics Interoperability 257 4.39 Graphics Interoperability Functions • CUresult cuGraphicsMapResources (unsigned int count. CUgraphicsResource ∗resources.1 Detailed Description This section describes the graphics interoperability functions of the low-level CUDA driver application programming interface.Number of resources to map Generated for NVIDIA CUDA Library by Doxygen .2. CUstream hStream) Map graphics resources for access by CUDA. If resources includes any duplicate entries then CUDA_ERROR_INVALID_HANDLE is returned. CUgraphicsResource ∗ resources. CUgraphicsResource resource. CUgraphicsResource resource) Get a device pointer through which to access a mapped graphics resource.1 Function Documentation CUresult cuGraphicsMapResources (unsigned int count. This function provides the synchronization guarantee that any graphics calls issued before cuGraphicsMapResources() will complete before any subsequent CUDA work issued in stream begins.2 4. 4. The graphics API from which resources were registered should not access any resources while they are mapped by CUDA. If any of resources are presently mapped for access by CUDA then CUDA_ERROR_ALREADY_MAPPED is returned.

CUDA_ERROR_INVALID_HANDLE. unsigned int flags) Set flags for mapping the graphics resource resource. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_DEINITIALIZED. cuGraphicsSubResourceGetMappedArray 4. CUDA_ERROR_INVALID_CONTEXT.2.2.39. CUDA_ERROR_INVALID_VALUE.Resources to map for CUDA usage hStream . CUDA_ERROR_INVALID_HANDLE. CUDA_ERROR_NOT_MAPPED CUDA_ERROR_NOT_MAPPED_AS_POINTER Note: Note that this function may also return error codes from previous. If resource is not mapped then CUDA_ERROR_NOT_MAPPED is returned. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. Returns in pSize the size of the memory in bytes which may be accessed from that pointer. asynchronous launches. See also: cuGraphicsResourceGetMappedPointer cuGraphicsSubResourceGetMappedArray cuGraphicsUnmapResources 4. If resource is not a buffer then it cannot be accessed via a pointer and CUDA_ERROR_NOT_MAPPED_AS_POINTER is returned. See also: cuGraphicsMapResources. The flags argument may be any of the following: Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_DEINITIALIZED. CUDA_ERROR_ALREADY_MAPPED. The value set in pPointer may change every time that resource is mapped.39. ∗ Parameters: pDevPtr . Changes to flags will take effect the next time resource is mapped. asynchronous launches.Stream with which to synchronize Returns: Module Documentation CUDA_SUCCESS.Mapped resource to access Returns: CUDA_SUCCESS. CUDA_ERROR_NOT_INITIALIZED. CUgraphicsResource resource) Returns in ∗pDevPtr a pointer through which the mapped graphics resource resource may be accessed.258 resources .Returned pointer through which resource may be accessed pSize .Returned size of the buffer accessible starting at ∗pPointer resource .2 CUresult cuGraphicsResourceGetMappedPointer (CUdeviceptr ∗ pDevPtr. CUDA_ERROR_NOT_INITIALIZED. size_t ∗ pSize.3 CUresult cuGraphicsResourceSetMapFlags (CUgraphicsResource resource.

Array index for array textures or cubemap face index as defined by CUarray_cubemap_face for cubemap textures for the subresource to access mipLevel . unsigned int arrayIndex. If resource is not mapped then CUDA_ERROR_NOT_MAPPED is returned. • CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITEDISCARD: Specifies that CUDA kernels which access this resource will not read from this resource and will write over the entire contents of the resource.2. If resource is not a texture then it cannot be accessed via an array and CUDA_ERROR_NOT_MAPPED_AS_ARRAY is returned. It is therefore assumed that this resource will be read from and written to by CUDA kernels. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_NOT_INITIALIZED. • CU_GRAPHICS_MAP_RESOURCE_FLAGS_READONLY: Specifies that CUDA kernels which access this resource will not write to this resource. asynchronous launches. CUDA_ERROR_ALREADY_MAPPED Note: Note that this function may also return error codes from previous. If arrayIndex is not a valid array index for resource then CUDA_ERROR_INVALID_VALUE is returned.39.Returned array through which a subresource of resource may be accessed resource .4 CUresult cuGraphicsSubResourceGetMappedArray (CUarray ∗ pArray. so none of the data previously stored in the resource will be preserved. If resource is presently mapped for access by CUDA then CUDA_ERROR_ALREADY_MAPPED is returned.Parameters for resource mapping Returns: CUDA_SUCCESS.39 Graphics Interoperability 259 • CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE: Specifies no hints about how this resource will be used.Mipmap level for the subresource to access Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_INVALID_VALUE. Parameters: pArray . This is the default value. CUgraphicsResource resource. unsigned int mipLevel) Returns in ∗pArray an array through which the subresource of the mapped graphics resource resource which corresponds to array index arrayIndex and mipmap level mipLevel may be accessed. See also: cuGraphicsMapResources 4. Parameters: resource . CUDA_ERROR_INVALID_HANDLE.Mapped resource to access arrayIndex . CUDA_ERROR_DEINITIALIZED. The value set in ∗pArray may change every time that resource is mapped.Registered resource to set flags for flags .4. If mipLevel is not a valid mipmap level for resource then CUDA_ERROR_INVALID_VALUE is returned. If flags is not one of the above values then CUDA_ERROR_INVALID_VALUE is returned.

CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. If any of resources are not presently mapped for access by CUDA then CUDA_ERROR_NOT_MAPPED is returned.Resource to unregister Generated for NVIDIA CUDA Library by Doxygen .Resources to unmap hStream . CUDA_ERROR_INVALID_HANDLE.5 CUresult cuGraphicsUnmapResources (unsigned int count. CUDA_ERROR_INVALID_VALUE.260 Returns: Module Documentation CUDA_SUCCESS. See also: cuGraphicsResourceGetMappedPointer 4. CUDA_ERROR_DEINITIALIZED. asynchronous launches. CUgraphicsResource ∗ resources. See also: cuGraphicsMapResources 4. CUDA_ERROR_NOT_INITIALIZED.39. This function provides the synchronization guarantee that any CUDA work issued in stream before cuGraphicsUnmapResources() will complete before any subsequently issued graphics work begins. If resource is invalid then CUDA_ERROR_INVALID_HANDLE is returned.39. CUDA_ERROR_DEINITIALIZED. the resources in resources may not be accessed by CUDA until they are mapped again. Parameters: count . Once unmapped. CUDA_ERROR_INVALID_HANDLE.Stream with which to synchronize Returns: CUDA_SUCCESS. Parameters: resource . CUDA_ERROR_NOT_MAPPED CUDA_ERROR_NOT_MAPPED_AS_ARRAY Note: Note that this function may also return error codes from previous. If resources includes any duplicate entries then CUDA_ERROR_INVALID_HANDLE is returned. CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_NOT_MAPPED. CUstream hStream) Unmaps the count graphics resources in resources. asynchronous launches.2.2.Number of resources to unmap resources .6 CUresult cuGraphicsUnregisterResource (CUgraphicsResource resource) Unregisters the graphics resource resource so it is not accessible by CUDA unless registered again.

CUDA_ERROR_INVALID_CONTEXT. asynchronous launches.39 Graphics Interoperability Returns: 261 CUDA_SUCCESS. cuGraphicsGLRegisterImage Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_INVALID_HANDLE. cuGraphicsD3D11RegisterResource. CUDA_ERROR_DEINITIALIZED.4. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. See also: cuGraphicsD3D9RegisterResource. cuGraphicsGLRegisterBuffer. cuGraphicsD3D10RegisterResource.

CUDA_ERROR_OUT_OF_MEMORY Note: Note that this function may also return error codes from previous. 4. • CUresult cuGraphicsGLRegisterImage (CUgraphicsResource ∗pCudaResource.1 Function Documentation CUresult cuGLCtxCreate (CUcontext ∗ pCtx.Device on which to create the context Returns: CUDA_SUCCESS. HGPUNV hGpu) Gets the CUDA device associated with hGpu.262 Module Documentation 4. It may fail if the needed OpenGL driver facilities are not available. For usage of the Flags parameter.40. see cuCtxCreate(). unsigned int Flags) Registers an OpenGL buffer object.Options for CUDA context creation device .2.2 4. GLuint buffer. CUdevice device) Create a CUDA context for interoperability with OpenGL.1 Detailed Description This section describes the OpenGL interoperability functions of the low-level CUDA driver application programming interface. initializes OpenGL interoperability. asynchronous launches.40 OpenGL Interoperability Modules • OpenGL Interoperability [DEPRECATED] Functions • CUresult cuGLCtxCreate (CUcontext ∗pCtx.40. CUDA_ERROR_INVALID_VALUE. GLenum target. Parameters: pCtx . unsigned int Flags) Register an OpenGL texture or renderbuffer object.Returned CUDA context Flags . CUDA_ERROR_INVALID_CONTEXT. and associates the CUDA context with the calling thread. It must be called before performing any other OpenGL interoperability operations. unsigned int Flags.40. unsigned int Flags. • CUresult cuWGLGetDevice (CUdevice ∗pDevice. Generated for NVIDIA CUDA Library by Doxygen . • CUresult cuGraphicsGLRegisterBuffer (CUgraphicsResource ∗pCudaResource. GLuint image. CUdevice device) Creates a new CUDA context. CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_DEINITIALIZED. 4.

CUDA_ERROR_INVALID_HANDLE. cuGLSetBufferObjectMapFlags.40.2. asynchronous launches. cuGraphicsUnregisterResource.2 CUresult cuGraphicsGLRegisterBuffer (CUgraphicsResource ∗ pCudaResource. cuGLRegisterBufferObject. cuGLUnmapBufferObject. GLuint image. cuGLInit. GLuint buffer. • CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY: Specifies that CUDA will not write to this resource. GLenum target. so none of the data previously stored in the resource will be preserved.40 OpenGL Interoperability See also: 263 cuCtxCreate. cuGraphicsResourceGetMappedPointer 4. as follows: • CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE: Specifies no hints about how this resource will be used. It is therefore assumed that this resource will be read from and written to by CUDA.name of buffer object to be registered Flags . unsigned int Flags) Registers the texture or renderbuffer object specified by image for access by CUDA. unsigned int Flags) Registers the buffer object specified by buffer for access by CUDA. cuGLUnregisterBufferObject. cuGLMapBufferObject.40. This is the default value. cuGLUnmapBufferObjectAsync. See also: cuGLCtxCreate. A handle to the registered object is returned as pCudaResource. It is therefore assumed that this resource will be read from and written to by CUDA. The map flags Flags specify the intended usage.Map flags Returns: CUDA_SUCCESS. as follows: • CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE: Specifies no hints about how this resource will be used. CUDA_ERROR_INVALID_CONTEXT. cuGLMapBufferObjectAsync.3 CUresult cuGraphicsGLRegisterImage (CUgraphicsResource ∗ pCudaResource. cuGraphicsMapResources. This is the default value.Pointer to the returned object handle buffer . CUDA_ERROR_ALREADY_MAPPED. cuWGLGetDevice 4. Parameters: pCudaResource . • CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY: Specifies that CUDA will not write to this resource. target must match the type of the object. • CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD: Specifies that CUDA will not read from this resource and will write over the entire contents of the resource.2.4. Note: Note that this function may also return error codes from previous. Generated for NVIDIA CUDA Library by Doxygen . The map flags Flags specify the intended usage. A handle to the registered object is returned as pCudaResource.

CUDA_ERROR_NOT_INITIALIZED.Pointer to the returned object handle image . GL_TEXTURE_3D. sourceGetMappedArray cuGraphicsMapResources.40. cuGLMapBufferObject. The following image classes are currently disallowed: • Textures with borders • Multisampled renderbuffers Parameters: pCudaResource . CUDA_ERROR_ALREADY_MAPPED. CUDA_ERROR_DEINITIALIZED. so none of the data previously stored in the resource will be preserved. See also: cuGLCtxCreate. cuGraphicsSubRe- 4. cuGLUnmapBufferObjectAsync.Identifies the type of object specified by image.4 CUresult cuWGLGetDevice (CUdevice ∗ pDevice. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. as queried via WGL_NV_gpu_affinity() Returns: CUDA_SUCCESS. cuGLUnregisterBufferObject. cuGLInit. cuGraphicsUnregisterResource. or GL_RENDERBUFFER.Map flags Returns: CUDA_SUCCESS. cuGLUnmapBufferObject. and must be one of GL_TEXTURE_2D. asynchronous launches.264 Module Documentation • CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD: Specifies that CUDA will not read from this resource and will write over the entire contents of the resource. ERROR_INVALID_CONTEXT.Device associated with hGpu hGpu . GL_TEXTURE_2D_ARRAY. cuGLSetBufferObjectMapFlags CUDA_- Generated for NVIDIA CUDA Library by Doxygen .Handle to a GPU. Note: Note that this function may also return error codes from previous. cuGLRegisterBufferObject. CUDA_ERROR_INVALID_HANDLE. asynchronous launches.2. CUDA_ERROR_INVALID_CONTEXT. Flags . Parameters: pDevice . See also: cuGLCtxCreate.name of texture or renderbuffer object to be registered target . if applicable. GL_TEXTURE_RECTANGLE. HGPUNV hGpu) Returns in ∗pDevice the CUDA device associated with a hGpu. GL_TEXTURE_CUBE_MAP.

GLuint buffer) Maps an OpenGL buffer object.41 OpenGL Interoperability [DEPRECATED] Typedefs • typedef enum CUGLmap_flags_enum CUGLmap_flags Enumerations • enum CUGLmap_flags_enum Functions • CUresult cuGLInit (void) Initializes OpenGL interoperability. • CUresult cuGLUnmapBufferObject (GLuint buffer) Unmaps an OpenGL buffer object.2. 4. • CUresult cuGLUnmapBufferObjectAsync (GLuint buffer.41. • CUresult cuGLMapBufferObject (CUdeviceptr ∗dptr. CUstream hStream) Maps an OpenGL buffer object.2 4.1 Typedef Documentation typedef enum CUGLmap_flags_enum CUGLmap_flags Flags to map or unmap a resource Generated for NVIDIA CUDA Library by Doxygen .41. size_t ∗size. size_t ∗size. GLuint buffer.41. unsigned int Flags) Set the map flags for an OpenGL buffer object.41 OpenGL Interoperability [DEPRECATED] 265 4. • CUresult cuGLRegisterBufferObject (GLuint buffer) Registers an OpenGL buffer object. • CUresult cuGLSetBufferObjectMapFlags (GLuint buffer. • CUresult cuGLUnregisterBufferObject (GLuint buffer) Unregister an OpenGL buffer object. CUstream hStream) Unmaps an OpenGL buffer object. • CUresult cuGLMapBufferObjectAsync (CUdeviceptr ∗dptr.4.1 Detailed Description This section describes deprecated OpenGL interoperability functionality. 4.

CUDA_ERROR_INVALID_CONTEXT.0.2 CUresult cuGLMapBufferObject (CUdeviceptr ∗ dptr.3 4.3. cuGLSetBufferObjectMapFlags. size_t ∗ size. ERROR_INVALID_CONTEXT. CUDA_ERROR_INVALID_VALUE.4.4.0.1 Enumeration Type Documentation enum CUGLmap_flags_enum Flags to map or unmap a resource 4. or a member of the same shareGroup. cuGLRegisterBufferObject.1 Function Documentation CUresult cuGLInit (void) Deprecated This function is deprecated as of Cuda 3.41. See also: cuGLCtxCreate. This must be the same context. Maps the buffer object specified by buffer into the address space of the current CUDA context and returns in ∗dptr and ∗size the base pointer and size of the resulting mapping.4 4.The name of the buffer object to map Returns: CUDA_SUCCESS. CUDA_ERROR_NOT_INITIALIZED. cuGLUnmapBufferObject.41. There must be a valid OpenGL context bound to the current thread when this function is called. cuGLUnregisterBufferObject. CUDA_ERROR_MAP_FAILED Generated for NVIDIA CUDA Library by Doxygen . cuWGLGetDevice CUDA_- 4. Returns: CUDA_SUCCESS. as the context that was bound when the buffer was registered. This function is deprecated and calling it is no longer required.Returned size of mapping buffer . CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. CUDA_ERROR_NOT_INITIALIZED.Returned mapped base pointer size .41. CUDA_ERROR_DEINITIALIZED.41. Initializes OpenGL interoperability.41. Parameters: dptr . cuGLMapBufferObjectAsync. cuGLUnmapBufferObjectAsync. GLuint buffer) Deprecated This function is deprecated as of Cuda 3. CUDA_ERROR_DEINITIALIZED. asynchronous launches. cuGLMapBufferObject. It may fail if the needed OpenGL driver facilities are not available.266 Module Documentation 4. All streams in the current CUDA context are synchronized with the current GL context.

4 CUresult cuGLRegisterBufferObject (GLuint buffer) Deprecated This function is deprecated as of Cuda 3. See also: cuGraphicsMapResources 4. There must be a valid OpenGL context bound to the current thread when this function is called.Returned mapped base pointer size . asynchronous launches. as the context that was bound when the buffer was registered.4. This function must be called before CUDA can map the buffer object. Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_INVALID_CONTEXT. and the buffer name is resolved by that context.The name of the buffer object to register.Returned size of mapping buffer .The name of the buffer object to map hStream .0. CUDA_ERROR_DEINITIALIZED.4. size_t ∗ size.0.3 CUresult cuGLMapBufferObjectAsync (CUdeviceptr ∗ dptr. Parameters: buffer . CUstream hStream) Deprecated This function is deprecated as of Cuda 3. This must be the same context. asynchronous launches. CUDA_ERROR_MAP_FAILED Note: Note that this function may also return error codes from previous.4.41. CUDA_ERROR_INVALID_VALUE. GLuint buffer.Stream to synchronize Returns: CUDA_SUCCESS. There must be a valid OpenGL context bound to the current thread when this function is called.41. See also: cuGraphicsMapResources 267 4. CUDA_ERROR_NOT_INITIALIZED. or a member of the same shareGroup. Maps the buffer object specified by buffer into the address space of the current CUDA context and returns in ∗dptr and ∗size the base pointer and size of the resulting mapping.41 OpenGL Interoperability [DEPRECATED] Note: Note that this function may also return error codes from previous. Stream hStream in the current CUDA context is synchronized with the current GL context. Parameters: dptr . Registers the buffer object specified by buffer for access by CUDA.

The Flags argument may be any of the following: • CU_GL_MAP_RESOURCE_FLAGS_NONE: Specifies no hints about how this resource will be used. asynchronous launches. CUDA_ERROR_NOT_INITIALIZED. Sets the map flags for the buffer object specified by buffer. as the context that was bound when the buffer was registered. This is the default value. CUDA_ERROR_ALREADY_MAPPED Note: Note that this function may also return error codes from previous.Map flags Returns: CUDA_SUCCESS. CUDA_ERROR_DEINITIALIZED. Changes to Flags will take effect the next time buffer is mapped. CUDA_ERROR_NOT_INITIALIZED. Parameters: buffer . so none of the data previously stored in the resource will be preserved. See also: cuGraphicsResourceSetMapFlags Generated for NVIDIA CUDA Library by Doxygen . Note: Note that this function may also return error codes from previous. ERROR_INVALID_CONTEXT. CUDA_ERROR_INVALID_CONTEXT. asynchronous launches. See also: cuGraphicsGLRegisterBuffer CUDA_- 4. CUDA_ERROR_ALREADY_MAPPED.4. unsigned int Flags) Deprecated This function is deprecated as of Cuda 3. This must be the same context. CUDA_ERROR_INVALID_HANDLE.0. then CUDA_ERROR_ALREADY_MAPPED is returned. There must be a valid OpenGL context bound to the current thread when this function is called. • CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY: Specifies that CUDA kernels which access this resource will not write to this resource.41.268 Returns: Module Documentation CUDA_SUCCESS. or a member of the same shareGroup. • CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD: Specifies that CUDA kernels which access this resource will not read from this resource and will write over the entire contents of the resource. If buffer has not been registered for use with CUDA.5 CUresult cuGLSetBufferObjectMapFlags (GLuint buffer. If buffer is presently mapped for access by CUDA. then CUDA_ERROR_INVALID_HANDLE is returned.Buffer object to unmap Flags . It is therefore assumed that this resource will be read from and written to by CUDA kernels.

CUDA_ERROR_NOT_INITIALIZED. ERROR_INVALID_CONTEXT.6 CUresult cuGLUnmapBufferObject (GLuint buffer) 269 Deprecated This function is deprecated as of Cuda 3. or a member of the same shareGroup. Parameters: buffer .4.41. There must be a valid OpenGL context bound to the current thread when this function is called.0.4. Parameters: buffer .4. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. as the context that was bound when the buffer was registered. All streams in the current CUDA context are synchronized with the current GL context. asynchronous launches. This must be the same context. asynchronous launches. or a member of the same shareGroup. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. There must be a valid OpenGL context bound to the current thread when this function is called.Stream to synchronize Returns: CUDA_SUCCESS.7 CUresult cuGLUnmapBufferObjectAsync (GLuint buffer. as the context that was bound when the buffer was registered. This must be the same context. Unmaps the buffer object specified by buffer for access by CUDA. CUDA_ERROR_DEINITIALIZED.Name of the buffer object to unmap hStream . See also: cuGraphicsUnmapResources CUDA_- 4.0. Unmaps the buffer object specified by buffer for access by CUDA. CUDA_ERROR_DEINITIALIZED.41 OpenGL Interoperability [DEPRECATED] 4. CUstream hStream) Deprecated This function is deprecated as of Cuda 3.Buffer object to unmap Returns: CUDA_SUCCESS.41. Stream hStream in the current CUDA context is synchronized with the current GL context. CUDA_ERROR_NOT_INITIALIZED. ERROR_INVALID_CONTEXT. See also: cuGraphicsUnmapResources CUDA_- Generated for NVIDIA CUDA Library by Doxygen .

This must be the same context. Unregisters the buffer object specified by buffer.Name of the buffer object to unregister Returns: CUDA_SUCCESS. This releases any resources associated with the registered buffer. asynchronous launches. See also: cuGraphicsUnregisterResource CUDA_- Generated for NVIDIA CUDA Library by Doxygen .0. After this call. as the context that was bound when the buffer was registered. CUDA_ERROR_DEINITIALIZED. There must be a valid OpenGL context bound to the current thread when this function is called.41.4. or a member of the same shareGroup. CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous. ERROR_INVALID_CONTEXT. Parameters: buffer . the buffer may no longer be mapped for access by CUDA.8 CUresult cuGLUnregisterBufferObject (GLuint buffer) Module Documentation Deprecated This function is deprecated as of Cuda 3.270 4.

4. CU_D3D9_DEVICE_LIST_CURRENT_FRAME = 0x02.42 Direct3D 9 Interoperability Modules • Direct3D 9 Interoperability [DEPRECATED] Typedefs • typedef enum CUd3d9DeviceList_enum CUd3d9DeviceList Enumerations • enum CUd3d9DeviceList_enum { CU_D3D9_DEVICE_LIST_ALL = 0x01. IDirect3DDevice9 ∗pD3D9Device. CUdevice cudaDevice) Create a CUDA context for interoperability with Direct3D 9.42. CUdevice ∗pCudaDevice. IDirect3DResource9 ∗pD3DResource. • CUresult cuD3D9GetDevice (CUdevice ∗pCudaDevice. • CUresult cuD3D9GetDevices (unsigned int ∗pCudaDeviceCount. • CUresult cuGraphicsD3D9RegisterResource (CUgraphicsResource ∗pCudaResource. const char ∗pszAdapterName) Gets the CUDA device corresponding to a display adapter. unsigned int cudaDeviceCount. unsigned int Flags) Register a Direct3D 9 resource for access by CUDA. • CUresult cuD3D9CtxCreateOnDevice (CUcontext ∗pCtx. CUd3d9DeviceList deviceList) Gets the CUDA devices corresponding to a Direct3D 9 device. unsigned int Flags. CU_D3D9_DEVICE_LIST_NEXT_FRAME = 0x03 } Functions • CUresult cuD3D9CtxCreate (CUcontext ∗pCtx.1 Detailed Description This section describes the Direct3D 9 interoperability functions of the low-level CUDA driver application programming interface. CUdevice ∗pCudaDevices. unsigned int flags. IDirect3DDevice9 ∗pD3DDevice. Generated for NVIDIA CUDA Library by Doxygen .42 Direct3D 9 Interoperability 271 4. • CUresult cuD3D9GetDirect3DDevice (IDirect3DDevice9 ∗∗ppD3DDevice) Get the Direct3D 9 device against which the current CUDA context was created. IDirect3DDevice9 ∗pD3DDevice) Create a CUDA context for interoperability with Direct3D 9.4.

4. CUDA_ERROR_DEINITIALIZED.42.Direct3D device to create interoperability context with Returns: CUDA_SUCCESS. CUdevice ∗ pCudaDevice.42. CUDA_ERROR_OUT_OF_MEMORY. The created CUcontext will be returned in ∗pCtx. This reference count will be decremented upon destruction of this context through cuCtxDestroy().42.2.Context creation flags (see cuCtxCreate() for details) pD3DDevice .1 Typedef Documentation typedef enum CUd3d9DeviceList_enum CUd3d9DeviceList CUDA devices corresponding to a D3D9 device 4. CUDA_ERROR_NOT_INITIALIZED.1 Enumeration Type Documentation enum CUd3d9DeviceList_enum CUDA devices corresponding to a D3D9 device Enumerator: CU_D3D9_DEVICE_LIST_ALL The CUDA devices for all GPUs used by a D3D9 device CU_D3D9_DEVICE_LIST_CURRENT_FRAME The CUDA devices for the GPUs used by a D3D9 device in its currently rendering frame CU_D3D9_DEVICE_LIST_NEXT_FRAME The CUDA devices for the GPUs to be used by a D3D9 device in the next frame 4.4 4. cuGraphicsD3D9RegisterResource Generated for NVIDIA CUDA Library by Doxygen .Returned newly created CUDA context pCudaDevice .42. CUDA_ERROR_INVALID_VALUE. Parameters: pCtx . See also: cuD3D9GetDevice.3.42. IDirect3DDevice9 ∗ pD3DDevice) Creates a new CUDA context.42.272 Module Documentation 4. Direct3D resources from this device may be registered and mapped through the lifetime of this CUDA context. unsigned int Flags. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. and associates the created CUDA context with the calling thread.Returned pointer to the device on which the context was created Flags . enables interoperability for that context with the Direct3D device pD3DDevice.1 Function Documentation CUresult cuD3D9CtxCreate (CUcontext ∗ pCtx. On success.2 4.3 4. If pCudaDevice is non-NULL then the CUdevice on which this CUDA context was created will be returned in ∗pCudaDevice. asynchronous launches. this call will increase the internal reference count on pD3DDevice. This context will cease to function if pD3DDevice is destroyed or encounters an error.

42. unsigned int flags. CUDA_ERROR_OUT_OF_MEMORY. Parameters: pCudaDevice . asynchronous launches. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous.4. If no device on the adapter with name pszAdapterName is CUDA-compatible.3 CUresult cuD3D9GetDevice (CUdevice ∗ pCudaDevice. The created CUcontext will be returned in ∗pCtx. CUDA_ERROR_INVALID_VALUE. See also: cuD3D9GetDevices.The CUDA device on which to create the context.4.Returned newly created CUDA context flags . this call will increase the internal reference count on pD3DDevice. This context will cease to function if pD3DDevice is destroyed or encounters an error.Returned CUDA device corresponding to pszAdapterName pszAdapterName .Direct3D device to create interoperability context with cudaDevice . then the call will fail.Context creation flags (see cuCtxCreate() for details) pD3DDevice . cuGraphicsD3D9RegisterResource 4. CUDA_ERROR_NOT_INITIALIZED. ERROR_INVALID_VALUE. CUDA_ERROR_DEINITIALIZED.42.42 Direct3D 9 Interoperability 4. CUdevice cudaDevice) Creates a new CUDA context. Returns: CUDA_SUCCESS. const char ∗ pszAdapterName) Returns in ∗pCudaDevice the CUDA-compatible device corresponding to the adapter name pszAdapterName obtained from EnumDisplayDevices() or IDirect3D9::GetAdapterIdentifier(). enables interoperability for that context with the Direct3D device pD3DDevice. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous.Adapter name to query for device Returns: CUDA_SUCCESS. CUDA_ERROR_NOT_INITIALIZED. Direct3D resources from this device may be registered and mapped through the lifetime of this CUDA context. This device must be among the devices returned when querying CU_D3D9_DEVICES_ALL from cuD3D9GetDevices. This reference count will be decremented upon destruction of this context through cuCtxDestroy(). On success. Parameters: pCtx . asynchronous launches.2 273 CUresult cuD3D9CtxCreateOnDevice (CUcontext ∗ pCtx. IDirect3DDevice9 ∗ pD3DDevice. and associates the created CUDA context with the calling thread. See also: cuD3D9CtxCreate CUDA_- Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_DEINITIALIZED.4.

CUDA_- 4.4. Parameters: pCudaDeviceCount . IDirect3DDevice9 ∗ pD3D9Device. CUdevice ∗ pCudaDevices. ERROR_INVALID_CONTEXT Note: Note that this function may also return error codes from previous. asynchronous launches. See also: cuD3D9CtxCreate CUDA_ERROR_NOT_INITIALIZED.Returned CUDA devices corresponding to pD3D9Device cudaDeviceCount .4. asynchronous launches.The size of the output device array pCudaDevices pD3D9Device .4 Module Documentation CUresult cuD3D9GetDevices (unsigned int ∗ pCudaDeviceCount.274 4. If any of the GPUs being used to render pDevice are not CUDA capable then the call will return CUDA_ERROR_NO_DEVICE. Parameters: ppD3DDevice . CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. CUd3d9DeviceList deviceList) Returns in ∗pCudaDeviceCount the number of CUDA-compatible device corresponding to the Direct3D 9 device pD3D9Device.Returned Direct3D device corresponding to CUDA context Returns: CUDA_SUCCESS. Returns: CUDA_SUCCESS. Also returns in ∗pCudaDevices at most cudaDeviceCount of the the CUDA-compatible devices corresponding to the Direct3D 9 device pD3D9Device. This set may be CU_D3D9_DEVICE_LIST_ALL for all devices.Direct3D 9 device to query for CUDA devices deviceList . CU_D3D9_DEVICE_LIST_CURRENT_FRAME for the devices used to render the current frame (in SLI). CUDA_ERROR_DEINITIALIZED. or CU_D3D9_DEVICE_LIST_NEXT_FRAME for the devices used to render the next frame (in SLI).Returned number of CUDA devices corresponding to pD3D9Device pCudaDevices . See also: cuD3D9GetDevice CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_DEINITIALIZED.42.42.5 CUresult cuD3D9GetDirect3DDevice (IDirect3DDevice9 ∗∗ ppD3DDevice) Returns in ∗ppD3DDevice the Direct3D device against which this CUDA context was created in cuD3D9CtxCreate().The set of devices to return. ERROR_NO_DEVICE. unsigned int cudaDeviceCount. CUDA_- Generated for NVIDIA CUDA Library by Doxygen .

2. This call is potentially high-overhead and should not be called every frame in interactive applications. CUDA_ERROR_DEINITIALIZED. The type of pD3DResource must be one of the following. • IDirect3DVertexBuffer9: may be accessed through a device pointer • IDirect3DIndexBuffer9: may be accessed through a device pointer • IDirect3DSurface9: may be accessed through an array. To access individual surfaces associated with a texture. or 4 channels of 8. 16. Parameters: pCudaResource . CUDA_ERROR_INVALID_HANDLE. If Flags is not one of the above specified value then CUDA_ERROR_INVALID_VALUE is returned.6 CUresult cuGraphicsD3D9RegisterResource (CUgraphicsResource ∗ pCudaResource.42 Direct3D 9 Interoperability 4. The following are some limitations. CUDA_ERROR_UNKNOWN Generated for NVIDIA CUDA Library by Doxygen . Only stand-alone objects of type IDirect3DSurface9 may be explicitly shared. CUDA_ERROR_INVALID_VALUE. or 32-bit integer or floating-point data cannot be shared. CUDA_ERROR_NOT_INITIALIZED. In particular.Parameters for resource registration Returns: CUDA_SUCCESS. CUDA_ERROR_INVALID_CONTEXT. The handle returned in pCudaResource may be used to map and unmap this resource until it is unregistered. • Textures which are not of a format which is 1. If pD3DResource cannot be registered then CUDA_ERROR_UNKNOWN is returned. The Flags argument may be used to specify additional parameters at register time.Direct3D resource to register Flags . • Resources allocated as shared may not be registered with CUDA. If Direct3D interoperability is not initialized for this context using cuD3D9CtxCreate then CUDA_ERROR_INVALID_CONTEXT is returned.42. If pD3DResource is of incorrect type or is already registered then CUDA_ERROR_INVALID_HANDLE is returned. • The primary rendertarget may not be registered with CUDA. one must register the base texture object. On success this call will increase the internal reference count on pD3DResource. This reference count will be decremented when this resource is unregistered through cuGraphicsUnregisterResource().Returned graphics resource handle pD3DResource .4. IDirect3DResource9 ∗ pD3DResource. • Surfaces of depth or stencil formats cannot be shared. individual mipmap levels and faces of cube maps may not be registered directly. unsigned int Flags) 275 Registers the Direct3D 9 resource pD3DResource for access by CUDA and returns a CUDA handle to pD3Dresource in pCudaResource. CUDA_ERROR_OUT_OF_MEMORY.4. • IDirect3DBaseTexture9: individual surfaces on this texture may be accessed through an array. The only valid value for this parameter is • CU_GRAPHICS_REGISTER_FLAGS_NONE Not all Direct3D resources of the above types may be used for interoperability with CUDA.

See also: cuD3D9CtxCreate. cuGraphicsMapResources. sourceGetMappedArray. cuGraphicsUnregisterResource.276 Note: Module Documentation Note that this function may also return error codes from previous. asynchronous launches. cuGraphicsResourceGetMappedPointer cuGraphicsSubRe- Generated for NVIDIA CUDA Library by Doxygen .

unsigned int Face. Generated for NVIDIA CUDA Library by Doxygen . unsigned int Level) Get the size of a subresource of a Direct3D resource which has been mapped for access by CUDA. IDirect3DResource9 ∗pResource. unsigned int Face.4. IDirect3DResource9 ∗∗ppResource) Map Direct3D resources for access by CUDA. • CUresult cuD3D9ResourceSetMapFlags (IDirect3DResource9 ∗pResource.43 Direct3D 9 Interoperability [DEPRECATED] 277 4. unsigned int Level) Get an array through which to access a subresource of a Direct3D resource which has been mapped for access by CUDA. • CUresult cuD3D9ResourceGetSurfaceDimensions (size_t ∗pWidth. unsigned int Level) Get the pitch of a subresource of a Direct3D resource which has been mapped for access by CUDA. IDirect3DResource9 ∗∗ppResource) Unmaps Direct3D resources. • CUresult cuD3D9UnregisterResource (IDirect3DResource9 ∗pResource) Unregister a Direct3D resource. size_t ∗pDepth. unsigned int Face. • CUresult cuD3D9ResourceGetMappedPointer (CUdeviceptr ∗pDevPtr. IDirect3DResource9 ∗pResource. • CUresult cuD3D9ResourceGetMappedSize (size_t ∗pSize. • CUresult cuD3D9RegisterResource (IDirect3DResource9 ∗pResource. size_t ∗pHeight. unsigned int Flags) Set usage flags for mapping a Direct3D resource. unsigned int Face. • CUresult cuD3D9ResourceGetMappedArray (CUarray ∗pArray. unsigned int Level) Get the dimensions of a registered surface. size_t ∗pPitchSlice. IDirect3DResource9 ∗pResource. IDirect3DResource9 ∗pResource. • CUresult cuD3D9ResourceGetMappedPitch (size_t ∗pPitch. IDirect3DResource9 ∗pResource. unsigned int Level) Get the pointer through which to access a subresource of a Direct3D resource which has been mapped for access by CUDA. • CUresult cuD3D9UnmapResources (unsigned int count.43 Direct3D 9 Interoperability [DEPRECATED] Typedefs • typedef enum CUd3d9map_flags_enum CUd3d9map_flags • typedef enum CUd3d9register_flags_enum CUd3d9register_flags Enumerations • enum CUd3d9map_flags_enum • enum CUd3d9register_flags_enum Functions • CUresult cuD3D9MapResources (unsigned int count. unsigned int Face. unsigned int Flags) Register a Direct3D resource for access by CUDA.

Maps the count Direct3D resources in ppResource for access by CUDA.3. then CUDA_ERROR_INVALID_HANDLE is returned.43.Resources to map for CUDA usage Generated for NVIDIA CUDA Library by Doxygen .43.4.43.2 enum CUd3d9register_flags_enum Flags to register a resource 4.43.43.2 4.2.2 typedef enum CUd3d9register_flags_enum CUd3d9register_flags Flags to register a resource 4. If any of ppResource are presently mapped for access by CUDA.2. If any of ppResource have not been registered for use with CUDA or if ppResource contains any duplicate entries.4 4.1 Typedef Documentation typedef enum CUd3d9map_flags_enum CUd3d9map_flags Flags to map or unmap a resource 4.1 Function Documentation CUresult cuD3D9MapResources (unsigned int count.1 Enumeration Type Documentation enum CUd3d9map_flags_enum Flags to map or unmap a resource 4. This function provides the synchronization guarantee that any Direct3D calls issued before cuD3D9MapResources() will complete before any CUDA kernels issued after cuD3D9MapResources() begin.43. 4.1 Detailed Description This section describes deprecated Direct3D 9 interoperability functionality. IDirect3DResource9 ∗∗ ppResource) Deprecated This function is deprecated as of Cuda 3. The resources in ppResource may be accessed in CUDA kernels until they are unmapped. Parameters: count .278 Module Documentation 4.43. Direct3D should not access any resources while they are mapped by CUDA. If an application does so the results are undefined.0.3.3 4.Number of resources in ppResource ppResource .43.43. then CUDA_ERROR_ALREADY_MAPPED is returned.

unsigned int Flags) Deprecated This function is deprecated as of Cuda 3. size. all surfaces associated with the all mipmap levels of all faces of the texture will be accessible to CUDA. this call will increase the internal reference count on pResource.0. CUDA_ERROR_INVALID_CONTEXT. This call is potentially high-overhead and should not be called every frame in interactive applications. This option is valid for all resource types. The type of pResource must be one of the following. cuD3D9ResourceGetMappedSize(). see type IDirect3DBaseTexture9. asynchronous launches. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. CUDA_ERROR_DEINITIALIZED. Not all Direct3D resources of the above types may be used for interoperability with CUDA. • IDirect3DSurface9: Only stand-alone objects of type IDirect3DSurface9 may be explicitly shared. See also: cuGraphicsMapResources 4. The following values are allowed. CUDA_ERROR_ALREADY_MAPPED.43 Direct3D 9 Interoperability [DEPRECATED] Returns: 279 CUDA_SUCCESS. This reference count will be decremented when this resource is unregistered through cuD3D9UnregisterResource(). • IDirect3DBaseTexture9: When a texture is registered.4. This option is only valid for resources of type IDirect3DSurface9 and subtypes of IDirect3DBaseTexture9. then the application will be able to map and unmap this resource until it is unregistered through cuD3D9UnregisterResource(). individual mipmap levels and faces of cube maps may not be registered directly. and (for textures).4. If this call is successful. To access individual surfaces associated with a texture. • CU_D3D9_REGISTER_FLAGS_ARRAY: Specifies that CUDA will access this resource through a CUarray queried on a sub-resource basis through cuD3D9ResourceGetMappedArray(). • IDirect3DIndexBuffer9: Cannot be used with Flags set to CU_D3D9_REGISTER_FLAGS_ARRAY.2 CUresult cuD3D9RegisterResource (IDirect3DResource9 ∗ pResource. and cuD3D9ResourceGetMappedPitch() respectively. CUDA_ERROR_INVALID_HANDLE. Also on success. pitch for each subresource of this allocation may be queried through cuD3D9ResourceGetMappedPointer(). Generated for NVIDIA CUDA Library by Doxygen . In particular. Registers the Direct3D resource pResource for access by CUDA. The following are some limitations. • CU_D3D9_REGISTER_FLAGS_NONE: Specifies that CUDA will access this resource through a CUdeviceptr.43. The Flags argument specifies the mechanism through which CUDA will access the Direct3D resource. For restrictions on the Flags parameter. • IDirect3DVertexBuffer9: Cannot be used with Flags set to CU_D3D9_REGISTER_FLAGS_ARRAY. CUDA_ERROR_NOT_INITIALIZED. The pointer. one must register the base texture object.

2.4. If pResource is of incorrect type (e. asynchronous launches. Module Documentation • Any resources allocated in D3DPOOL_SYSTEMMEM or D3DPOOL_MANAGED may not be registered with CUDA. Parameters: pArray . • Resources allocated as shared may not be registered with CUDA.Mapped resource to access Generated for NVIDIA CUDA Library by Doxygen .280 • The primary rendertarget may not be registered with CUDA.Returned array corresponding to subresource pResource . See also: cuGraphicsD3D9RegisterResource 4. For usage requirements of Face and Level parameters. see cuD3D9ResourceGetMappedPointer(). 16. then CUDA_ERROR_INVALID_CONTEXT is returned.g. CUDA_ERROR_INVALID_VALUE. Parameters: pResource . The value set in pArray may change every time that pResource is mapped.Flags for resource registration Returns: CUDA_SUCCESS. If pResource is not registered then CUDA_ERROR_INVALID_HANDLE is returned. • Surfaces of depth or stencil formats cannot be shared. IDirect3DResource9 ∗ pResource.Resource to register for CUDA access Flags . or 32-bit integer or floating-point data cannot be shared. If Direct3D interoperability is not initialized on this context. or 4 channels of 8.0. CUDA_ERROR_INVALID_HANDLE. unsigned int Face. If pResource cannot be registered then CUDA_ERROR_UNKNOWN is returned.43. If pResource is not mapped then CUDA_ERROR_NOT_MAPPED is returned. Returns in ∗pArray an array through which the subresource of the mapped Direct3D resource pResource which corresponds to Face and Level may be accessed.3 CUresult cuD3D9ResourceGetMappedArray (CUarray ∗ pArray. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. unsigned int Level) Deprecated This function is deprecated as of Cuda 3. CUDA_ERROR_DEINITIALIZED. • Textures which are not of a format which is 1. CUDA_ERROR_NOT_INITIALIZED. then CUDA_ERROR_INVALID_HANDLE is returned. CUDA_ERROR_OUT_OF_MEMORY. is a non-stand-alone IDirect3DSurface9) or is already registered. If pResource was not registered with usage flags CU_D3D9_REGISTER_FLAGS_ARRAY then CUDA_ERROR_INVALID_HANDLE is returned. CUDA_ERROR_INVALID_CONTEXT.

CUDA_ERROR_NOT_MAPPED Generated for NVIDIA CUDA Library by Doxygen . size_t ∗ pPitchSlice. If pResource is not of type IDirect3DBaseTexture9 or one of its sub-types or if pResource has not been registered for use with CUDA. asynchronous launches. CUDA_ERROR_INVALID_HANDLE. CUDA_ERROR_INVALID_CONTEXT.0. CUDA_ERROR_DEINITIALIZED. The values set in pPitch and pPitchSlice may change every time that pResource is mapped. z from the base pointer of the surface is: z∗ slicePitch + y ∗ pitch + (bytes per pixel) ∗ x Both parameters pPitch and pPitchSlice are optional and may be set to NULL. Returns in ∗pPitch and ∗pPitchSlice the pitch and Z-slice pitch of the subresource of the mapped Direct3D resource pResource. then CUDA_ERROR_INVALID_HANDLE is returned.Level of resource to access Returns: CUDA_SUCCESS. see cuD3D9ResourceGetMappedPointer(). CUDA_ERROR_NOT_MAPPED Note: Note that this function may also return error codes from previous. unsigned int Level) Deprecated This function is deprecated as of Cuda 3.43 Direct3D 9 Interoperability [DEPRECATED] Face . Parameters: pPitch .43. CUDA_ERROR_INVALID_VALUE. the byte offset of the sample at position x. which corresponds to Face and Level. CUDA_ERROR_NOT_INITIALIZED. IDirect3DResource9 ∗ pResource.Mapped resource to access Face . If pResource was not registered with usage flags CU_D3D9_REGISTER_FLAGS_NONE. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_INVALID_HANDLE.Face of resource to access Level . See also: cuGraphicsSubResourceGetMappedArray 4.4. CUDA_ERROR_NOT_INITIALIZED.4. the byte offset of the sample at position x. The pitch and Z-slice pitch values may be used to compute the location of a sample on a surface as follows.Face of resource to access Level . For a 2D surface.Returned Z-slice pitch of subresource pResource . If pResource is not mapped for access by CUDA then CUDA_ERROR_NOT_MAPPED is returned. then cudaErrorInvalidResourceHandle is returned. y. unsigned int Face. CUDA_ERROR_DEINITIALIZED.Level of resource to access Returns: 281 CUDA_SUCCESS. y from the base pointer of the surface is: y ∗ pitch + (bytes per pixel) ∗ x For a 3D surface. CUDA_ERROR_INVALID_VALUE.Returned pitch of subresource pPitchSlice . For usage requirements of Face and Level parameters.4 CUresult cuD3D9ResourceGetMappedPitch (size_t ∗ pPitch.

then Level must correspond to a valid mipmap level.43. then CUDA_ERROR_NOT_MAPPED is returned. CUDA_ERROR_INVALID_HANDLE. unsigned int Level) Deprecated This function is deprecated as of Cuda 3. For all other types Face must be 0. If pResource is of type IDirect3DCubeTexture9. If Level is invalid. CUDA_ERROR_INVALID_CONTEXT. See also: cuGraphicsSubResourceGetMappedArray 4. asynchronous launches.Face of resource to access Level . then Face must one of the values enumerated by type D3DCUBEMAP_FACES. then CUDA_ERROR_INVALID_HANDLE is returned. CUDA_ERROR_DEINITIALIZED. unsigned int Face. IDirect3DResource9 ∗ pResource.6 CUresult cuD3D9ResourceGetMappedSize (size_t ∗ pSize. If pResource is not registered. The value set in pDevPtr may change every time that pResource is mapped.Mapped resource to access Face .5 CUresult cuD3D9ResourceGetMappedPointer (CUdeviceptr ∗ pDevPtr. IDirect3DResource9 ∗ pResource. Returns in ∗pDevPtr the base pointer of the subresource of the mapped Direct3D resource pResource.Returned pointer corresponding to subresource pResource .Level of resource to access Returns: CUDA_SUCCESS. Parameters: pDevPtr . unsigned int Face. asynchronous launches. then CUDA_ERROR_INVALID_VALUE is returned. If pResource was not registered with usage flags CU_D3D9_REGISTER_FLAGS_NONE. If pResource is of type IDirect3DBaseTexture9. For all other types Level must be 0.0. At present only mipmap level 0 is supported. Generated for NVIDIA CUDA Library by Doxygen . then CUDA_ERROR_INVALID_HANDLE is returned. CUDA_ERROR_NOT_MAPPED Note: Note that this function may also return error codes from previous.282 Note: Module Documentation Note that this function may also return error codes from previous. CUDA_ERROR_NOT_INITIALIZED.0. then CUDA_ERROR_INVALID_VALUE is returned. unsigned int Level) Deprecated This function is deprecated as of Cuda 3.4.4.43. If pResource is not mapped. If Face is invalid. See also: cuGraphicsResourceGetMappedPointer 4. which corresponds to Face and Level. CUDA_ERROR_INVALID_VALUE.

CUDA_ERROR_NOT_MAPPED Note: Note that this function may also return error codes from previous.Face of resource to access Level . CUDA_ERROR_INVALID_CONTEXT. and ∗pDepth the dimensions of the subresource of the mapped Direct3D resource pResource.Returned size of subresource pResource . ∗pHeight. For 2D surfaces.Level of resource to access Returns: CUDA_SUCCESS.43. size_t ∗ pDepth. then CUDA_ERROR_INVALID_HANDLE is returned.Returned depth of surface Generated for NVIDIA CUDA Library by Doxygen .Mapped resource to access Face . see cuD3D9ResourceGetMappedPointer(). unsigned int Face. Parameters: pWidth . and pDepth are optional. If pResource was not registered with usage flags CU_D3D9_REGISTER_FLAGS_NONE. Parameters: pSize .43 Direct3D 9 Interoperability [DEPRECATED] 283 Returns in ∗pSize the size of the subresource of the mapped Direct3D resource pResource. CUDA_ERROR_INVALID_VALUE. CUDA_ERROR_INVALID_HANDLE. which corresponds to Face and Level. If pResource is not of type IDirect3DBaseTexture9 or IDirect3DSurface9 or if pResource has not been registered for use with CUDA. then CUDA_ERROR_INVALID_HANDLE is returned.4.Returned height of surface pDepth . The value set in pSize may change every time that pResource is mapped. asynchronous launches. it is possible that the dimensions of a resource will be an integer factor larger than the dimensions reported by the Direct3D runtime. For usage requirements of Face and Level parameters. The parameters pWidth. then CUDA_ERROR_NOT_MAPPED is returned. If pResource is not mapped for access by CUDA. which corresponds to Face and Level.7 CUresult cuD3D9ResourceGetSurfaceDimensions (size_t ∗ pWidth.4.Returned width of surface pHeight . Because anti-aliased surfaces may have multiple samples per pixel. CUDA_ERROR_NOT_INITIALIZED. If pResource has not been registered for use with CUDA.0. the value returned in ∗pDepth will be 0. See also: cuGraphicsResourceGetMappedPointer 4. CUDA_ERROR_DEINITIALIZED. pHeight. see cuD3D9ResourceGetMappedPointer. IDirect3DResource9 ∗ pResource. For usage requirements of Face and Level parameters. size_t ∗ pHeight. Returns in ∗pWidth. then CUDA_ERROR_INVALID_HANDLE is returned. unsigned int Level) Deprecated This function is deprecated as of Cuda 3.

It is therefore assumed that this resource will be read from and written to by CUDA kernels.Parameters for resource mapping Returns: CUDA_SUCCESS.Level of resource to access Returns: Module Documentation CUDA_SUCCESS. Parameters: pResource . Set Flags for mapping the Direct3D resource pResource. Changes to Flags will take effect the next time pResource is mapped. then CUDA_ERROR_INVALID_HANDLE is returned.Face of resource to access Level .284 pResource . CUDA_ERROR_INVALID_VALUE.Registered resource to access Face . CUDA_ERROR_DEINITIALIZED. CUDA_ERROR_INVALID_VALUE. CUDA_ERROR_INVALID_CONTEXT. so none of the data previously stored in the resource will be preserved.4. CUDA_ERROR_DEINITIALIZED. unsigned int Flags) Deprecated This function is deprecated as of Cuda 3. CUDA_ERROR_INVALID_HANDLE Note: Note that this function may also return error codes from previous. CUDA_ERROR_NOT_INITIALIZED. If pResource has not been registered for use with CUDA. • CU_D3D9_MAPRESOURCE_FLAGS_READONLY: Specifies that CUDA kernels which access this resource will not write to this resource. CUDA_ERROR_INVALID_HANDLE.0. asynchronous launches. This is the default value. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_NOT_INITIALIZED. See also: cuGraphicsResourceSetMapFlags Generated for NVIDIA CUDA Library by Doxygen . asynchronous launches. See also: cuGraphicsSubResourceGetMappedArray 4. If pResource is presently mapped for access by CUDA.43.Registered resource to set flags for Flags . • CU_D3D9_MAPRESOURCE_FLAGS_WRITEDISCARD: Specifies that CUDA kernels which access this resource will not read from this resource and will write over the entire contents of the resource. The Flags argument may be any of the following: • CU_D3D9_MAPRESOURCE_FLAGS_NONE: Specifies no hints about how this resource will be used. then CUDA_ERROR_ALREADY_MAPPED is returned.8 CUresult cuD3D9ResourceSetMapFlags (IDirect3DResource9 ∗ pResource. CUDA_ERROR_ALREADY_MAPPED Note: Note that this function may also return error codes from previous.

If pResource is not registered. If any of ppResource are not presently mapped for access by CUDA.43. CUDA_ERROR_INVALID_HANDLE. then CUDA_ERROR_INVALID_HANDLE is returned.9 CUresult cuD3D9UnmapResources (unsigned int count. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. Parameters: pResource . CUDA_ERROR_DEINITIALIZED. CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous.43 Direct3D 9 Interoperability [DEPRECATED] 4.43. CUDA_ERROR_NOT_INITIALIZED.0. asynchronous launches.Resources to unmap for CUDA Returns: CUDA_SUCCESS. IDirect3DResource9 ∗∗ ppResource) 285 Deprecated This function is deprecated as of Cuda 3. CUDA_ERROR_INVALID_HANDLE. Unregisters the Direct3D resource pResource so it is not accessible by CUDA unless registered again.0.4. CUDA_ERROR_DEINITIALIZED.Resource to unregister Returns: CUDA_SUCCESS. Parameters: count . then CUDA_ERROR_INVALID_HANDLE is returned. asynchronous launches.4. See also: cuGraphicsUnregisterResource Generated for NVIDIA CUDA Library by Doxygen .4. This function provides the synchronization guarantee that any CUDA kernels issued before cuD3D9UnmapResources() will complete before any Direct3D calls issued after cuD3D9UnmapResources() begin. Unmaps the count Direct3D resources in ppResource.10 CUresult cuD3D9UnregisterResource (IDirect3DResource9 ∗ pResource) Deprecated This function is deprecated as of Cuda 3. If any of ppResource have not been registered for use with CUDA or if ppResource contains any duplicate entries. See also: cuGraphicsUnmapResources 4. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_NOT_MAPPED.Number of resources to unmap for CUDA ppResource . then CUDA_ERROR_NOT_MAPPED is returned.

CUdevice cudaDevice) Create a CUDA context for interoperability with Direct3D 10.286 Module Documentation 4. CU_D3D10_DEVICE_LIST_NEXT_FRAME = 0x03 } Functions • CUresult cuD3D10CtxCreate (CUcontext ∗pCtx. CU_D3D10_DEVICE_LIST_CURRENT_FRAME = 0x02. IDXGIAdapter ∗pAdapter) Gets the CUDA device corresponding to a display adapter. ID3D10Device ∗pD3DDevice. • CUresult cuD3D10GetDevice (CUdevice ∗pCudaDevice.1 Detailed Description This section describes the Direct3D 10 interoperability functions of the low-level CUDA driver application programming interface. • CUresult cuD3D10GetDirect3DDevice (ID3D10Device ∗∗ppD3DDevice) Get the Direct3D 10 device against which the current CUDA context was created. unsigned int Flags) Register a Direct3D 10 resource for access by CUDA.44 Direct3D 10 Interoperability Modules • Direct3D 10 Interoperability [DEPRECATED] Typedefs • typedef enum CUd3d10DeviceList_enum CUd3d10DeviceList Enumerations • enum CUd3d10DeviceList_enum { CU_D3D10_DEVICE_LIST_ALL = 0x01. unsigned int Flags. ID3D10Resource ∗pD3DResource. unsigned int cudaDeviceCount. • CUresult cuD3D10CtxCreateOnDevice (CUcontext ∗pCtx. CUdevice ∗pCudaDevices. Generated for NVIDIA CUDA Library by Doxygen . • CUresult cuGraphicsD3D10RegisterResource (CUgraphicsResource ∗pCudaResource. ID3D10Device ∗pD3DDevice) Create a CUDA context for interoperability with Direct3D 10. 4. unsigned int flags. ID3D10Device ∗pD3D10Device. CUd3d10DeviceList deviceList) Gets the CUDA devices corresponding to a Direct3D 10 device. • CUresult cuD3D10GetDevices (unsigned int ∗pCudaDeviceCount. CUdevice ∗pCudaDevice.44.

The created CUcontext will be returned in ∗pCtx.3. ID3D10Device ∗ pD3DDevice) Creates a new CUDA context.Context creation flags (see cuCtxCreate() for details) pD3DDevice . CUDA_ERROR_OUT_OF_MEMORY. This context will cease to function if pD3DDevice is destroyed or encounters an error.2. enables interoperability for that context with the Direct3D device pD3DDevice.Returned pointer to the device on which the context was created Flags .Direct3D device to create interoperability context with Returns: CUDA_SUCCESS. cuGraphicsD3D10RegisterResource Generated for NVIDIA CUDA Library by Doxygen . and associates the created CUDA context with the calling thread. CUdevice ∗ pCudaDevice. asynchronous launches.1 Typedef Documentation typedef enum CUd3d10DeviceList_enum CUd3d10DeviceList CUDA devices corresponding to a D3D10 device 4.44.4. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. CUDA_ERROR_DEINITIALIZED.3 4.4.1 Function Documentation CUresult cuD3D10CtxCreate (CUcontext ∗ pCtx. this call will increase the internal reference count on pD3DDevice. CUDA_ERROR_NOT_INITIALIZED.44.44.44 Direct3D 10 Interoperability 287 4.2 4. Parameters: pCtx .44.Returned newly created CUDA context pCudaDevice . unsigned int Flags. This reference count will be decremented upon destruction of this context through cuCtxDestroy(). On success. If pCudaDevice is non-NULL then the CUdevice on which this CUDA context was created will be returned in ∗pCudaDevice.1 Enumeration Type Documentation enum CUd3d10DeviceList_enum CUDA devices corresponding to a D3D10 device Enumerator: CU_D3D10_DEVICE_LIST_ALL The CUDA devices for all GPUs used by a D3D10 device CU_D3D10_DEVICE_LIST_CURRENT_FRAME The CUDA devices for the GPUs used by a D3D10 device in its currently rendering frame CU_D3D10_DEVICE_LIST_NEXT_FRAME The CUDA devices for the GPUs to be used by a D3D10 device in the next frame 4. CUDA_ERROR_INVALID_VALUE. See also: cuD3D10GetDevice. Direct3D resources from this device may be registered and mapped through the lifetime of this CUDA context.44.4 4.44.

CUDA_ERROR_DEINITIALIZED.Returned CUDA device corresponding to pAdapter pAdapter . This reference count will be decremented upon destruction of this context through cuCtxDestroy().Returned newly created CUDA context flags .44. this call will increase the internal reference count on pD3DDevice. This context will cease to function if pD3DDevice is destroyed or encounters an error. See also: cuD3D10GetDevices.Context creation flags (see cuCtxCreate() for details) pD3DDevice . asynchronous launches. The created CUcontext will be returned in ∗pCtx. CUDA_ERROR_INVALID_VALUE. This device must be among the devices returned when querying CU_D3D10_DEVICES_ALL from cuD3D10GetDevices. If no device on pAdapter is CUDA-compatible then the call will fail. On success. CUDA_ERROR_DEINITIALIZED. ERROR_INVALID_VALUE. Direct3D resources from this device may be registered and mapped through the lifetime of this CUDA context. enables interoperability for that context with the Direct3D device pD3DDevice. CUDA_ERROR_OUT_OF_MEMORY. CUdevice cudaDevice) Creates a new CUDA context.3 CUresult cuD3D10GetDevice (CUdevice ∗ pCudaDevice.The CUDA device on which to create the context. cuGraphicsD3D10RegisterResource 4.Adapter to query for CUDA device Returns: CUDA_SUCCESS. Parameters: pCtx . ID3D10Device ∗ pD3DDevice. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous.2 Module Documentation CUresult cuD3D10CtxCreateOnDevice (CUcontext ∗ pCtx. CUDA_ERROR_NOT_INITIALIZED. Returns: CUDA_SUCCESS. asynchronous launches. CUDA_ERROR_NOT_INITIALIZED.4.Direct3D device to create interoperability context with cudaDevice . unsigned int flags. IDXGIAdapter ∗ pAdapter) Returns in ∗pCudaDevice the CUDA-compatible device corresponding to the adapter pAdapter obtained from IDXGIFactory::EnumAdapters.4. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous.288 4. Parameters: pCudaDevice . and associates the created CUDA context with the calling thread. See also: cuD3D10CtxCreate CUDA_- Generated for NVIDIA CUDA Library by Doxygen .44.

44. CUDA_- 4. Also returns in ∗pCudaDevices at most cudaDeviceCount of the the CUDA-compatible devices corresponding to the Direct3D 10 device pD3D10Device. asynchronous launches. Parameters: ppD3DDevice .Returned Direct3D device corresponding to CUDA context Returns: CUDA_SUCCESS. ERROR_INVALID_CONTEXT Note: Note that this function may also return error codes from previous.44 Direct3D 10 Interoperability 4. CUDA_- Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_DEINITIALIZED. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. CUDA_ERROR_DEINITIALIZED. If any of the GPUs being used to render pDevice are not CUDA capable then the call will return CUDA_ERROR_NO_DEVICE. See also: cuD3D10GetDevice CUDA_ERROR_NOT_INITIALIZED. asynchronous launches.4. CUd3d10DeviceList deviceList) 289 Returns in ∗pCudaDeviceCount the number of CUDA-compatible device corresponding to the Direct3D 10 device pD3D10Device. or CU_D3D10_DEVICE_LIST_NEXT_FRAME for the devices used to render the next frame (in SLI). See also: cuD3D10CtxCreate CUDA_ERROR_NOT_INITIALIZED. unsigned int cudaDeviceCount.5 CUresult cuD3D10GetDirect3DDevice (ID3D10Device ∗∗ ppD3DDevice) Returns in ∗ppD3DDevice the Direct3D device against which this CUDA context was created in cuD3D10CtxCreate().4. CUdevice ∗ pCudaDevices.44. Parameters: pCudaDeviceCount . Returns: CUDA_SUCCESS. This set may be CU_D3D10_DEVICE_LIST_ALL for all devices. ID3D10Device ∗ pD3D10Device.Returned number of CUDA devices corresponding to pD3D10Device pCudaDevices .Direct3D 10 device to query for CUDA devices deviceList . CU_D3D10_DEVICE_LIST_CURRENT_FRAME for the devices used to render the current frame (in SLI). ERROR_NO_DEVICE.Returned CUDA devices corresponding to pD3D10Device cudaDeviceCount .4 CUresult cuD3D10GetDevices (unsigned int ∗ pCudaDeviceCount.4.The size of the output device array pCudaDevices pD3D10Device .The set of devices to return.

CUDA_ERROR_NOT_INITIALIZED. • Resources allocated as shared may not be registered with CUDA. • ID3D10Buffer: may be accessed through a device pointer. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. CUDA_ERROR_INVALID_HANDLE. The handle returned in pCudaResource may be used to map and unmap this resource until it is unregistered.Parameters for resource registration Returns: CUDA_SUCCESS. • Surfaces of depth or stencil formats cannot be shared. • The primary rendertarget may not be registered with CUDA. • Textures which are not of a format which is 1. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_OUT_OF_MEMORY. If Flags is not one of the above specified value then CUDA_ERROR_INVALID_VALUE is returned. CUDA_ERROR_DEINITIALIZED. unsigned int Flags) Registers the Direct3D 10 resource pD3DResource for access by CUDA and returns a CUDA handle to pD3Dresource in pCudaResource. If pD3DResource is of incorrect type or is already registered then CUDA_ERROR_INVALID_HANDLE is returned.290 4. On success this call will increase the internal reference count on pD3DResource. asynchronous launches. If Direct3D interoperability is not initialized for this context using cuD3D10CtxCreate then CUDA_ERROR_INVALID_CONTEXT is returned.44.6 Module Documentation CUresult cuGraphicsD3D10RegisterResource (CUgraphicsResource ∗ pCudaResource. CUDA_ERROR_INVALID_VALUE. If pD3DResource cannot be registered then CUDA_ERROR_UNKNOWN is returned. Generated for NVIDIA CUDA Library by Doxygen . ID3D10Resource ∗ pD3DResource. or 4 channels of 8. 2. This reference count will be decremented when this resource is unregistered through cuGraphicsUnregisterResource(). The type of pD3DResource must be one of the following. The only valid value for this parameter is • CU_GRAPHICS_REGISTER_FLAGS_NONE Not all Direct3D resources of the above types may be used for interoperability with CUDA.Returned graphics resource handle pD3DResource . The following are some limitations. 16.Direct3D resource to register Flags . This call is potentially high-overhead and should not be called every frame in interactive applications. • ID3D10Texture1D: individual subresources of the texture may be accessed via arrays • ID3D10Texture2D: individual subresources of the texture may be accessed via arrays • ID3D10Texture3D: individual subresources of the texture may be accessed via arrays The Flags argument may be used to specify additional parameters at register time.4. or 32-bit integer or floating-point data cannot be shared. Parameters: pCudaResource .

4. cuGraphicsMapResources.44 Direct3D 10 Interoperability See also: cuD3D10CtxCreate. cuGraphicsResourceGetMappedPointer 291 cuGraphicsSubRe- Generated for NVIDIA CUDA Library by Doxygen . sourceGetMappedArray. cuGraphicsUnregisterResource.

Generated for NVIDIA CUDA Library by Doxygen . • CUresult cuD3D10UnmapResources (unsigned int count. • CUresult cuD3D10ResourceGetMappedSize (size_t ∗pSize. ID3D10Resource ∗pResource. ID3D10Resource ∗∗ppResources) Unmap Direct3D resources. size_t ∗pDepth. unsigned int Flags) Register a Direct3D resource for access by CUDA. unsigned int SubResource) Get a pointer through which to access a subresource of a Direct3D resource which has been mapped for access by CUDA. • CUresult cuD3D10ResourceGetMappedArray (CUarray ∗pArray. • CUresult cuD3D10ResourceGetMappedPointer (CUdeviceptr ∗pDevPtr. unsigned int SubResource) Get the size of a subresource of a Direct3D resource which has been mapped for access by CUDA. • CUresult cuD3D10RegisterResource (ID3D10Resource ∗pResource. • CUresult cuD3D10ResourceSetMapFlags (ID3D10Resource ∗pResource.292 Module Documentation 4. ID3D10Resource ∗∗ppResources) Map Direct3D resources for access by CUDA.45 Direct3D 10 Interoperability [DEPRECATED] Typedefs • typedef enum CUD3D10map_flags_enum CUD3D10map_flags • typedef enum CUD3D10register_flags_enum CUD3D10register_flags Enumerations • enum CUD3D10map_flags_enum • enum CUD3D10register_flags_enum Functions • CUresult cuD3D10MapResources (unsigned int count. • CUresult cuD3D10ResourceGetMappedPitch (size_t ∗pPitch. ID3D10Resource ∗pResource. ID3D10Resource ∗pResource. ID3D10Resource Get the pitch of a subresource of a Direct3D resource which has been mapped for access by CUDA. unsigned int Flags) Set usage flags for mapping a Direct3D resource. • CUresult cuD3D10ResourceGetSurfaceDimensions (size_t ∗pWidth. unsigned int SubResource) Get an array through which to access a subresource of a Direct3D resource which has been mapped for access by CUDA. unsigned int SubResource) Get the dimensions of a registered surface. size_t ∗pHeight. unsigned int SubResource) size_t ∗pPitchSlice. • CUresult cuD3D10UnregisterResource (ID3D10Resource ∗pResource) Unregister a Direct3D resource. ID3D10Resource ∗pResource. ∗pResource.

If any of ppResources have not been registered for use with CUDA or if ppResources contains any duplicate entries. then CUDA_ERROR_INVALID_HANDLE is returned.45.1 Function Documentation CUresult cuD3D10MapResources (unsigned int count. Parameters: count .2.45.4.45.4.2 4.45.1 Detailed Description This section describes deprecated Direct3D 10 interoperability functionality.Number of resources to map for CUDA ppResources .3 4. Direct3D should not access any resources while they are mapped by CUDA. ID3D10Resource ∗∗ ppResources) Deprecated This function is deprecated as of Cuda 3.45.45 Direct3D 10 Interoperability [DEPRECATED] 293 4. If an application does so. the results are undefined.45.45.1 Typedef Documentation typedef enum CUD3D10map_flags_enum CUD3D10map_flags Flags to map or unmap a resource 4. If any of ppResources are presently mapped for access by CUDA.45.1 Enumeration Type Documentation enum CUD3D10map_flags_enum Flags to map or unmap a resource 4. Maps the count Direct3D resources in ppResources for access by CUDA.45.4 4.3. This function provides the synchronization guarantee that any Direct3D calls issued before cuD3D10MapResources() will complete before any CUDA kernels issued after cuD3D10MapResources() begin.Resources to map for CUDA Generated for NVIDIA CUDA Library by Doxygen . The resources in ppResources may be accessed in CUDA kernels until they are unmapped.3. then CUDA_ERROR_ALREADY_MAPPED is returned.0.2 enum CUD3D10register_flags_enum Flags to register a resource 4. 4.2 typedef enum CUD3D10register_flags_enum CUD3D10register_flags Flags to register a resource 4.2.

CUDA_ERROR_ALREADY_MAPPED. • ID3D10Buffer: Cannot be used with Flags set to CU_D3D10_REGISTER_FLAGS_ARRAY. Not all Direct3D resources of the above types may be used for interoperability with CUDA. The type of pResource must be one of the following. CUDA_ERROR_NOT_INITIALIZED. This call is potentially high-overhead and should not be called every frame in interactive applications. • ID3D10Texture1D: No restrictions. pitch for each subresource of this allocation may be queried through cuD3D10ResourceGetMappedPointer(). • ID3D10Texture2D: No restrictions. The following values are allowed. • Resources allocated as shared may not be registered with CUDA. unsigned int Flags) Deprecated This function is deprecated as of Cuda 3. This option is only valid for resources of type ID3D10Texture1D. The following are some limitations. The Flags argument specifies the mechanism through which CUDA will access the Direct3D resource. asynchronous launches. size. CUDA_ERROR_INVALID_HANDLE. this call will increase the internal reference count on pResource. CUDA_ERROR_INVALID_CONTEXT. If this call is successful. and ID3D10Texture3D. then the application will be able to map and unmap this resource until it is unregistered through cuD3D10UnregisterResource().294 Returns: Module Documentation CUDA_SUCCESS. and (for textures).0. This option is valid for all resource types. Registers the Direct3D resource pResource for access by CUDA. Generated for NVIDIA CUDA Library by Doxygen . • CU_D3D10_REGISTER_FLAGS_NONE: Specifies that CUDA will access this resource through a CUdeviceptr. CUDA_ERROR_DEINITIALIZED.2 CUresult cuD3D10RegisterResource (ID3D10Resource ∗ pResource. • The primary rendertarget may not be registered with CUDA. This reference count will be decremented when this resource is unregistered through cuD3D10UnregisterResource(). CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous.45. cuD3D10ResourceGetMappedSize(). ID3D10Texture2D. • CU_D3D10_REGISTER_FLAGS_ARRAY: Specifies that CUDA will access this resource through a CUarray queried on a sub-resource basis through cuD3D10ResourceGetMappedArray(). The pointer. See also: cuGraphicsMapResources 4. and cuD3D10ResourceGetMappedPitch() respectively. • ID3D10Texture3D: No restrictions. Also on success.4.

Resource to register Flags .Parameters for resource registration Returns: CUDA_SUCCESS. CUDA_ERROR_INVALID_HANDLE.4. If pResource is not registered. then CUDA_ERROR_NOT_MAPPED is returned. CUDA_ERROR_INVALID_VALUE.Subresource of pResource to access Returns: CUDA_SUCCESS. then CUDA_ERROR_INVALID_HANDLE is returned. CUDA_ERROR_INVALID_HANDLE.4. Returns in ∗pArray an array through which the subresource of the mapped Direct3D resource pResource. CUDA_ERROR_INVALID_CONTEXT. If pResource cannot be registered. For usage requirements of the SubResource parameter.45 Direct3D 10 Interoperability [DEPRECATED] 295 • Textures which are not of a format which is 1. CUDA_ERROR_NOT_INITIALIZED. If pResource is of incorrect type or is already registered. 2. ID3D10Resource ∗ pResource.3 CUresult cuD3D10ResourceGetMappedArray (CUarray ∗ pArray. asynchronous launches. or 32-bit integer or floating-point data cannot be shared. If pResource was not registered with usage flags CU_D3D10_REGISTER_FLAGS_ARRAY. CUDA_ERROR_OUT_OF_MEMORY. CUDA_ERROR_DEINITIALIZED. then CUDA_ERROR_UNKNOWN is returned. See also: cuGraphicsD3D10RegisterResource 4.45. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. The value set in pArray may change every time that pResource is mapped. which corresponds to SubResource may be accessed. or 4 channels of 8. then CUDA_ERROR_INVALID_HANDLE is returned. • Surfaces of depth or stencil formats cannot be shared. CUDA_ERROR_NOT_INITIALIZED. unsigned int SubResource) Deprecated This function is deprecated as of Cuda 3.Returned array corresponding to subresource pResource .0. see cuD3D10ResourceGetMappedPointer(). CUDA_ERROR_NOT_MAPPED Generated for NVIDIA CUDA Library by Doxygen . 16. CUDA_ERROR_INVALID_VALUE.Mapped resource to access SubResource . Parameters: pResource . If pResource is not mapped. If Direct3D interoperability is not initialized on this context then CUDA_ERROR_INVALID_CONTEXT is returned. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_DEINITIALIZED. then CUDA_ERROR_INVALID_HANDLE is returned. Parameters: pArray .

CUDA_ERROR_INVALID_HANDLE. CUDA_ERROR_INVALID_CONTEXT. asynchronous launches.45. then CUDA_ERROR_INVALID_HANDLE is returned. If pResource is not mapped for access by CUDA. CUDA_ERROR_INVALID_VALUE. CUDA_ERROR_DEINITIALIZED. unsigned int SubResource) Deprecated This function is deprecated as of Cuda 3. Returns in ∗pPitch and ∗pPitchSlice the pitch and Z-slice pitch of the subresource of the mapped Direct3D resource pResource. CUDA_ERROR_NOT_INITIALIZED. See also: cuGraphicsSubResourceGetMappedArray 4.Subresource of pResource to access Returns: CUDA_SUCCESS. Parameters: pPitch . CUDA_ERROR_NOT_MAPPED Note: Note that this function may also return error codes from previous.Mapped resource to access SubResource . then CUDA_ERROR_INVALID_HANDLE is returned. y from the base pointer of the surface is: y ∗ pitch + (bytes per pixel) ∗ x For a 3D surface.296 Note: Module Documentation Note that this function may also return error codes from previous. ID3D10Resource ∗ pResource. z from the base pointer of the surface is: z∗ slicePitch + y ∗ pitch + (bytes per pixel) ∗ x Both parameters pPitch and pPitchSlice are optional and may be set to NULL. see cuD3D10ResourceGetMappedPointer(). See also: cuGraphicsSubResourceGetMappedArray Generated for NVIDIA CUDA Library by Doxygen .4. size_t ∗ pPitchSlice. the byte offset of the sample at position x. which corresponds to SubResource. If pResource was not registered with usage flags CU_D3D10_REGISTER_FLAGS_NONE.4 CUresult cuD3D10ResourceGetMappedPitch (size_t ∗ pPitch. The pitch and Z-slice pitch values may be used to compute the location of a sample on a surface as follows. For a 2D surface. For usage requirements of the SubResource parameter. y. the byte offset of the sample at position x. then CUDA_ERROR_NOT_MAPPED is returned.Returned Z-slice pitch of subresource pResource .0.Returned pitch of subresource pPitchSlice . asynchronous launches. If pResource is not of type IDirect3DBaseTexture10 or one of its sub-types or if pResource has not been registered for use with CUDA. The values set in pPitch and pPitchSlice may change every time that pResource is mapped.

then SubResource must be 0.Returned pointer corresponding to subresource pResource .45 Direct3D 10 Interoperability [DEPRECATED] 4. CUDA_ERROR_INVALID_VALUE. If pResource has not been registered for use with CUDA.4. CUDA_ERROR_INVALID_CONTEXT.45. unsigned int SubResource) 297 Deprecated This function is deprecated as of Cuda 3. If pResource was not registered with usage flags CU_D3D10_REGISTER_FLAGS_NONE. ID3D10Resource ∗ pResource. If pResource is not mapped for access by CUDA.Subresource of pResource to access Returns: CUDA_SUCCESS. Parameters: pDevPtr . unsigned int SubResource) Deprecated This function is deprecated as of Cuda 3. CUDA_ERROR_INVALID_HANDLE. See also: cuGraphicsResourceGetMappedPointer 4. then CUDA_ERROR_INVALID_HANDLE is returned. If pResource was not registered with usage flags CU_D3D10_REGISTER_FLAGS_NONE. The value set in pSize may change every time that pResource is mapped. then the value of SubResource must come from the subresource calculation in D3D10CalcSubResource(). If pResource is not registered.5 CUresult cuD3D10ResourceGetMappedPointer (CUdeviceptr ∗ pDevPtr. Returns in ∗pSize the size of the subresource of the mapped Direct3D resource pResource. see cuD3D10ResourceGetMappedPointer(). then CUDA_ERROR_NOT_MAPPED is returned.0. then CUDA_ERROR_INVALID_HANDLE is returned. CUDA_ERROR_NOT_INITIALIZED. which corresponds to SubResource. CUDA_ERROR_DEINITIALIZED.4. CUDA_ERROR_NOT_MAPPED Note: Note that this function may also return error codes from previous. asynchronous launches. Returns in ∗pDevPtr the base pointer of the subresource of the mapped Direct3D resource pResource.45. If pResource is of type ID3D10Buffer.6 CUresult cuD3D10ResourceGetMappedSize (size_t ∗ pSize. then CUDA_ERROR_INVALID_HANDLE is returned.Returned size of subresource Generated for NVIDIA CUDA Library by Doxygen . ID3D10Resource ∗ pResource. If pResource is not mapped. If pResource is of any other type. then CUDA_ERROR_NOT_MAPPED is returned. The value set in pDevPtr may change every time that pResource is mapped.0. Parameters: pSize . which corresponds to SubResource. For usage requirements of the SubResource parameter.4. then CUDA_ERROR_INVALID_HANDLE is returned.Mapped resource to access SubResource .

see cuD3D10ResourceGetMappedPointer(). then CUDA_ERROR_INVALID_HANDLE is returned. CUDA_ERROR_NOT_INITIALIZED.0.Subresource of pResource to access Returns: Module Documentation CUDA_SUCCESS. Returns in ∗pWidth. ∗pHeight. the value returned in ∗pDepth will be 0. and ∗pDepth the dimensions of the subresource of the mapped Direct3D resource pResource. CUDA_ERROR_INVALID_VALUE. Parameters: pWidth . CUDA_ERROR_DEINITIALIZED. ID3D10Resource ∗ pResource. For 2D surfaces. unsigned int SubResource) Deprecated This function is deprecated as of Cuda 3. size_t ∗ pHeight. See also: cuGraphicsResourceGetMappedPointer 4.Mapped resource to access SubResource . If pResource is not of type IDirect3DBaseTexture10 or IDirect3DSurface10 or if pResource has not been registered for use with CUDA. CUDA_ERROR_INVALID_HANDLE Note: Note that this function may also return error codes from previous.Returned width of surface pHeight . asynchronous launches.Subresource of pResource to access Returns: CUDA_SUCCESS. which corresponds to SubResource. it is possible that the dimensions of a resource will be an integer factor larger than the dimensions reported by the Direct3D runtime.Returned depth of surface pResource . pHeight. Because anti-aliased surfaces may have multiple samples per pixel. The parameters pWidth. CUDA_ERROR_NOT_MAPPED Note: Note that this function may also return error codes from previous. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_NOT_INITIALIZED. and pDepth are optional. CUDA_ERROR_DEINITIALIZED.7 CUresult cuD3D10ResourceGetSurfaceDimensions (size_t ∗ pWidth.4. See also: cuGraphicsSubResourceGetMappedArray Generated for NVIDIA CUDA Library by Doxygen .298 pResource . For usage requirements of the SubResource parameter. size_t ∗ pDepth. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_INVALID_VALUE.Registered resource to access SubResource .45.Returned height of surface pDepth . asynchronous launches. CUDA_ERROR_INVALID_HANDLE.

See also: cuGraphicsResourceSetMapFlags 4.Parameters for resource mapping Returns: CUDA_SUCCESS.4. If pResource has not been registered for use with CUDA.9 CUresult cuD3D10UnmapResources (unsigned int count. CUDA_ERROR_INVALID_CONTEXT.4. • CU_D3D10_MAPRESOURCE_FLAGS_WRITEDISCARD: Specifies that CUDA kernels which access this resource will not read from this resource and will write over the entire contents of the resource. Generated for NVIDIA CUDA Library by Doxygen . If pResource is presently mapped for access by CUDA then CUDA_ERROR_ALREADY_MAPPED is returned. If any of ppResources are not presently mapped for access by CUDA.Registered resource to set flags for Flags .8 CUresult cuD3D10ResourceSetMapFlags (ID3D10Resource ∗ pResource.0. then CUDA_ERROR_NOT_MAPPED is returned. CUDA_ERROR_DEINITIALIZED. It is therefore assumed that this resource will be read from and written to by CUDA kernels.45. Set flags for mapping the Direct3D resource pResource. unsigned int Flags) 299 Deprecated This function is deprecated as of Cuda 3. Changes to flags will take effect the next time pResource is mapped. ID3D10Resource ∗∗ ppResources) Deprecated This function is deprecated as of Cuda 3. then CUDA_ERROR_INVALID_HANDLE is returned. • CU_D3D10_MAPRESOURCE_FLAGS_READONLY: Specifies that CUDA kernels which access this resource will not write to this resource. Unmaps the count Direct3D resources in ppResources. Parameters: pResource . CUDA_ERROR_INVALID_HANDLE.45.0. asynchronous launches.45 Direct3D 10 Interoperability [DEPRECATED] 4. CUDA_ERROR_ALREADY_MAPPED Note: Note that this function may also return error codes from previous. CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_INVALID_VALUE. The Flags argument may be any of the following. This function provides the synchronization guarantee that any CUDA kernels issued before cuD3D10UnmapResources() will complete before any Direct3D calls issued after cuD3D10UnmapResources() begin. • CU_D3D10_MAPRESOURCE_FLAGS_NONE: Specifies no hints about how this resource will be used. This is the default value.4. If any of ppResources have not been registered for use with CUDA or if ppResources contains any duplicate entries. so none of the data previously stored in the resource will be preserved. then CUDA_ERROR_INVALID_HANDLE is returned.

CUDA_ERROR_INVALID_HANDLE. asynchronous launches. CUDA_ERROR_NOT_MAPPED. CUDA_ERROR_DEINITIALIZED.Number of resources to unmap for CUDA ppResources . CUDA_ERROR_NOT_INITIALIZED.300 Parameters: count . asynchronous launches. CUDA_ERROR_INVALID_VALUE. See also: cuGraphicsUnmapResources 4.10 CUresult cuD3D10UnregisterResource (ID3D10Resource ∗ pResource) Deprecated This function is deprecated as of Cuda 3. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous.4. CUDA_ERROR_NOT_INITIALIZED.Resources to unregister Returns: CUDA_SUCCESS. CUDA_ERROR_INVALID_CONTEXT. See also: cuGraphicsUnregisterResource Generated for NVIDIA CUDA Library by Doxygen . Unregisters the Direct3D resource pResource so it is not accessible by CUDA unless registered again. CUDA_ERROR_DEINITIALIZED. Parameters: pResource . then CUDA_ERROR_INVALID_HANDLE is returned.0. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. If pResource is not registered. CUDA_ERROR_INVALID_HANDLE.45.Resources to unmap for CUDA Returns: Module Documentation CUDA_SUCCESS. CUDA_ERROR_INVALID_CONTEXT.

unsigned int Flags. CUdevice ∗pCudaDevice. CUd3d11DeviceList deviceList) Gets the CUDA devices corresponding to a Direct3D 11 device. unsigned int cudaDeviceCount.2 4.1 Typedef Documentation typedef enum CUd3d11DeviceList_enum CUd3d11DeviceList CUDA devices corresponding to a D3D11 device Generated for NVIDIA CUDA Library by Doxygen . CUdevice cudaDevice) Create a CUDA context for interoperability with Direct3D 11. CUdevice ∗pCudaDevices.2.46. • CUresult cuD3D11GetDirect3DDevice (ID3D11Device ∗∗ppD3DDevice) Get the Direct3D 11 device against which the current CUDA context was created. • CUresult cuGraphicsD3D11RegisterResource (CUgraphicsResource ∗pCudaResource. CU_D3D11_DEVICE_LIST_NEXT_FRAME = 0x03 } Functions • CUresult cuD3D11CtxCreate (CUcontext ∗pCtx.4. ID3D11Device ∗pD3DDevice.1 Detailed Description This section describes the Direct3D 11 interoperability functions of the low-level CUDA driver application programming interface.46. ID3D11Device ∗pD3D11Device. • CUresult cuD3D11GetDevice (CUdevice ∗pCudaDevice. IDXGIAdapter ∗pAdapter) Gets the CUDA device corresponding to a display adapter. unsigned int flags. ID3D11Resource ∗pD3DResource. 4. ID3D11Device ∗pD3DDevice) Create a CUDA context for interoperability with Direct3D 11. • CUresult cuD3D11GetDevices (unsigned int ∗pCudaDeviceCount. CU_D3D11_DEVICE_LIST_CURRENT_FRAME = 0x02.46 Direct3D 11 Interoperability Typedefs • typedef enum CUd3d11DeviceList_enum CUd3d11DeviceList Enumerations • enum CUd3d11DeviceList_enum { CU_D3D11_DEVICE_LIST_ALL = 0x01. unsigned int Flags) Register a Direct3D 11 resource for access by CUDA.46.46 Direct3D 11 Interoperability 301 4. 4. • CUresult cuD3D11CtxCreateOnDevice (CUcontext ∗pCtx.

Direct3D resources from this device may be registered and mapped through the lifetime of this CUDA context. ID3D11Device ∗ pD3DDevice) Creates a new CUDA context. and associates the created CUDA context with the calling thread.4.302 Module Documentation 4. cuGraphicsD3D11RegisterResource 4.1 Function Documentation CUresult cuD3D11CtxCreate (CUcontext ∗ pCtx. unsigned int Flags.46. Parameters: pCtx . The created CUcontext will be returned in ∗pCtx. asynchronous launches. CUDA_ERROR_NOT_INITIALIZED.46. CUdevice cudaDevice) Creates a new CUDA context.3 4.46. and associates the created CUDA context with the calling thread. If pCudaDevice is non-NULL then the CUdevice on which this CUDA context was created will be returned in ∗pCudaDevice. enables interoperability for that context with the Direct3D device pD3DDevice. enables interoperability for that context with the Direct3D device pD3DDevice.4.Direct3D device to create interoperability context with Returns: CUDA_SUCCESS. unsigned int flags. This reference count will be decremented upon destruction of this context through cuCtxDestroy(). The created CUcontext will be returned in ∗pCtx.46. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. This context will cease to function if pD3DDevice is destroyed or encounters an error.46. Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_DEINITIALIZED.2 CUresult cuD3D11CtxCreateOnDevice (CUcontext ∗ pCtx. Direct3D resources from this device may be registered and mapped through the lifetime of this CUDA context. ID3D11Device ∗ pD3DDevice. On success. CUdevice ∗ pCudaDevice.4 4. this call will increase the internal reference count on pD3DDevice. CUDA_ERROR_INVALID_VALUE. See also: cuD3D11GetDevice.Returned newly created CUDA context pCudaDevice .3. CUDA_ERROR_OUT_OF_MEMORY.Returned pointer to the device on which the context was created Flags .1 Enumeration Type Documentation enum CUd3d11DeviceList_enum CUDA devices corresponding to a D3D11 device Enumerator: CU_D3D11_DEVICE_LIST_ALL The CUDA devices for all GPUs used by a D3D11 device CU_D3D11_DEVICE_LIST_CURRENT_FRAME The CUDA devices for the GPUs used by a D3D11 device in its currently rendering frame CU_D3D11_DEVICE_LIST_NEXT_FRAME The CUDA devices for the GPUs to be used by a D3D11 device in the next frame 4.Context creation flags (see cuCtxCreate() for details) pD3DDevice .

See also: cuD3D11GetDevices. This reference count will be decremented upon destruction of this context through cuCtxDestroy(). this call will increase the internal reference count on pD3DDevice. Parameters: pCtx .Direct3D device to create interoperability context with cudaDevice . cuGraphicsD3D11RegisterResource 4.46 Direct3D 11 Interoperability 303 On success. If no device on pAdapter is CUDA-compatible the call will return CUDA_ERROR_NO_DEVICE. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. Parameters: pCudaDevice .3 CUresult cuD3D11GetDevice (CUdevice ∗ pCudaDevice. CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous.The CUDA device on which to create the context. ERROR_NO_DEVICE. asynchronous launches. CUDA_ERROR_OUT_OF_MEMORY. This device must be among the devices returned when querying CU_D3D11_DEVICES_ALL from cuD3D11GetDevices.46.Context creation flags (see cuCtxCreate() for details) pD3DDevice . CUDA_ERROR_DEINITIALIZED. Returns: CUDA_SUCCESS.Returned CUDA device corresponding to pAdapter pAdapter .4. This context will cease to function if pD3DDevice is destroyed or encounters an error. IDXGIAdapter ∗ pAdapter) Returns in ∗pCudaDevice the CUDA-compatible device corresponding to the adapter pAdapter obtained from IDXGIFactory::EnumAdapters.4. See also: cuD3D11CtxCreate CUDA_ERROR_NOT_INITIALIZED.Adapter to query for CUDA device Returns: CUDA_SUCCESS. asynchronous launches.Returned newly created CUDA context flags . CUDA_- Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_DEINITIALIZED. CUDA_ERROR_INVALID_VALUE.

Parameters: ppD3DDevice .4. CUDA_ERROR_DEINITIALIZED.4. See also: cuD3D11GetDevice CUDA_ERROR_NOT_INITIALIZED. Returns: CUDA_SUCCESS. ID3D11Device ∗ pD3D11Device. CU_D3D11_DEVICE_LIST_CURRENT_FRAME for the devices used to render the current frame (in SLI). ERROR_INVALID_CONTEXT Note: Note that this function may also return error codes from previous.Returned CUDA devices corresponding to pD3D11Device cudaDeviceCount .Returned number of CUDA devices corresponding to pD3D11Device pCudaDevices .46. This set may be CU_D3D11_DEVICE_LIST_ALL for all devices.The set of devices to return. asynchronous launches.46. asynchronous launches. unsigned int cudaDeviceCount. CUDA_ERROR_DEINITIALIZED. ERROR_NO_DEVICE. CUDA_- 4.The size of the output device array pCudaDevices pD3D11Device . CUDA_- Generated for NVIDIA CUDA Library by Doxygen .Direct3D 11 device to query for CUDA devices deviceList . CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous.Returned Direct3D device corresponding to CUDA context Returns: CUDA_SUCCESS.5 CUresult cuD3D11GetDirect3DDevice (ID3D11Device ∗∗ ppD3DDevice) Returns in ∗ppD3DDevice the Direct3D device against which this CUDA context was created in cuD3D11CtxCreate(). CUd3d11DeviceList deviceList) Returns in ∗pCudaDeviceCount the number of CUDA-compatible device corresponding to the Direct3D 11 device pD3D11Device. Also returns in ∗pCudaDevices at most cudaDeviceCount of the the CUDA-compatible devices corresponding to the Direct3D 11 device pD3D11Device. See also: cuD3D11CtxCreate CUDA_ERROR_NOT_INITIALIZED. Parameters: pCudaDeviceCount . If any of the GPUs being used to render pDevice are not CUDA capable then the call will return CUDA_ERROR_NO_DEVICE.304 4. or CU_D3D11_DEVICE_LIST_NEXT_FRAME for the devices used to render the next frame (in SLI). CUdevice ∗ pCudaDevices.4 Module Documentation CUresult cuD3D11GetDevices (unsigned int ∗ pCudaDeviceCount.

or 4 channels of 8. • Resources allocated as shared may not be registered with CUDA. • Textures which are not of a format which is 1. • Surfaces of depth or stencil formats cannot be shared.6 CUresult cuGraphicsD3D11RegisterResource (CUgraphicsResource ∗ pCudaResource. This reference count will be decremented when this resource is unregistered through cuGraphicsUnregisterResource(). CUDA_ERROR_NOT_INITIALIZED. Generated for NVIDIA CUDA Library by Doxygen . The only valid value for this parameter is • CU_GRAPHICS_REGISTER_FLAGS_NONE Not all Direct3D resources of the above types may be used for interoperability with CUDA. CUDA_ERROR_INVALID_VALUE.46. 16. If pD3DResource cannot be registered then CUDA_ERROR_UNKNOWN is returned. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. ID3D11Resource ∗ pD3DResource. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_INVALID_HANDLE.Parameters for resource registration Returns: CUDA_SUCCESS. asynchronous launches. • ID3D11Buffer: may be accessed through a device pointer. • The primary rendertarget may not be registered with CUDA. If Direct3D interoperability is not initialized for this context using cuD3D11CtxCreate then CUDA_ERROR_INVALID_CONTEXT is returned.4. This call is potentially high-overhead and should not be called every frame in interactive applications.Direct3D resource to register Flags . If pD3DResource is of incorrect type or is already registered then CUDA_ERROR_INVALID_HANDLE is returned. CUDA_ERROR_OUT_OF_MEMORY. The handle returned in pCudaResource may be used to map and unmap this resource until it is unregistered.Returned graphics resource handle pD3DResource .4. If Flags is not one of the above specified value then CUDA_ERROR_INVALID_VALUE is returned. The type of pD3DResource must be one of the following. unsigned int Flags) 305 Registers the Direct3D 11 resource pD3DResource for access by CUDA and returns a CUDA handle to pD3Dresource in pCudaResource. or 32-bit integer or floating-point data cannot be shared. • ID3D11Texture1D: individual subresources of the texture may be accessed via arrays • ID3D11Texture2D: individual subresources of the texture may be accessed via arrays • ID3D11Texture3D: individual subresources of the texture may be accessed via arrays The Flags argument may be used to specify additional parameters at register time. CUDA_ERROR_DEINITIALIZED. 2. The following are some limitations. On success this call will increase the internal reference count on pD3DResource. Parameters: pCudaResource .46 Direct3D 11 Interoperability 4.

cuGraphicsUnregisterResource. cuGraphicsMapResources. cuGraphicsResourceGetMappedPointer cuGraphicsSubRe- Generated for NVIDIA CUDA Library by Doxygen . sourceGetMappedArray.306 See also: Module Documentation cuD3D11CtxCreate.

• CUresult cuVDPAUGetDevice ∗vdpGetProcAddress) (CUdevice ∗pDevice. • CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY: Specifies that CUDA will not write to this resource.47.2 4. CUdevice device. The exact number of valid arrayIndex values depends on the VDPAU surface format. VdpOutputSurface vdpSurface. VdpRGBAFormat VDP_RGBA_FORMAT_B8G8R8A8 VDP_RGBA_FORMAT_R10G10B10A2 Generated for NVIDIA CUDA Library by Doxygen arrayIndex 0 0 Size wxh wxh Format ARGB8 A2BGR10 Content Entire surface Entire surface . • CUresult cuVDPAUCtxCreate (CUcontext ∗pCtx. unsigned int flags) Registers a VDPAU VdpVideoSurface object. unsigned int flags) Registers a VDPAU VdpOutputSurface object. • CUresult cuGraphicsVDPAURegisterVideoSurface (CUgraphicsResource ∗pCudaResource. unsigned int flags. VdpVideoSurface vdpSurface. • CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD: Specifies that CUDA will not read from this resource and will write over the entire contents of the resource.47. This is the default value.2. mipLevel must be 0. VdpDevice vdpDevice. The mapping is shown in the table below. VdpOutputSurface vdpSurface.47. VdpGetProcAddress Gets the CUDA device associated with a VDPAU device.1 Function Documentation CUresult cuGraphicsVDPAURegisterOutputSurface (CUgraphicsResource ∗ pCudaResource. A handle to the registered object is returned as pCudaResource. unsigned int flags) Registers the VdpOutputSurface specified by vdpSurface for access by CUDA.4. The surface’s intended usage is specified using flags. 4. VdpGetProcAddress ∗vdpGetProcAddress) Create a CUDA context for interoperability with VDPAU. It is therefore assumed that this resource will be read from and written to by CUDA. The VdpOutputSurface is presented as an array of subresources that may be accessed using pointers returned by cuGraphicsSubResourceGetMappedArray.47 VDPAU Interoperability 307 4. VdpDevice vdpDevice. so none of the data previously stored in the resource will be preserved. 4.1 Detailed Description This section describes the VDPAU interoperability functions of the low-level CUDA driver application programming interface. as follows: • CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE: Specifies no hints about how this resource will be used.47 VDPAU Interoperability Functions • CUresult cuGraphicsVDPAURegisterOutputSurface (CUgraphicsResource ∗pCudaResource.

Map flags Returns: Module Documentation CUDA_SUCCESS.The VdpOutputSurface to be registered flags . A handle to the registered object is returned as pCudaResource. • CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY: Specifies that CUDA will not write to this resource. cuVDPAUGetDevice 4.2. VdpVideoSurface vdpSurface. The VdpVideoSurface is presented as an array of subresources that may be accessed using pointers returned by cuGraphicsSubResourceGetMappedArray.308 Parameters: pCudaResource . • CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD: Specifies that CUDA will not read from this resource and will write over the entire contents of the resource. The surface’s intended usage is specified using flags. cuGraphicsMapResources. CUDA_ERROR_ALREADY_MAPPED.2 CUresult cuGraphicsVDPAURegisterVideoSurface (CUgraphicsResource ∗ pCudaResource. VdpChromaType VDP_CHROMA_TYPE_420 arrayIndex 0 1 2 3 0 1 2 3 Size w x h/2 w x h/2 w/2 x h/4 w/2 x h/4 w x h/2 w x h/2 w/2 x h/2 w/2 x h/2 Format R8 R8 R8G8 R8G8 R8 R8 R8G8 R8G8 Content Top-field luma Bottom-field luma Top-field chroma Bottom-field chroma Top-field luma Bottom-field luma Top-field chroma Bottom-field chroma VDP_CHROMA_TYPE_422 Parameters: pCudaResource .The VdpVideoSurface to be registered Generated for NVIDIA CUDA Library by Doxygen . cuVDPAUCtxCreate. CUDA_ERROR_INVALID_HANDLE. cuGraphicsSubResourceGetMappedArray.Pointer to the returned object handle vdpSurface . cuGraphicsVDPAURegisterVideoSurface. cuGraphicsResourceSetMapFlags. The mapping is shown in the table below. This is the default value. asynchronous launches. The exact number of valid arrayIndex values depends on the VDPAU surface format. cuGraphicsUnmapResources. unsigned int flags) Registers the VdpVideoSurface specified by vdpSurface for access by CUDA. It is therefore assumed that this resource will be read from and written to by CUDA.47. mipLevel must be 0. CUDA_ERROR_INVALID_CONTEXT. cuGraphicsUnregisterResource.Pointer to the returned object handle vdpSurface . See also: cuCtxCreate. as follows: • CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE: Specifies no hints about how this resource will be used. Note: Note that this function may also return error codes from previous. so none of the data previously stored in the resource will be preserved.

asynchronous launches.Device on which to create the context vdpDevice . See also: cuCtxCreate. Note: Note that this function may also return error codes from previous. Parameters: pCtx . It may fail if the needed VDPAU driver facilities are not available. cuVDPAUGetDevice 4. cuGraphicsResourceSetMapFlags.Options for CUDA context creation device .47. cuVDPAUCtxCreate. VdpGetProcAddress ∗ vdpGetProcAddress) Returns in ∗pDevice the CUDA device associated with a vdpDevice. CUdevice device.VDPAU’s VdpGetProcAddress function pointer Returns: CUDA_SUCCESS. CUDA_ERROR_ALREADY_MAPPED.47. It must be called before performing any other VDPAU interoperability operations. cuGraphicsSubResourceGetMappedArray. CUDA_ERROR_NOT_INITIALIZED.2. cuGraphicsMapResources. cuGraphicsUnmapResources. See also: cuCtxCreate.The VdpDevice to interop with vdpGetProcAddress . cuGraphicsVDPAURegisterOutputSurface. CUDA_ERROR_INVALID_CONTEXT. cuGraphicsMapResources. see cuCtxCreate().4 CUresult cuVDPAUGetDevice (CUdevice ∗ pDevice.4. Generated for NVIDIA CUDA Library by Doxygen . cuGraphicsVDPAURegisterVideoSurface. if applicable. unsigned int flags. and associates the CUDA context with the calling thread. cuGraphicsVDPAURegisterOutputSurface. VdpGetProcAddress ∗ vdpGetProcAddress) Creates a new CUDA context.2. cuGraphicsUnregisterResource.Returned CUDA context flags . asynchronous launches.3 CUresult cuVDPAUCtxCreate (CUcontext ∗ pCtx. For usage of the flags parameter.Map flags Returns: 309 CUDA_SUCCESS. CUDA_ERROR_OUT_OF_MEMORY Note: Note that this function may also return error codes from previous. cuGraphicsUnmapResources. CUDA_ERROR_INVALID_VALUE. VdpDevice vdpDevice. CUDA_ERROR_INVALID_HANDLE. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_DEINITIALIZED. cuGraphicsSubResourceGetMappedArray. VdpDevice vdpDevice. cuGraphicsResourceSetMapFlags.47 VDPAU Interoperability flags . cuVDPAUGetDevice 4. cuGraphicsUnregisterResource. initializes VDPAU interoperability.

CUDA_ERROR_INVALID_VALUE Note: Note that this function may also return error codes from previous.310 Parameters: pDevice .Device associated with vdpDevice vdpDevice . ERROR_INVALID_CONTEXT. cuGraphicsResourceSetMapFlags.VDPAU’s VdpGetProcAddress function pointer Returns: Module Documentation CUDA_SUCCESS.A VdpDevice handle vdpGetProcAddress . cuGraphicsMapResources. CUDA_ERROR_DEINITIALIZED. cuGraphicsVDPAURegisterVideoSurface. asynchronous launches. cuGraphicsVDPAURegisterOutputSurface. CUDA_ERROR_NOT_INITIALIZED. cuGraphicsUnmapResources. cuVDPAUCtxCreate. cuGraphicsSubResourceGetMappedArray Generated for NVIDIA CUDA Library by Doxygen . cuGraphicsUnregisterResource. See also: CUDA_- cuCtxCreate.

4 size_t CUDA_ARRAY3D_DESCRIPTOR_st::Height Height of 3D array .2.Chapter 5 Data Structure Documentation 5.2.2 5.1.1.2.1.1.3 CUarray_format CUDA_ARRAY3D_DESCRIPTOR_st::Format unsigned int CUDA_ARRAY3D_DESCRIPTOR_st::Flags Array format 5.1 Detailed Description 3D array descriptor 5.1.2.2 Flags 5.1 CUDA_ARRAY3D_DESCRIPTOR_st Struct Reference Data Fields • • • • • • size_t Depth unsigned int Flags CUarray_format Format size_t Height unsigned int NumChannels size_t Width 5.1 Field Documentation size_t CUDA_ARRAY3D_DESCRIPTOR_st::Depth Depth of 3D array 5.1.

1.2.1.5 unsigned int CUDA_ARRAY3D_DESCRIPTOR_st::NumChannels Data Structure Documentation Channels per array element 5.6 size_t CUDA_ARRAY3D_DESCRIPTOR_st::Width Width of 3D array Generated for NVIDIA CUDA Library by Doxygen .2.312 5.

2.2.2.2.3 unsigned int CUDA_ARRAY_DESCRIPTOR_st::NumChannels Channels per array element 5.2.2.2 CUDA_ARRAY_DESCRIPTOR_st Struct Reference Data Fields • • • • CUarray_format Format size_t Height unsigned int NumChannels size_t Width 5.2 CUDA_ARRAY_DESCRIPTOR_st Struct Reference 313 5.2.2 size_t CUDA_ARRAY_DESCRIPTOR_st::Height Height of array 5.1 Field Documentation CUarray_format CUDA_ARRAY_DESCRIPTOR_st::Format Array format 5.4 size_t CUDA_ARRAY_DESCRIPTOR_st::Width Width of array Generated for NVIDIA CUDA Library by Doxygen .5.2.1 Detailed Description Array descriptor 5.2.2.2 5.

3.1 Field Documentation CUarray CUDA_MEMCPY2D_st::dstArray Destination array reference 5.2.3 CUDA_MEMCPY2D_st Struct Reference Data Fields • • • • • • • • • • • • • • • • CUarray dstArray CUdeviceptr dstDevice void ∗ dstHost CUmemorytype dstMemoryType size_t dstPitch size_t dstXInBytes size_t dstY size_t Height CUarray srcArray CUdeviceptr srcDevice const void ∗ srcHost CUmemorytype srcMemoryType size_t srcPitch size_t srcXInBytes size_t srcY size_t WidthInBytes 5.1 Detailed Description 2D memory copy parameters 5. array) 5.3 void∗ CUDA_MEMCPY2D_st::dstHost Destination host pointer 5.3.2.2 CUdeviceptr CUDA_MEMCPY2D_st::dstDevice Destination device pointer 5.3.3.3.5 size_t CUDA_MEMCPY2D_st::dstPitch Destination pitch (ignored when dst is array) Generated for NVIDIA CUDA Library by Doxygen .2 5.2.4 CUmemorytype CUDA_MEMCPY2D_st::dstMemoryType Destination memory type (host. device.3.314 Data Structure Documentation 5.3.2.2.

15 Source Y 5.3.3.2.10 CUdeviceptr CUDA_MEMCPY2D_st::srcDevice Source device pointer 5.8 size_t CUDA_MEMCPY2D_st::Height Height of 2D memory copy 5.13 size_t CUDA_MEMCPY2D_st::srcPitch Source pitch (ignored when src is array) 5.5.2.3.2.14 size_t CUDA_MEMCPY2D_st::srcXInBytes Source X in bytes 5.2.3.9 CUarray CUDA_MEMCPY2D_st::srcArray Source array reference 5.6 size_t CUDA_MEMCPY2D_st::dstXInBytes 315 Destination X in bytes 5.3.2.2.3.3.3.7 size_t CUDA_MEMCPY2D_st::dstY Destination Y 5.2.2.2.3.3.11 const void∗ CUDA_MEMCPY2D_st::srcHost Source host pointer 5.16 size_t CUDA_MEMCPY2D_st::WidthInBytes size_t CUDA_MEMCPY2D_st::srcY Width of 2D memory copy in bytes Generated for NVIDIA CUDA Library by Doxygen . device.3. array) 5.2.2.3 CUDA_MEMCPY2D_st Struct Reference 5.12 CUmemorytype CUDA_MEMCPY2D_st::srcMemoryType Source memory type (host.

2.2 5.4 CUDA_MEMCPY3D_st Struct Reference Data Fields • • • • • • • • • • • • • • • • • • • • • • • • • size_t Depth CUarray dstArray CUdeviceptr dstDevice size_t dstHeight void ∗ dstHost size_t dstLOD CUmemorytype dstMemoryType size_t dstPitch size_t dstXInBytes size_t dstY size_t dstZ size_t Height void ∗ reserved0 void ∗ reserved1 CUarray srcArray CUdeviceptr srcDevice size_t srcHeight const void ∗ srcHost size_t srcLOD CUmemorytype srcMemoryType size_t srcPitch size_t srcXInBytes size_t srcY size_t srcZ size_t WidthInBytes 5.1 Field Documentation size_t CUDA_MEMCPY3D_st::Depth Depth of 3D memory copy 5.1 Detailed Description 3D memory copy parameters 5.2 CUarray CUDA_MEMCPY3D_st::dstArray Destination array reference 5.2.4.3 CUdeviceptr CUDA_MEMCPY3D_st::dstDevice Destination device pointer Generated for NVIDIA CUDA Library by Doxygen .4.4.316 Data Structure Documentation 5.4.2.4.

4.5 void∗ CUDA_MEMCPY3D_st::dstHost Destination host pointer 5.2.11 size_t CUDA_MEMCPY3D_st::dstZ Destination Z 5.2.2.4.14 void∗ CUDA_MEMCPY3D_st::reserved1 Must be NULL 5.5.4 CUDA_MEMCPY3D_st Struct Reference 5.2.4.2.4.2. device.4.7 CUmemorytype CUDA_MEMCPY3D_st::dstMemoryType Destination memory type (host.2.4.2.12 size_t CUDA_MEMCPY3D_st::Height Height of 3D memory copy 5.4. may be 0 if Depth==1) 5.4.13 void∗ CUDA_MEMCPY3D_st::reserved0 Must be NULL 5.4 size_t CUDA_MEMCPY3D_st::dstHeight 317 Destination height (ignored when dst is array.2.4.4.4.4. array) 5.2.9 size_t CUDA_MEMCPY3D_st::dstXInBytes Destination X in bytes 5.10 size_t CUDA_MEMCPY3D_st::dstY Destination Y 5.15 CUarray CUDA_MEMCPY3D_st::srcArray Source array reference Generated for NVIDIA CUDA Library by Doxygen .6 size_t CUDA_MEMCPY3D_st::dstLOD Destination LOD 5.8 size_t CUDA_MEMCPY3D_st::dstPitch Destination pitch (ignored when dst is array) 5.2.2.

20 CUmemorytype CUDA_MEMCPY3D_st::srcMemoryType Source memory type (host.4.4.4.17 size_t CUDA_MEMCPY3D_st::srcHeight Source height (ignored when src is array.2.19 size_t CUDA_MEMCPY3D_st::srcLOD Source LOD 5.22 size_t CUDA_MEMCPY3D_st::srcXInBytes Source X in bytes 5.4.4.4.24 Source Z 5.21 size_t CUDA_MEMCPY3D_st::srcPitch Source pitch (ignored when src is array) 5. may be 0 if Depth==1) 5.2.2.2.18 const void∗ CUDA_MEMCPY3D_st::srcHost Source host pointer 5.4.16 CUdeviceptr CUDA_MEMCPY3D_st::srcDevice Data Structure Documentation Source device pointer 5.2.2.2. device.4. array) 5.23 Source Y 5.4.318 5.2.25 size_t CUDA_MEMCPY3D_st::WidthInBytes size_t CUDA_MEMCPY3D_st::srcZ size_t CUDA_MEMCPY3D_st::srcY Width of 3D memory copy in bytes Generated for NVIDIA CUDA Library by Doxygen .2.2.4.

2.5.5.3 x 5.5 cudaChannelFormatDesc Struct Reference 319 5.4 y 5.2.2.2 w 5.5 z int cudaChannelFormatDesc::z int cudaChannelFormatDesc::y int cudaChannelFormatDesc::x int cudaChannelFormatDesc::w Generated for NVIDIA CUDA Library by Doxygen .5 cudaChannelFormatDesc Struct Reference Data Fields • • • • • enum cudaChannelFormatKind f int w int x int y int z 5.5.1 Detailed Description CUDA Channel format descriptor 5.5.2.5.2.1 Field Documentation enum cudaChannelFormatKind cudaChannelFormatDesc::f Channel format kind 5.2 5.5.5.5.

6.2 5.1 Detailed Description CUDA device properties 5.1 Field Documentation int cudaDeviceProp::canMapHostMemory Device can map host memory with cudaHostAlloc/cudaHostGetDevicePointer 5.6.2.6.2 int cudaDeviceProp::clockRate Clock frequency in kilohertz Generated for NVIDIA CUDA Library by Doxygen .320 Data Structure Documentation 5.6 cudaDeviceProp Struct Reference Data Fields • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • int canMapHostMemory int clockRate int computeMode int concurrentKernels int deviceOverlap int ECCEnabled int integrated int kernelExecTimeoutEnabled int major int maxGridSize [3] int maxTexture1D int maxTexture2D [2] int maxTexture2DArray [3] int maxTexture3D [3] int maxThreadsDim [3] int maxThreadsPerBlock size_t memPitch int minor int multiProcessorCount char name [256] int pciBusID int pciDeviceID int regsPerBlock size_t sharedMemPerBlock size_t surfaceAlignment int tccDriver size_t textureAlignment size_t totalConstMem size_t totalGlobalMem int warpSize 5.6.2.

2.6.6.6.9 int cudaDeviceProp::major Major compute capability 5.3 int cudaDeviceProp::computeMode 321 Compute mode (See cudaComputeMode) 5.10 int cudaDeviceProp::maxGridSize[3] Maximum size of each dimension of a grid 5.6.2.5 int cudaDeviceProp::deviceOverlap Device can concurrently copy memory and execute a kernel 5.2.6.6.6.6 cudaDeviceProp Struct Reference 5.2.2.2.6.12 int cudaDeviceProp::maxTexture2D[2] Maximum 2D texture dimensions 5.2.6 int cudaDeviceProp::ECCEnabled Device has ECC support enabled 5.11 int cudaDeviceProp::maxTexture1D Maximum 1D texture size 5.6.7 int cudaDeviceProp::integrated Device is integrated as opposed to discrete 5.6.2.14 int cudaDeviceProp::maxTexture3D[3] Maximum 3D texture dimensions Generated for NVIDIA CUDA Library by Doxygen .8 int cudaDeviceProp::kernelExecTimeoutEnabled Specified whether there is a run time limit on kernels 5.13 int cudaDeviceProp::maxTexture2DArray[3] Maximum 2D texture array dimensions 5.2.2.2.5.4 int cudaDeviceProp::concurrentKernels Device can possibly execute multiple kernels concurrently 5.2.6.6.

23 int cudaDeviceProp::regsPerBlock 32-bit registers available per block 5.6.6.6.25 size_t cudaDeviceProp::surfaceAlignment Alignment requirements for surfaces 5.2.16 int cudaDeviceProp::maxThreadsPerBlock Maximum number of threads per block 5.322 5.2.15 int cudaDeviceProp::maxThreadsDim[3] Data Structure Documentation Maximum size of each dimension of a block 5.18 int cudaDeviceProp::minor Minor compute capability 5.2.6.2.22 int cudaDeviceProp::pciDeviceID PCI device ID of the device 5.6.2.2.6.2.2.2.21 int cudaDeviceProp::pciBusID PCI bus ID of the device 5.17 size_t cudaDeviceProp::memPitch Maximum pitch in bytes allowed by memory copies 5.2.6.20 char cudaDeviceProp::name[256] ASCII string identifying device 5.6.6.6.2.2.24 size_t cudaDeviceProp::sharedMemPerBlock Shared memory available per block in bytes 5.19 int cudaDeviceProp::multiProcessorCount Number of multiprocessors on device 5.26 int cudaDeviceProp::tccDriver 1 if device is a Tesla device using TCC driver.6. 0 otherwise Generated for NVIDIA CUDA Library by Doxygen .6.

27 size_t cudaDeviceProp::textureAlignment 323 Alignment requirement for textures 5.29 size_t cudaDeviceProp::totalGlobalMem Global memory available on device in bytes 5.28 size_t cudaDeviceProp::totalConstMem Constant memory available on device in bytes 5.6.6.5.2.30 int cudaDeviceProp::warpSize Warp size in threads Generated for NVIDIA CUDA Library by Doxygen .6 cudaDeviceProp Struct Reference 5.6.2.6.2.2.

7. in bytes when referring to linear memory Generated for NVIDIA CUDA Library by Doxygen .7.1 Field Documentation size_t cudaExtent::depth Depth in elements 5.2 5.1 Detailed Description CUDA extent See also: make_cudaExtent 5.7.7.2 size_t cudaExtent::height Height in elements 5.324 Data Structure Documentation 5.7 cudaExtent Struct Reference Data Fields • size_t depth • size_t height • size_t width 5.2.2.7.3 size_t cudaExtent::width Width in elements when referring to array memory.2.

This value is the major binary version ∗ 10 + the minor binary version.1 Field Documentation int cudaFuncAttributes::binaryVersion The binary architecture version for which the function was compiled.8. This number depends on both the function and the device on which the function is currently loaded.2 size_t cudaFuncAttributes::constSizeBytes The size in bytes of user-allocated constant memory required by this function.8.8.6 int cudaFuncAttributes::ptxVersion The PTX virtual architecture version for which the function was compiled.3 size_t cudaFuncAttributes::localSizeBytes The size in bytes of local memory used by each thread of this function.8.2.2. 5.5 int cudaFuncAttributes::numRegs The number of registers used by each thread of this function. 5.8.8.3 function would return the value 13. This value is the major PTX version ∗ 10 + the minor PTX version.5.3 function would return the value 13.2. so a PTX version 1.8 cudaFuncAttributes Struct Reference 325 5. 5. beyond which a launch of the function would fail. Generated for NVIDIA CUDA Library by Doxygen .2 5. 5. 5.8 cudaFuncAttributes Struct Reference Data Fields • • • • • • • int binaryVersion size_t constSizeBytes size_t localSizeBytes int maxThreadsPerBlock int numRegs int ptxVersion size_t sharedSizeBytes 5.2.1 Detailed Description CUDA function attributes 5.2.2.8.8. so a binary version 1.4 int cudaFuncAttributes::maxThreadsPerBlock The maximum number of threads per block.

Generated for NVIDIA CUDA Library by Doxygen . This does not include dynamically-allocated shared memory requested by the user at runtime.8.2.326 5.7 size_t cudaFuncAttributes::sharedSizeBytes Data Structure Documentation The size in bytes of statically-allocated shared memory per block required by this function.

2.5.9.2.7 struct cudaPos cudaMemcpy3DParms::srcPos [read] Source position offset Generated for NVIDIA CUDA Library by Doxygen .9.1 Detailed Description CUDA 3D memory copying parameters 5.2.2.9.9.9.9.4 struct cudaExtent cudaMemcpy3DParms::extent [read] Requested memory copy size 5.2.9 cudaMemcpy3DParms Struct Reference Data Fields • • • • • • • • struct cudaArray ∗ dstArray struct cudaPos dstPos struct cudaPitchedPtr dstPtr struct cudaExtent extent enum cudaMemcpyKind kind struct cudaArray ∗ srcArray struct cudaPos srcPos struct cudaPitchedPtr srcPtr 5.2.9.1 Field Documentation struct cudaArray∗ cudaMemcpy3DParms::dstArray [read] Destination memory address 5.3 struct cudaPitchedPtr cudaMemcpy3DParms::dstPtr [read] Pitched destination memory address 5.5 enum cudaMemcpyKind cudaMemcpy3DParms::kind Type of transfer 5.2 struct cudaPos cudaMemcpy3DParms::dstPos [read] Destination position offset 5.2.2 5.9.9.9 cudaMemcpy3DParms Struct Reference 327 5.6 struct cudaArray∗ cudaMemcpy3DParms::srcArray [read] Source memory address 5.

328 5.9.8 struct cudaPitchedPtr cudaMemcpy3DParms::srcPtr [read] Data Structure Documentation Pitched source memory address Generated for NVIDIA CUDA Library by Doxygen .2.

10.1 Field Documentation size_t cudaPitchedPtr::pitch Pitch of allocated memory in bytes 5.10.10.5.10 cudaPitchedPtr Struct Reference 329 5.2 5.4 size_t cudaPitchedPtr::ysize Logical height of allocation in elements Generated for NVIDIA CUDA Library by Doxygen .10.2.10 cudaPitchedPtr Struct Reference Data Fields • • • • size_t pitch void ∗ ptr size_t xsize size_t ysize 5.10.2 void∗ cudaPitchedPtr::ptr Pointer to allocated memory 5.1 Detailed Description CUDA Pitched memory pointer See also: make_cudaPitchedPtr 5.10.2.3 size_t cudaPitchedPtr::xsize Logical width of allocation in elements 5.2.2.

11.2 5.1 x 5.11.3 z Field Documentation size_t cudaPos::x size_t cudaPos::y size_t cudaPos::z Generated for NVIDIA CUDA Library by Doxygen .11.2.2.11 cudaPos Struct Reference Data Fields • size_t x • size_t y • size_t z 5.11.330 Data Structure Documentation 5.1 Detailed Description CUDA 3D position See also: make_cudaPos 5.11.2 y 5.2.

7 int CUdevprop_st::sharedMemPerBlock Shared memory available per block in bytes Generated for NVIDIA CUDA Library by Doxygen .12.2.12.2.12.2.6 int CUdevprop_st::regsPerBlock 32-bit registers available per block 5.5.2 int CUdevprop_st::maxGridSize[3] Maximum size of each dimension of a grid 5.4 int CUdevprop_st::maxThreadsPerBlock Maximum number of threads per block 5.12.1 Field Documentation int CUdevprop_st::clockRate Clock frequency in kilohertz 5.12.2 5.12.12.12.1 Detailed Description Legacy device properties 5.2.2.3 int CUdevprop_st::maxThreadsDim[3] Maximum size of each dimension of a block 5.2.12 CUdevprop_st Struct Reference 331 5.12.12 CUdevprop_st Struct Reference Data Fields • • • • • • • • • • int clockRate int maxGridSize [3] int maxThreadsDim [3] int maxThreadsPerBlock int memPitch int regsPerBlock int sharedMemPerBlock int SIMDWidth int textureAlign int totalConstantMemory 5.5 int CUdevprop_st::memPitch Maximum pitch in bytes allowed by memory copies 5.2.

12.2.332 5.10 int CUdevprop_st::totalConstantMemory Constant memory available on device in bytes Generated for NVIDIA CUDA Library by Doxygen .12.2.12.8 int CUdevprop_st::SIMDWidth Data Structure Documentation Warp size in threads 5.2.9 int CUdevprop_st::textureAlign Alignment requirement for textures 5.

5.13 surfaceReference Struct Reference

333

5.13

surfaceReference Struct Reference

Data Fields
• struct cudaChannelFormatDesc channelDesc

5.13.1

Detailed Description

CUDA Surface reference

5.13.2
5.13.2.1

Field Documentation
struct cudaChannelFormatDesc surfaceReference::channelDesc [read]

Channel descriptor for surface reference

Generated for NVIDIA CUDA Library by Doxygen

334

Data Structure Documentation

5.14

textureReference Struct Reference

Data Fields
• • • • enum cudaTextureAddressMode addressMode [3] struct cudaChannelFormatDesc channelDesc enum cudaTextureFilterMode filterMode int normalized

5.14.1

Detailed Description

CUDA texture reference

5.14.2
5.14.2.1

Field Documentation
enum cudaTextureAddressMode textureReference::addressMode[3]

Texture address mode for up to 3 dimensions 5.14.2.2 struct cudaChannelFormatDesc textureReference::channelDesc [read]

Channel descriptor for the texture reference 5.14.2.3 enum cudaTextureFilterMode textureReference::filterMode

Texture filter mode 5.14.2.4 int textureReference::normalized

Indicates whether texture reads are normalized or not

Generated for NVIDIA CUDA Library by Doxygen

Index
addressMode textureReference, 334 binaryVersion cudaFuncAttributes, 325 C++ API Routines, 99 canMapHostMemory cudaDeviceProp, 320 channelDesc surfaceReference, 333 textureReference, 334 clockRate cudaDeviceProp, 320 CUdevprop_st, 331 computeMode cudaDeviceProp, 320 concurrentKernels cudaDeviceProp, 321 constSizeBytes cudaFuncAttributes, 325 Context Management, 173 CU_AD_FORMAT_FLOAT CUDA_TYPES, 157 CU_AD_FORMAT_HALF CUDA_TYPES, 157 CU_AD_FORMAT_SIGNED_INT16 CUDA_TYPES, 157 CU_AD_FORMAT_SIGNED_INT32 CUDA_TYPES, 157 CU_AD_FORMAT_SIGNED_INT8 CUDA_TYPES, 157 CU_AD_FORMAT_UNSIGNED_INT16 CUDA_TYPES, 157 CU_AD_FORMAT_UNSIGNED_INT32 CUDA_TYPES, 157 CU_AD_FORMAT_UNSIGNED_INT8 CUDA_TYPES, 157 CU_COMPUTEMODE_DEFAULT CUDA_TYPES, 157 CU_COMPUTEMODE_EXCLUSIVE CUDA_TYPES, 157 CU_COMPUTEMODE_PROHIBITED CUDA_TYPES, 158 CU_CTX_BLOCKING_SYNC CUDA_TYPES, 158 CU_CTX_LMEM_RESIZE_TO_MAX CUDA_TYPES, 158 CU_CTX_MAP_HOST CUDA_TYPES, 158 CU_CTX_SCHED_AUTO CUDA_TYPES, 158 CU_CTX_SCHED_SPIN CUDA_TYPES, 158 CU_CTX_SCHED_YIELD CUDA_TYPES, 158 CU_CUBEMAP_FACE_NEGATIVE_X CUDA_TYPES, 157 CU_CUBEMAP_FACE_NEGATIVE_Y CUDA_TYPES, 157 CU_CUBEMAP_FACE_NEGATIVE_Z CUDA_TYPES, 157 CU_CUBEMAP_FACE_POSITIVE_X CUDA_TYPES, 157 CU_CUBEMAP_FACE_POSITIVE_Y CUDA_TYPES, 157 CU_CUBEMAP_FACE_POSITIVE_Z CUDA_TYPES, 157 CU_D3D10_DEVICE_LIST_ALL CUDA_D3D10, 287 CU_D3D10_DEVICE_LIST_CURRENT_FRAME CUDA_D3D10, 287 CU_D3D10_DEVICE_LIST_NEXT_FRAME CUDA_D3D10, 287 CU_D3D11_DEVICE_LIST_ALL CUDA_D3D11, 302 CU_D3D11_DEVICE_LIST_CURRENT_FRAME CUDA_D3D11, 302 CU_D3D11_DEVICE_LIST_NEXT_FRAME CUDA_D3D11, 302 CU_D3D9_DEVICE_LIST_ALL CUDA_D3D9, 272 CU_D3D9_DEVICE_LIST_CURRENT_FRAME CUDA_D3D9, 272 CU_D3D9_DEVICE_LIST_NEXT_FRAME CUDA_D3D9, 272 CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_CLOCK_RATE

336 CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_COMPUTE_MODE CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS CUDA_TYPES, 161 CU_DEVICE_ATTRIBUTE_ECC_ENABLED CUDA_TYPES, 161 CU_DEVICE_ATTRIBUTE_GPU_OVERLAP CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_INTEGRATED CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_MAX_PITCH CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT CUDA_TYPES, 161 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES CUDA_TYPES, 161 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH CUDA_TYPES, 161 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT CUDA_TYPES, 160

INDEX CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_PCI_BUS_ID CUDA_TYPES, 161 CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID CUDA_TYPES, 161 CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT CUDA_TYPES, 161 CU_DEVICE_ATTRIBUTE_TCC_DRIVER CUDA_TYPES, 161 CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY CUDA_TYPES, 160 CU_DEVICE_ATTRIBUTE_WARP_SIZE CUDA_TYPES, 160 CU_EVENT_BLOCKING_SYNC CUDA_TYPES, 161 CU_EVENT_DEFAULT CUDA_TYPES, 161 CU_EVENT_DISABLE_TIMING CUDA_TYPES, 161 CU_FUNC_ATTRIBUTE_BINARY_VERSION CUDA_TYPES, 162 CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES CUDA_TYPES, 162 CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES CUDA_TYPES, 162 CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK CUDA_TYPES, 162 CU_FUNC_ATTRIBUTE_NUM_REGS CUDA_TYPES, 162 CU_FUNC_ATTRIBUTE_PTX_VERSION
Generated for NVIDIA CUDA Library by Doxygen

INDEX CUDA_TYPES, 162 CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES CUDA_TYPES, 162 CU_FUNC_CACHE_PREFER_L1 CUDA_TYPES, 161 CU_FUNC_CACHE_PREFER_NONE CUDA_TYPES, 161 CU_FUNC_CACHE_PREFER_SHARED CUDA_TYPES, 161 CU_JIT_ERROR_LOG_BUFFER CUDA_TYPES, 163 CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES CUDA_TYPES, 163 CU_JIT_FALLBACK_STRATEGY CUDA_TYPES, 163 CU_JIT_INFO_LOG_BUFFER CUDA_TYPES, 163 CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES CUDA_TYPES, 163 CU_JIT_MAX_REGISTERS CUDA_TYPES, 162 CU_JIT_OPTIMIZATION_LEVEL CUDA_TYPES, 163 CU_JIT_TARGET CUDA_TYPES, 163 CU_JIT_TARGET_FROM_CUCONTEXT CUDA_TYPES, 163 CU_JIT_THREADS_PER_BLOCK CUDA_TYPES, 162 CU_JIT_WALL_TIME CUDA_TYPES, 163 CU_LIMIT_MALLOC_HEAP_SIZE CUDA_TYPES, 164 CU_LIMIT_PRINTF_FIFO_SIZE CUDA_TYPES, 164 CU_LIMIT_STACK_SIZE CUDA_TYPES, 164 CU_MEMORYTYPE_ARRAY CUDA_TYPES, 164 CU_MEMORYTYPE_DEVICE CUDA_TYPES, 164 CU_MEMORYTYPE_HOST CUDA_TYPES, 164 CU_PREFER_BINARY CUDA_TYPES, 162 CU_PREFER_PTX CUDA_TYPES, 162 CU_TARGET_COMPUTE_10 CUDA_TYPES, 163 CU_TARGET_COMPUTE_11 CUDA_TYPES, 163 CU_TARGET_COMPUTE_12 CUDA_TYPES, 163 CU_TARGET_COMPUTE_13
Generated for NVIDIA CUDA Library by Doxygen

337 CUDA_TYPES, 163 CU_TARGET_COMPUTE_20 CUDA_TYPES, 163 CU_TARGET_COMPUTE_21 CUDA_TYPES, 163 CU_TR_ADDRESS_MODE_BORDER CUDA_TYPES, 157 CU_TR_ADDRESS_MODE_CLAMP CUDA_TYPES, 157 CU_TR_ADDRESS_MODE_MIRROR CUDA_TYPES, 157 CU_TR_ADDRESS_MODE_WRAP CUDA_TYPES, 157 CU_TR_FILTER_MODE_LINEAR CUDA_TYPES, 161 CU_TR_FILTER_MODE_POINT CUDA_TYPES, 161 CU_MEMHOSTALLOC_DEVICEMAP CUDA_TYPES, 153 CU_MEMHOSTALLOC_PORTABLE CUDA_TYPES, 153 CU_MEMHOSTALLOC_WRITECOMBINED CUDA_TYPES, 153 CU_PARAM_TR_DEFAULT CUDA_TYPES, 153 CU_TRSA_OVERRIDE_FORMAT CUDA_TYPES, 153 CU_TRSF_NORMALIZED_COORDINATES CUDA_TYPES, 153 CU_TRSF_READ_AS_INTEGER CUDA_TYPES, 153 CU_TRSF_SRGB CUDA_TYPES, 153 CUaddress_mode CUDA_TYPES, 154 CUaddress_mode_enum CUDA_TYPES, 157 CUarray CUDA_TYPES, 154 cuArray3DCreate CUDA_MEM, 191 cuArray3DGetDescriptor CUDA_MEM, 192 CUarray_cubemap_face CUDA_TYPES, 154 CUarray_cubemap_face_enum CUDA_TYPES, 157 CUarray_format CUDA_TYPES, 154 CUarray_format_enum CUDA_TYPES, 157 cuArrayCreate CUDA_MEM, 193 cuArrayDestroy

338 CUDA_MEM, 194 cuArrayGetDescriptor CUDA_MEM, 195 CUcomputemode CUDA_TYPES, 154 CUcomputemode_enum CUDA_TYPES, 157 CUcontext CUDA_TYPES, 154 CUctx_flags CUDA_TYPES, 154 CUctx_flags_enum CUDA_TYPES, 158 cuCtxAttach CUDA_CTX, 174 cuCtxCreate CUDA_CTX, 174 cuCtxDestroy CUDA_CTX, 175 cuCtxDetach CUDA_CTX, 176 cuCtxGetApiVersion CUDA_CTX, 176 cuCtxGetCacheConfig CUDA_CTX, 176 cuCtxGetDevice CUDA_CTX, 177 cuCtxGetLimit CUDA_CTX, 177 cuCtxPopCurrent CUDA_CTX, 178 cuCtxPushCurrent CUDA_CTX, 178 cuCtxSetCacheConfig CUDA_CTX, 179 cuCtxSetLimit CUDA_CTX, 180 cuCtxSynchronize CUDA_CTX, 180 cuD3D10CtxCreate CUDA_D3D10, 287 cuD3D10CtxCreateOnDevice CUDA_D3D10, 287 CUd3d10DeviceList CUDA_D3D10, 287 CUd3d10DeviceList_enum CUDA_D3D10, 287 cuD3D10GetDevice CUDA_D3D10, 288 cuD3D10GetDevices CUDA_D3D10, 288 cuD3D10GetDirect3DDevice CUDA_D3D10, 289 CUD3D10map_flags CUDA_D3D10_DEPRECATED, 293 CUD3D10map_flags_enum CUDA_D3D10_DEPRECATED, 293 cuD3D10MapResources CUDA_D3D10_DEPRECATED, 293 CUD3D10register_flags CUDA_D3D10_DEPRECATED, 293 CUD3D10register_flags_enum CUDA_D3D10_DEPRECATED, 293 cuD3D10RegisterResource CUDA_D3D10_DEPRECATED, 294 cuD3D10ResourceGetMappedArray CUDA_D3D10_DEPRECATED, 295 cuD3D10ResourceGetMappedPitch CUDA_D3D10_DEPRECATED, 296 cuD3D10ResourceGetMappedPointer CUDA_D3D10_DEPRECATED, 296 cuD3D10ResourceGetMappedSize CUDA_D3D10_DEPRECATED, 297 cuD3D10ResourceGetSurfaceDimensions CUDA_D3D10_DEPRECATED, 298 cuD3D10ResourceSetMapFlags CUDA_D3D10_DEPRECATED, 298 cuD3D10UnmapResources CUDA_D3D10_DEPRECATED, 299 cuD3D10UnregisterResource CUDA_D3D10_DEPRECATED, 300 cuD3D11CtxCreate CUDA_D3D11, 302 cuD3D11CtxCreateOnDevice CUDA_D3D11, 302 CUd3d11DeviceList CUDA_D3D11, 301 CUd3d11DeviceList_enum CUDA_D3D11, 302 cuD3D11GetDevice CUDA_D3D11, 303 cuD3D11GetDevices CUDA_D3D11, 303 cuD3D11GetDirect3DDevice CUDA_D3D11, 304 cuD3D9CtxCreate CUDA_D3D9, 272 cuD3D9CtxCreateOnDevice CUDA_D3D9, 272 CUd3d9DeviceList CUDA_D3D9, 272 CUd3d9DeviceList_enum CUDA_D3D9, 272 cuD3D9GetDevice CUDA_D3D9, 273 cuD3D9GetDevices CUDA_D3D9, 273 cuD3D9GetDirect3DDevice

INDEX

Generated for NVIDIA CUDA Library by Doxygen

INDEX CUDA_D3D9, 274 CUd3d9map_flags CUDA_D3D9_DEPRECATED, 278 CUd3d9map_flags_enum CUDA_D3D9_DEPRECATED, 278 cuD3D9MapResources CUDA_D3D9_DEPRECATED, 278 CUd3d9register_flags CUDA_D3D9_DEPRECATED, 278 CUd3d9register_flags_enum CUDA_D3D9_DEPRECATED, 278 cuD3D9RegisterResource CUDA_D3D9_DEPRECATED, 279 cuD3D9ResourceGetMappedArray CUDA_D3D9_DEPRECATED, 280 cuD3D9ResourceGetMappedPitch CUDA_D3D9_DEPRECATED, 281 cuD3D9ResourceGetMappedPointer CUDA_D3D9_DEPRECATED, 282 cuD3D9ResourceGetMappedSize CUDA_D3D9_DEPRECATED, 282 cuD3D9ResourceGetSurfaceDimensions CUDA_D3D9_DEPRECATED, 283 cuD3D9ResourceSetMapFlags CUDA_D3D9_DEPRECATED, 284 cuD3D9UnmapResources CUDA_D3D9_DEPRECATED, 284 cuD3D9UnregisterResource CUDA_D3D9_DEPRECATED, 285 CUDA Driver API, 147 CUDA Runtime API, 9 CUDA_D3D10 CU_D3D10_DEVICE_LIST_ALL, 287 CU_D3D10_DEVICE_LIST_CURRENT_FRAME, 287 CU_D3D10_DEVICE_LIST_NEXT_FRAME, 287 CUDA_D3D11 CU_D3D11_DEVICE_LIST_ALL, 302 CU_D3D11_DEVICE_LIST_CURRENT_FRAME, 302 CU_D3D11_DEVICE_LIST_NEXT_FRAME, 302 CUDA_D3D9 CU_D3D9_DEVICE_LIST_ALL, 272 CU_D3D9_DEVICE_LIST_CURRENT_FRAME, 272 CU_D3D9_DEVICE_LIST_NEXT_FRAME, 272 CUDA_ERROR_ALREADY_ACQUIRED CUDA_TYPES, 159 CUDA_ERROR_ALREADY_MAPPED CUDA_TYPES, 159 CUDA_ERROR_ARRAY_IS_MAPPED CUDA_TYPES, 159 CUDA_ERROR_CONTEXT_ALREADY_CURRENT CUDA_TYPES, 158
Generated for NVIDIA CUDA Library by Doxygen

339 CUDA_ERROR_DEINITIALIZED CUDA_TYPES, 158 CUDA_ERROR_ECC_UNCORRECTABLE CUDA_TYPES, 159 CUDA_ERROR_FILE_NOT_FOUND CUDA_TYPES, 159 CUDA_ERROR_INVALID_CONTEXT CUDA_TYPES, 158 CUDA_ERROR_INVALID_DEVICE CUDA_TYPES, 158 CUDA_ERROR_INVALID_HANDLE CUDA_TYPES, 159 CUDA_ERROR_INVALID_IMAGE CUDA_TYPES, 158 CUDA_ERROR_INVALID_SOURCE CUDA_TYPES, 159 CUDA_ERROR_INVALID_VALUE CUDA_TYPES, 158 CUDA_ERROR_LAUNCH_FAILED CUDA_TYPES, 159 CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING CUDA_TYPES, 159 CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES CUDA_TYPES, 159 CUDA_ERROR_LAUNCH_TIMEOUT CUDA_TYPES, 159 CUDA_ERROR_MAP_FAILED CUDA_TYPES, 159 CUDA_ERROR_NO_BINARY_FOR_GPU CUDA_TYPES, 159 CUDA_ERROR_NO_DEVICE CUDA_TYPES, 158 CUDA_ERROR_NOT_FOUND CUDA_TYPES, 159 CUDA_ERROR_NOT_INITIALIZED CUDA_TYPES, 158 CUDA_ERROR_NOT_MAPPED CUDA_TYPES, 159 CUDA_ERROR_NOT_MAPPED_AS_ARRAY CUDA_TYPES, 159 CUDA_ERROR_NOT_MAPPED_AS_POINTER CUDA_TYPES, 159 CUDA_ERROR_NOT_READY CUDA_TYPES, 159 CUDA_ERROR_OPERATING_SYSTEM CUDA_TYPES, 159 CUDA_ERROR_OUT_OF_MEMORY CUDA_TYPES, 158 CUDA_ERROR_SHARED_OBJECT_INIT_FAILED CUDA_TYPES, 159 CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND CUDA_TYPES, 159

160 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH. 160 CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT. 161 CU_EVENT_DISABLE_TIMING. 160 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT. 161 CU_DEVICE_ATTRIBUTE_GPU_OVERLAP. 159 CUDA_ERROR_UNSUPPORTED_LIMIT CUDA_TYPES. 159 CUDA_SUCCESS CUDA_TYPES. 162 CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES. 160 CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK. 160 CU_DEVICE_ATTRIBUTE_WARP_SIZE. 157 CU_AD_FORMAT_UNSIGNED_INT8. 162 CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES. 158 CU_CUBEMAP_FACE_NEGATIVE_X. 160 CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS. 157 CU_AD_FORMAT_SIGNED_INT8. 161 CU_FUNC_ATTRIBUTE_BINARY_VERSION. 158 CU_CTX_MAP_HOST. 160 CUDA_ERROR_UNMAP_FAILED CUDA_TYPES. 161 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT. 157 CU_COMPUTEMODE_DEFAULT. 160 CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z. 158 CU_CTX_SCHED_SPIN. 160 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT. 160 CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X. 160 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH. 160 CU_DEVICE_ATTRIBUTE_CLOCK_RATE. 161 CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID. 157 CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY. 160 CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY. 160 CU_DEVICE_ATTRIBUTE_INTEGRATED. 157 CU_CUBEMAP_FACE_NEGATIVE_Y. 157 CU_AD_FORMAT_SIGNED_INT32. 160 CU_DEVICE_ATTRIBUTE_COMPUTE_MODE.340 CUDA_ERROR_UNKNOWN CUDA_TYPES. 160 CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK. 157 CU_AD_FORMAT_SIGNED_INT16. 158 CU_CTX_BLOCKING_SYNC. 158 CU_CTX_LMEM_RESIZE_TO_MAX. 161 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES. 157 CU_COMPUTEMODE_EXCLUSIVE. 157 CU_CUBEMAP_FACE_POSITIVE_X. 157 CU_COMPUTEMODE_PROHIBITED. 160 CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT. 157 CU_CUBEMAP_FACE_POSITIVE_Z. 160 CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK. 157 CU_CUBEMAP_FACE_POSITIVE_Y. 160 CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK. 161 CU_DEVICE_ATTRIBUTE_ECC_ENABLED. 161 CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK. Generated for NVIDIA CUDA Library by Doxygen . 160 INDEX CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y. 160 CU_DEVICE_ATTRIBUTE_PCI_BUS_ID. 161 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH. 160 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH. 157 CU_AD_FORMAT_HALF. 157 CU_CUBEMAP_FACE_NEGATIVE_Z. 158 CUDA_TYPES CU_AD_FORMAT_FLOAT. 160 CU_EVENT_BLOCKING_SYNC. 157 CU_AD_FORMAT_UNSIGNED_INT16. 161 CU_DEVICE_ATTRIBUTE_TCC_DRIVER. 160 CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X. 160 CU_DEVICE_ATTRIBUTE_MAX_PITCH. 160 CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT. 158 CU_CTX_SCHED_AUTO. 160 CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y. 158 CU_CTX_SCHED_YIELD. 157 CU_AD_FORMAT_UNSIGNED_INT32. 160 CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z. 160 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH. 161 CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT. 161 CU_EVENT_DEFAULT.

158 CUDA_ERROR_INVALID_HANDLE. 160 CUDA_ERROR_UNMAP_FAILED. 163 CU_TARGET_COMPUTE_20. 158 CUDA_ERROR_INVALID_SOURCE. 162 CU_JIT_WALL_TIME. 163 CU_TARGET_COMPUTE_11. 158 CUDA_ERROR_DEINITIALIZED. 159 Generated for NVIDIA CUDA Library by Doxygen 341 CUDA_ERROR_INVALID_IMAGE. 313 Format. 161 CUDA_ERROR_ALREADY_ACQUIRED. 162 CU_FUNC_ATTRIBUTE_PTX_VERSION. 158 CUDA_ERROR_NOT_MAPPED. 158 CUDA_ERROR_SHARED_OBJECT_INIT_FAILED. 164 CU_LIMIT_PRINTF_FIFO_SIZE. 162 CU_TARGET_COMPUTE_10. 163 CU_JIT_FALLBACK_STRATEGY. 164 CU_MEMORYTYPE_HOST. 159 CUDA_ERROR_NOT_MAPPED_AS_POINTER. 311 Height. 157 CU_TR_ADDRESS_MODE_CLAMP. 311 NumChannels. 159 CUDA_ERROR_OUT_OF_MEMORY. 159 CUDA_ERROR_INVALID_CONTEXT. 159 CUDA_ERROR_INVALID_VALUE. 159 CUDA_ERROR_NOT_MAPPED_AS_ARRAY. 162 CU_FUNC_ATTRIBUTE_NUM_REGS. 154 CUDA_ARRAY_DESCRIPTOR_st. 163 CU_TR_ADDRESS_MODE_BORDER. 158 CUDA_ARRAY3D_2DARRAY CUDA_TYPES. 163 CU_JIT_MAX_REGISTERS. 313 Height. 162 CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES. 311 Depth. 161 CU_TR_FILTER_MODE_POINT. 159 CUDA_ERROR_FILE_NOT_FOUND. 159 CUDA_ERROR_NOT_READY. 159 CUDA_ERROR_NO_DEVICE. 158 CUDA_ERROR_LAUNCH_FAILED. 153 CUDA_ARRAY3D_DESCRIPTOR CUDA_TYPES. 163 CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES. 162 CU_PREFER_PTX. 163 CU_LIMIT_MALLOC_HEAP_SIZE. 311 Format. 161 CU_JIT_ERROR_LOG_BUFFER. 159 CUDA_ERROR_NO_BINARY_FOR_GPU. 158 CUDA_ERROR_INVALID_DEVICE. 159 CUDA_ERROR_CONTEXT_ALREADY_CURRENT. 159 CUDA_ERROR_UNKNOWN. 159 CUDA_ERROR_UNSUPPORTED_LIMIT. 157 CU_TR_ADDRESS_MODE_MIRROR. 158 CUDA_ERROR_NOT_FOUND. 312 CUDA_ARRAY3D_SURFACE_LDST CUDA_TYPES. 313 CUDA_CTX cuCtxAttach. 163 CU_TARGET_COMPUTE_21. 313 Width. 159 CUDA_ERROR_ALREADY_MAPPED. 157 CU_TR_ADDRESS_MODE_WRAP. 159 CUDA_ERROR_NOT_INITIALIZED. 311 Flags. 162 CU_JIT_OPTIMIZATION_LEVEL. 174 cuCtxDestroy. 163 CU_JIT_TARGET. 159 CUDA_ERROR_LAUNCH_TIMEOUT. 159 CUDA_ERROR_ARRAY_IS_MAPPED. 159 CUDA_ERROR_MAP_FAILED. 163 CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES. 159 CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES. 164 CU_MEMORYTYPE_DEVICE. 153 CUDA_ARRAY_DESCRIPTOR CUDA_TYPES. 159 CUDA_SUCCESS. 159 CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND. 154 CUDA_ARRAY3D_DESCRIPTOR_st. 311 Width. 161 CU_FUNC_CACHE_PREFER_NONE.INDEX 162 CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK. 163 CU_TARGET_COMPUTE_13. 163 CU_JIT_TARGET_FROM_CUCONTEXT. 159 CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING. 313 NumChannels. 158 CUDA_ERROR_ECC_UNCORRECTABLE. 163 CU_TARGET_COMPUTE_12. 164 CU_PREFER_BINARY. 162 CU_FUNC_CACHE_PREFER_L1. 163 CU_JIT_INFO_LOG_BUFFER. 175 . 157 CU_TR_FILTER_MODE_LINEAR. 174 cuCtxCreate. 161 CU_FUNC_CACHE_PREFER_SHARED. 164 CU_MEMORYTYPE_ARRAY. 164 CU_LIMIT_STACK_SIZE. 163 CU_JIT_THREADS_PER_BLOCK. 159 CUDA_ERROR_OPERATING_SYSTEM.

278 CUd3d9register_flags_enum. 296 cuD3D10ResourceGetMappedPointer. 295 cuD3D10ResourceGetMappedPitch. 179 cuCtxSetLimit. 170 cuDeviceGetProperties. 168 cuDeviceGetCount. 279 cuD3D9ResourceGetMappedArray. 287 cuD3D10GetDevice. 278 INDEX CUd3d9map_flags_enum. 287 CUd3d10DeviceList. 287 CUd3d10DeviceList_enum. 273 cuD3D9GetDevices. 288 cuD3D10GetDevices. 178 cuCtxSetCacheConfig. 282 cuD3D9ResourceGetMappedSize. 235 cuEventRecord. 294 cuD3D10ResourceGetMappedArray. 170 cuDeviceTotalMem. 300 CUDA_D3D11 cuD3D11CtxCreate. 180 cuCtxSynchronize. 284 cuD3D9UnregisterResource. 298 cuD3D10ResourceSetMapFlags. 235 cuEventSynchronize. 293 cuD3D10MapResources. 293 CUD3D10register_flags. 267 Generated for NVIDIA CUDA Library by Doxygen . 289 cuGraphicsD3D10RegisterResource. 304 cuGraphicsD3D11RegisterResource. 273 cuD3D9GetDirect3DDevice. 240 cuLaunch. 302 CUd3d11DeviceList. 272 cuD3D9GetDevice. 263 cuGraphicsGLRegisterImage. 278 cuD3D9RegisterResource. 280 cuD3D9ResourceGetMappedPitch. 266 CUGLmap_flags. 176 cuCtxGetApiVersion. 180 CUDA_D3D10 cuD3D10CtxCreate. 265 CUGLmap_flags_enum. 287 cuD3D10CtxCreateOnDevice. 281 cuD3D9ResourceGetMappedPointer. 302 cuD3D11CtxCreateOnDevice. 177 cuCtxPopCurrent. 238 cuFuncSetCacheConfig. 236 CUDA_EXEC cuFuncGetAttribute. 264 CUDA_GL_DEPRECATED cuGLInit. 240 cuLaunchGridAsync. 241 cuParamSeti. 272 cuD3D9CtxCreateOnDevice. 272 CUd3d9DeviceList. 296 cuD3D10ResourceGetMappedSize. 240 cuLaunchGrid. 176 cuCtxGetCacheConfig. 298 cuD3D10UnmapResources. 303 cuD3D11GetDirect3DDevice. 266 cuGLMapBufferObject.342 cuCtxDetach. 301 CUd3d11DeviceList_enum. 284 cuD3D9UnmapResources. 241 cuParamSetf. 297 cuD3D10ResourceGetSurfaceDimensions. 234 cuEventElapsedTime. 242 cuParamSetv. 278 cuD3D9MapResources. 282 cuD3D9ResourceGetSurfaceDimensions. 274 cuGraphicsD3D9RegisterResource. 267 cuGLRegisterBufferObject. 233 cuEventDestroy. 274 CUDA_D3D9_DEPRECATED CUd3d9map_flags. 272 CUd3d9DeviceList_enum. 302 cuD3D11GetDevice. 168 cuDeviceGetAttribute. 178 cuCtxPushCurrent. 239 cuFuncSetSharedSize. 262 cuGraphicsGLRegisterBuffer. 299 cuD3D10UnregisterResource. 283 cuD3D9ResourceSetMapFlags. 288 cuD3D10GetDirect3DDevice. 243 CUDA_EXEC_DEPRECATED cuParamSetTexRef. 266 cuGLMapBufferObjectAsync. 263 cuWGLGetDevice. 167 cuDeviceGet. 238 cuFuncSetBlockShape. 285 CUDA_DEVICE cuDeviceComputeCapability. 289 CUDA_D3D10_DEPRECATED CUD3D10map_flags. 293 CUD3D10map_flags_enum. 171 CUDA_EVENT cuEventCreate. 244 CUDA_GL cuGLCtxCreate. 303 cuD3D11GetDevices. 278 CUd3d9register_flags. 177 cuCtxGetLimit. 242 cuParamSetSize. 304 CUDA_D3D9 cuD3D9CtxCreate. 293 CUD3D10register_flags_enum. 170 cuDeviceGetName. 176 cuCtxGetDevice. 293 cuD3D10RegisterResource. 234 cuEventQuery.

259 cuGraphicsUnmapResources. 165 CUDA_MEM cuArray3DCreate. 195 cuMemAlloc. 314 dstArray. 315 CUDA_MEMCPY3D CUDA_TYPES. 227 cuMemsetD8. 212 cuMemcpyDtoDAsync. 315 srcMemoryType. 216 cuMemFree. 182 . 220 cuMemHostGetFlags. 317 dstY. 217 cuMemGetAddressRange. 317 reserved1. 316 dstHost. 217 cuMemFreeHost. 215 cuMemcpyHtoD. 316 dstHeight. 202 cuMemcpy3D.INDEX cuGLSetBufferObjectMapFlags. 318 srcLOD. 192 cuArrayCreate. 317 srcDevice. 315 srcHost. 269 cuGLUnregisterBufferObject. 314 dstDevice. 316 dstDevice. 260 CUDA_INITIALIZE cuInit. 222 cuMemsetD2D16. 206 cuMemcpyAtoA. 214 cuMemcpyHtoAAsync. 315 srcArray. 315 WidthInBytes. 204 cuMemcpy3DAsync. 316 dstArray. 317 dstXInBytes. 317 reserved0. 154 CUDA_MEMCPY3D_st. 211 cuMemcpyDtoD. 209 cuMemcpyAtoD. 315 srcDevice. 193 cuArrayDestroy. 226 cuMemsetD32. 318 srcPitch. 211 cuMemcpyDtoA. 317 dstPitch. 226 cuMemsetD32Async. 317 dstMemoryType. 214 cuMemcpyHtoA. 200 cuMemcpy2DUnaligned. 196 cuMemAllocPitch. 318 srcXInBytes. 317 dstZ. 223 cuMemsetD2D32. 318 CUDA_MODULE cuModuleGetFunction. 260 cuGraphicsUnregisterResource. 315 srcY. 218 cuMemGetInfo. 315 srcPitch. 222 cuMemsetD2D16Async. 314 dstHost. 213 cuMemcpyDtoHAsync. 224 cuMemsetD2D8. 221 cuMemsetD16. 258 cuGraphicsSubResourceGetMappedArray. 268 cuGLUnmapBufferObject. 195 cuMemAllocHost. 314 dstXInBytes. 198 cuMemcpy2DAsync. 316 Depth. 318 srcZ. 317 dstLOD. 194 cuArrayGetDescriptor. 219 cuMemHostGetDevicePointer. 317 srcArray. 224 cuMemsetD2D32Async. 154 CUDA_MEMCPY2D_st. 218 cuMemHostAlloc. 318 srcHost. 318 WidthInBytes. 269 CUDA_GRAPHICS cuGraphicsMapResources. 191 cuArray3DGetDescriptor. 228 cuMemsetD8Async. 225 Generated for NVIDIA CUDA Library by Doxygen 343 cuMemsetD2D8Async. 197 cuMemcpy2D. 228 CUDA_MEMCPY2D CUDA_TYPES. 216 cuMemcpyHtoDAsync. 315 srcXInBytes. 209 cuMemcpyAtoH. 221 cuMemsetD16Async. 317 Height. 318 srcMemoryType. 268 cuGLUnmapBufferObjectAsync. 315 Height. 212 cuMemcpyDtoH. 258 cuGraphicsResourceSetMapFlags. 314 dstY. 210 cuMemcpyAtoHAsync. 257 cuGraphicsResourceGetMappedPointer. 318 srcY. 314 dstMemoryType. 314 dstPitch. 317 srcHeight.

154 CUDA_ARRAY3D_SURFACE_LDST. 160 CUdeviceptr. 248 cuTexRefSetAddress.344 cuModuleGetGlobal. 155 CUfunc_cache_enum. 246 cuTexRefGetFilterMode. 153 CU_TRSF_SRGB. 250 cuTexRefSetFilterMode. 246 cuTexRefGetArray. 154 CUDA_MEMCPY3D. 156 CUDA_VDPAU cuGraphicsVDPAURegisterOutputSurface. 255 CUDA_TEXREF cuTexRefGetAddress. 154 INDEX CUctx_flags. 156 CUsurfref. 153 CU_TRSF_NORMALIZED_COORDINATES. 155 CUfunction_attribute. 155 CUdevice_attribute_enum. 250 cuTexRefSetFlags. 249 cuTexRefSetArray. 153 CU_MEMHOSTALLOC_PORTABLE. 156 CUstream. 163 CUmemorytype. 155 CUdevice_attribute. 253 CUDA_TYPES CU_MEMHOSTALLOC_DEVICEMAP. 153 CUDA_ARRAY_DESCRIPTOR. 157 CUcomputemode. 157 CUarray_format. 161 CUfunction. 155 CUdevprop. 154 CUaddress_mode_enum. 158 CUDA_ARRAY3D_2DARRAY. 153 CU_TRSA_OVERRIDE_FORMAT. 248 cuTexRefSetAddress2D. 156 CUresult. 187 CUDA_STREAM cuStreamCreate. 153 CU_TRSF_READ_AS_INTEGER. 157 CUcontext. 163 CUlimit. 155 CUfunction_attribute_enum. 153 CUaddress_mode. 166 cudaAddressModeBorder Generated for NVIDIA CUDA Library by Doxygen . 161 CUfunc_cache. 162 CUgraphicsResource. 154 CUDA_MEMCPY2D. 309 CUDA_VERSION CUDA_TYPES. 251 CUDA_TEXREF_DEPRECATED cuTexRefCreate. 154 CUarray_format_enum. 158 CUdevice. 162 CUgraphicsRegisterFlags. 230 cuStreamDestroy. 247 cuTexRefGetFormat. 154 CUcomputemode_enum. 155 CUgraphicsRegisterFlags_enum. 231 cuStreamSynchronize. 153 cudaError_enum. 154 CUarray_cubemap_face_enum. 307 cuGraphicsVDPAURegisterVideoSurface. 309 cuVDPAUGetDevice. 187 cuModuleUnload. 164 CUmodule. 156 CUjit_fallback. 156 CUtexref. 184 cuModuleLoad. 156 CUjit_target_enum. 153 CUDA_ARRAY3D_DESCRIPTOR. 232 CUDA_SURFREF cuSurfRefGetArray. 162 CUjit_target. 231 cuStreamWaitEvent. 153 CU_PARAM_TR_DEFAULT. 156 CUjit_option_enum. 156 CUjit_fallback_enum. 154 CUctx_flags_enum. 185 cuModuleLoadFatBinary. 154 CUDA_VERSION. 255 cuSurfRefSetArray. 184 cuModuleLoadData. 246 cuTexRefGetAddressMode. 155 CUevent_flags_enum. 156 CUlimit_enum. 155 CUevent_flags. 156 CUmemorytype_enum. 161 CUgraphicsMapResourceFlags. 249 cuTexRefSetAddressMode. 153 cuDriverGetVersion. 183 cuModuleGetSurfRef. 183 cuModuleGetTexRef. 153 CU_MEMHOSTALLOC_WRITECOMBINED. 185 cuModuleLoadDataEx. 230 cuStreamQuery. 308 cuVDPAUCtxCreate. 155 CUfilter_mode_enum. 253 cuTexRefDestroy. 155 CUgraphicsMapResourceFlags_enum. 154 CUarray_cubemap_face. 161 CUfilter_mode. 162 CUjit_option. 157 CUarray. 251 cuTexRefSetFormat. 155 CUevent. 247 cuTexRefGetFlags.

100. 105 CUDART_TEXTURE. 76 cudaD3D10MapFlagsReadOnly CUDART_D3D10. 126 cudaD3D10ResourceGetSurfaceDimensions CUDART_D3D10_DEPRECATED. 77 cudaD3D10UnmapResources CUDART_D3D10_DEPRECATED. 124 cudaD3D10ResourceGetMappedPitch CUDART_D3D10_DEPRECATED. 91 cudaBindTexture2D CUDART_HIGHLEVEL.INDEX CUDART_TYPES. 96 cudaBindTexture CUDART_HIGHLEVEL. 140 cudaChannelFormatKindUnsigned CUDART_TYPES. 101 CUDART_SURFACE. 319 w. 76 cudaD3D10MapFlagsWriteDiscard CUDART_D3D10. 93 cudaD3D10DeviceList CUDART_D3D10. 76 cudaD3D10MapResources CUDART_D3D10_DEPRECATED. 127 cudaD3D10SetDirect3DDevice CUDART_D3D10. 319 x. 140 cudaConfigureCall CUDART_EXECUTION. 76 cudaD3D10RegisterResource CUDART_D3D10_DEPRECATED. 102. 128 . 145 cudaBoundaryModeTrap CUDART_TYPES. 126 cudaD3D10ResourceGetMappedSize CUDART_D3D10_DEPRECATED. 140 cudaChannelFormatKindFloat CUDART_TYPES. 319 cudaChannelFormatKind CUDART_TYPES. 17 cudaComputeMode CUDART_TYPES. 104 CUDART_TEXTURE. 145 cudaChannelFormatDesc. 319 z. 102 CUDART_TEXTURE. 140 cudaComputeModeExclusive CUDART_TYPES. 76 cudaD3D10RegisterFlagsNone CUDART_D3D10. 76 cudaD3D10GetDevice CUDART_D3D10. 140 cudaComputeModeDefault CUDART_TYPES. 145 cudaAddressModeClamp CUDART_TYPES. 92 cudaBindTextureToArray CUDART_HIGHLEVEL. 103 CUDART_TEXTURE. 145 cudaBoundaryModeZero CUDART_TYPES. 77 cudaD3D10GetDirect3DDevice CUDART_D3D10. 93 cudaBoundaryModeClamp CUDART_TYPES. 145 cudaAddressModeMirror CUDART_TYPES. 138 cudaArraySurfaceLoadStore CUDART_TYPES. 123 cudaD3D10ResourceGetMappedArray CUDART_D3D10_DEPRECATED. 140 cudaChooseDevice CUDART_DEVICE. 145 cudaAddressModeWrap CUDART_TYPES. 76 cudaD3D10MapFlagsNone CUDART_D3D10. 140 cudaChannelFormatKindSigned CUDART_TYPES. 76 cudaD3D10GetDevices CUDART_D3D10. 145 cudaArrayDefault CUDART_TYPES. 76 cudaD3D10DeviceListNextFrame CUDART_D3D10. 76 cudaD3D10RegisterFlagsArray CUDART_D3D10. 138 cudaBindSurfaceToArray CUDART_HIGHLEVEL. 127 cudaD3D10ResourceSetMapFlags CUDART_D3D10_DEPRECATED. 319 f. 140 cudaComputeModeProhibited Generated for NVIDIA CUDA Library by Doxygen 345 CUDART_TYPES. 76 cudaD3D10DeviceListCurrentFrame CUDART_D3D10. 140 cudaChannelFormatKindNone CUDART_TYPES. 101. 30 cudaCreateChannelDesc CUDART_HIGHLEVEL. 122 cudaD3D10RegisterFlags CUDART_D3D10. 76 cudaD3D10DeviceListAll CUDART_D3D10. 125 cudaD3D10ResourceGetMappedPointer CUDART_D3D10_DEPRECATED. 319 y. 77 cudaD3D10MapFlags CUDART_D3D10.

81 cudaD3D11GetDevices CUDART_D3D11. 71 cudaD3D9DeviceListAll CUDART_D3D9. 322 pciDeviceID. 322 totalConstMem. 138 cudaDeviceMask CUDART_TYPES. 321 maxThreadsDim. 322 pciBusID. 321 maxTexture3D. 114 cudaD3D9RegisterFlags CUDART_D3D9. 322 memPitch. 117 cudaD3D9ResourceGetMappedPointer CUDART_D3D9_DEPRECATED. 80 cudaD3D11DeviceListNextFrame CUDART_D3D11. 320 computeMode. 71 cudaD3D9RegisterFlagsNone CUDART_D3D9. 81 cudaD3D11GetDirect3DDevice CUDART_D3D11. 81 cudaD3D11SetDirect3DDevice CUDART_D3D11. 322 textureAlignment. 71 cudaD3D9MapFlagsReadOnly CUDART_D3D9.346 cudaD3D10UnregisterResource CUDART_D3D10_DEPRECATED. 321 ECCEnabled. 322 surfaceAlignment. 118 cudaD3D9ResourceGetMappedSize CUDART_D3D9_DEPRECATED. 322 regsPerBlock. 320 concurrentKernels. 80 cudaD3D11DeviceListAll CUDART_D3D11. 72 cudaD3D9GetDirect3DDevice CUDART_D3D9. 71 cudaD3D9GetDevices CUDART_D3D9. 138 cudaDeviceLmemResizeToMax CUDART_TYPES. 71 cudaD3D9MapFlagsWriteDiscard CUDART_D3D9. 82 cudaD3D9DeviceList CUDART_D3D9. 321 major. 321 maxGridSize. 72 cudaD3D9MapFlags CUDART_D3D9. 115 cudaD3D9ResourceGetMappedArray CUDART_D3D9_DEPRECATED. 321 kernelExecTimeoutEnabled. 321 deviceOverlap. 320 canMapHostMemory. 118 cudaD3D9ResourceGetSurfaceDimensions CUDART_D3D9_DEPRECATED. 320 clockRate. 71 cudaD3D9MapResources CUDART_D3D9_DEPRECATED. 80 cudaD3D11DeviceListCurrentFrame CUDART_D3D11. 72 cudaD3D9UnmapResources CUDART_D3D9_DEPRECATED. 71 cudaD3D9RegisterResource CUDART_D3D9_DEPRECATED. 323 cudaDevicePropDontCare INDEX Generated for NVIDIA CUDA Library by Doxygen . 321 maxTexture2DArray. 120 cudaD3D9UnregisterResource CUDART_D3D9_DEPRECATED. 71 cudaD3D9MapFlagsNone CUDART_D3D9. 323 totalGlobalMem. 138 cudaDeviceProp. 322 tccDriver. 121 cudaDeviceBlockingSync CUDART_TYPES. 80 cudaD3D11GetDevice CUDART_D3D11. 71 cudaD3D9GetDevice CUDART_D3D9. 119 cudaD3D9ResourceSetMapFlags CUDART_D3D9_DEPRECATED. 116 cudaD3D9ResourceGetMappedPitch CUDART_D3D9_DEPRECATED. 322 minor. 138 cudaDeviceMapHost CUDART_TYPES. 71 cudaD3D9RegisterFlagsArray CUDART_D3D9. 322 multiProcessorCount. 129 cudaD3D11DeviceList CUDART_D3D11. 71 cudaD3D9DeviceListCurrentFrame CUDART_D3D9. 321 integrated. 321 maxTexture2D. 322 sharedMemPerBlock. 323 warpSize. 321 maxThreadsPerBlock. 322 name. 71 cudaD3D9DeviceListNextFrame CUDART_D3D9. 120 cudaD3D9SetDirect3DDevice CUDART_D3D9. 321 maxTexture1D.

142 cudaErrorInvalidTextureBinding CUDART_TYPES. 143 cudaErrorNotReady CUDART_TYPES. 142 cudaErrorInvalidConfiguration CUDART_TYPES. 140 cudaErrorAddressOfConstant CUDART_TYPES. 142 cudaErrorNoDevice CUDART_TYPES. 141 cudaErrorInvalidFilterSetting CUDART_TYPES. 141 cudaErrorMemoryValueTooLarge CUDART_TYPES. 143 cudaErrorInvalidSymbol CUDART_TYPES. 141 cudaErrorMapBufferObjectFailed CUDART_TYPES. 141 cudaErrorMixedDeviceExecution CUDART_TYPES. 143 cudaErrorNoKernelImageForDevice CUDART_TYPES. 141 cudaErrorInvalidKernelImage CUDART_TYPES. 139 cudaDriverGetVersion CUDART__VERSION. 139 cudaDeviceScheduleSpin CUDART_TYPES. 139 cudaDeviceScheduleYield CUDART_TYPES. 142 cudaErrorInvalidValue CUDART_TYPES. 143 cudaErrorStartupFailure CUDART_TYPES. 143 cudaErrorInvalidSurface CUDART_TYPES. 141 cudaErrorMemoryAllocation CUDART_TYPES. 141 cudaErrorInvalidDevice CUDART_TYPES.INDEX CUDART_TYPES. 143 cudaErrorInvalidChannelDescriptor CUDART_TYPES. 141 cudaErrorInvalidTexture CUDART_TYPES. 142 cudaErrorApiFailureBase CUDART_TYPES. 143 cudaErrorDuplicateTextureName CUDART_TYPES. 143 cudaErrorSharedObjectSymbolNotFound CUDART_TYPES. 141 cudaErrorInsufficientDriver CUDART_TYPES. 143 cudaErrorMissingConfiguration CUDART_TYPES. 98 cudaError CUDART_TYPES. 141 cudaErrorSetOnActiveProcess CUDART_TYPES. 142 cudaErrorInvalidNormSetting CUDART_TYPES. 141 cudaErrorLaunchOutOfResources CUDART_TYPES. 143 cudaErrorDuplicateSurfaceName CUDART_TYPES. 138 cudaDeviceScheduleAuto CUDART_TYPES. 143 cudaErrorDuplicateVariableName CUDART_TYPES. 143 cudaErrorIncompatibleDriverContext CUDART_TYPES. 143 cudaErrorInvalidMemcpyDirection Generated for NVIDIA CUDA Library by Doxygen 347 CUDART_TYPES. 142 cudaErrorPriorLaunchFailure CUDART_TYPES. 143 cudaErrorECCUncorrectable CUDART_TYPES. 158 cudaError_t CUDART_TYPES. 142 cudaErrorInvalidPitchValue CUDART_TYPES. 143 cudaErrorSharedObjectInitFailed CUDART_TYPES. 142 cudaErrorInvalidHostPointer CUDART_TYPES. 141 cudaErrorInvalidDevicePointer CUDART_TYPES. 141 cudaErrorInvalidResourceHandle CUDART_TYPES. 141 cudaErrorInvalidDeviceFunction CUDART_TYPES. 142 cudaErrorTextureFetchFailed . 143 cudaErrorSynchronizationError CUDART_TYPES. 144 cudaErrorCudartUnloading CUDART_TYPES. 141 cudaErrorLaunchTimeout CUDART_TYPES. 143 cudaErrorNotYetImplemented CUDART_TYPES. 142 cudaErrorDevicesUnavailable CUDART_TYPES. 140 cudaError_enum CUDA_TYPES. 141 cudaErrorLaunchFailure CUDART_TYPES. 143 cudaErrorInitializationError CUDART_TYPES.

105 cudaEventCreateWithFlags CUDART_EVENT. 145 cudaFormatModeForced CUDART_TYPES. 130 cudaGLMapBufferObjectAsync CUDART_OPENGL_DEPRECATED. 66 cudaGLMapFlagsReadOnly CUDART_OPENGL. 142 cudaErrorTextureNotBound CUDART_TYPES. 325 sharedSizeBytes. 106 cudaFuncSetCacheConfig CUDART_EXECUTION. 142 cudaErrorUnmapBufferObjectFailed CUDART_TYPES. 324 width. 96 cudaGetSymbolAddress CUDART_HIGHLEVEL. 29 cudaExtent. 146 cudaFormatModeAuto CUDART_TYPES. 139 cudaEventDestroy CUDART_EVENT. 108 CUDART_MEMORY. 142 cudaErrorUnknown CUDART_TYPES. 143 cudaEvent_t CUDART_TYPES. 37 cudaFreeHost CUDART_MEMORY. 141 cudaErrorUnsupportedLimit CUDART_TYPES. 325 numRegs. 107 CUDART_MEMORY. 38 cudaGetTextureAlignmentOffset CUDART_HIGHLEVEL. 27 cudaEventQuery CUDART_EVENT. 66 cudaGLMapFlagsNone CUDART_OPENGL. 37 cudaFreeArray CUDART_MEMORY. 107 cudaGetChannelDesc CUDART_TEXTURE. 38 cudaFuncAttributes. 325 constSizeBytes. 15 cudaGetLastError CUDART_ERROR. 15 cudaGetSurfaceReference CUDART_SURFACE. 31 CUDART_HIGHLEVEL. 94 cudaGetTextureReference CUDART_TEXTURE. 325 cudaFuncCache CUDART_TYPES. 17 cudaGetDeviceCount CUDART_DEVICE. 140 cudaEventBlockingSync CUDART_TYPES. 325 localSizeBytes. 146 cudaFilterModePoint CUDART_TYPES. 325 maxThreadsPerBlock. 144 cudaFuncCachePreferShared CUDART_TYPES. 27 cudaEventDisableTiming CUDART_TYPES. 18 cudaGetErrorString CUDART_ERROR. 28 cudaEventRecord CUDART_EVENT. 324 depth. 144 cudaFuncCachePreferNone CUDART_TYPES. 325 ptxVersion. 324 cudaFilterModeLinear CUDART_TYPES. 144 cudaFuncGetAttributes CUDART_EXECUTION. 325 binaryVersion. 26 CUDART_HIGHLEVEL. 139 cudaEventCreate CUDART_EVENT. 66 cudaGLMapFlagsWriteDiscard INDEX Generated for NVIDIA CUDA Library by Doxygen . 94 cudaGetDevice CUDART_DEVICE. 324 height. 144 cudaFuncCachePreferL1 CUDART_TYPES. 28 cudaEventSynchronize CUDART_EVENT. 18 cudaGetDeviceProperties CUDART_DEVICE. 38 cudaGetSymbolSize CUDART_HIGHLEVEL. 139 cudaEventElapsedTime CUDART_EVENT. 145 cudaFree CUDART_MEMORY. 31 CUDART_HIGHLEVEL. 26 cudaEventDefault CUDART_TYPES.348 CUDART_TYPES. 95 cudaGLMapBufferObject CUDART_OPENGL_DEPRECATED. 131 cudaGLMapFlags CUDART_OPENGL. 108 CUDART_TEXTURE.

145 cudaLimitPrintfFifoSize CUDART_TYPES. 144 cudaGraphicsRegisterFlagsNone CUDART_TYPES. 41 cudaMalloc3D CUDART_MEMORY. 144 cudaGraphicsResource_t CUDART_TYPES. 133 cudaGraphicsCubeFace CUDART_TYPES. 144 cudaGraphicsCubeFacePositiveY CUDART_TYPES. 133 cudaGLUnregisterBufferObject CUDART_OPENGL_DEPRECATED. 139 cudaHostAllocMapped CUDART_TYPES. 144 cudaGraphicsCubeFaceNegativeX CUDART_TYPES. 41 cudaMalloc3DArray CUDART_MEMORY. 43 cudaMallocPitch CUDART_MEMORY. 132 cudaGLUnmapBufferObjectAsync CUDART_OPENGL_DEPRECATED. 109 cudaLimit CUDART_TYPES. 144 cudaGraphicsD3D10RegisterResource CUDART_D3D10. 88 cudaGraphicsSubResourceGetMappedArray CUDART_INTEROP. 89 cudaGraphicsUnregisterResource CUDART_INTEROP. 44 cudaMemcpy CUDART_MEMORY. 144 cudaGraphicsMapFlagsWriteDiscard CUDART_TYPES.INDEX CUDART_OPENGL. 144 cudaGraphicsMapFlagsNone CUDART_TYPES. 42 cudaMallocArray CUDART_MEMORY. 43 cudaMallocHost CUDART_HIGHLEVEL. 78 cudaGraphicsD3D11RegisterResource CUDART_D3D11. 39 cudaHostAllocDefault CUDART_TYPES. 144 cudaGraphicsCubeFacePositiveX CUDART_TYPES. 144 cudaGraphicsCubeFaceNegativeZ CUDART_TYPES. 90 cudaGraphicsVDPAURegisterOutputSurface CUDART_VDPAU. 85 cudaHostAlloc CUDART_MEMORY. 145 cudaLimitStackSize CUDART_TYPES. 67 cudaGraphicsMapFlags CUDART_TYPES. 109 CUDART_MEMORY. 84 cudaGraphicsVDPAURegisterVideoSurface CUDART_VDPAU. 145 cudaMalloc CUDART_MEMORY. 139 cudaHostAllocPortable CUDART_TYPES. 45 cudaMemcpy2D . 144 cudaGraphicsCubeFacePositiveZ CUDART_TYPES. 144 cudaGraphicsCubeFaceNegativeY CUDART_TYPES. 144 cudaGraphicsMapResources CUDART_INTEROP. 40 cudaLaunch CUDART_EXECUTION. 131 cudaGLSetBufferObjectMapFlags CUDART_OPENGL_DEPRECATED. 87 cudaGraphicsRegisterFlags CUDART_TYPES. 139 cudaHostGetDevicePointer CUDART_MEMORY. 132 cudaGLSetGLDevice CUDART_OPENGL. 66 cudaGLRegisterBufferObject CUDART_OPENGL_DEPRECATED. 82 cudaGraphicsD3D9RegisterResource CUDART_D3D9. 144 cudaGraphicsMapFlagsReadOnly CUDART_TYPES. 67 cudaGLUnmapBufferObject CUDART_OPENGL_DEPRECATED. 89 cudaGraphicsUnmapResources CUDART_INTEROP. 88 cudaGraphicsResourceSetMapFlags CUDART_INTEROP. 144 cudaLimitMallocHeapSize CUDART_TYPES. 32 CUDART_HIGHLEVEL. 67 cudaGraphicsGLRegisterImage CUDART_OPENGL. 40 cudaHostGetFlags CUDART_MEMORY. 139 cudaHostAllocWriteCombined CUDART_TYPES. 140 cudaGraphicsResourceGetMappedPointer Generated for NVIDIA CUDA Library by Doxygen 349 CUDART_INTEROP. 73 cudaGraphicsGLRegisterBuffer CUDART_OPENGL.

51 cudaMemcpy3DAsync CUDART_MEMORY. 59 cudaMemGetInfo CUDART_MEMORY. 71 cudaD3D9RegisterFlagsArray. 145 cudaMemcpyDeviceToHost CUDART_TYPES. 71 cudaD3D9MapFlagsNone. 145 cudaMemcpyFromArray CUDART_MEMORY. 46 cudaMemcpy2DAsync CUDART_MEMORY. 63 cudaPeekAtLastError CUDART_ERROR. 76 CUDART_D3D11 cudaD3D11DeviceListAll. 327 dstArray. 56 cudaMemcpyFromSymbolAsync CUDART_MEMORY. 71 cudaD3D9DeviceListNextFrame. 71 cudaD3D9MapFlagsReadOnly. 10 CUDART_D3D10 cudaD3D10DeviceListAll. 80 CUDART_D3D9 cudaD3D9DeviceListAll. 327 srcPos. 47 cudaMemcpy2DFromArrayAsync CUDART_MEMORY. 76 cudaD3D10MapFlagsWriteDiscard. 145 cudaMemcpyHostToHost CUDART_TYPES. 76 cudaD3D10DeviceListNextFrame. 330 cudaReadModeElementType CUDART_TYPES. 76 cudaD3D10RegisterFlagsNone. 327 kind. 330 x. 71 INDEX Generated for NVIDIA CUDA Library by Doxygen . 71 cudaD3D9MapFlagsWriteDiscard. 16 cudaPitchedPtr. 327 extent. 146 cudaReadModeNormalizedFloat CUDART_TYPES. 80 cudaD3D11DeviceListCurrentFrame. 327 dstPtr. 57 cudaMemcpyHostToDevice CUDART_TYPES. 47 cudaMemcpy2DFromArray CUDART_MEMORY. 71 cudaD3D9DeviceListCurrentFrame. 60 cudaMemset CUDART_MEMORY. 49 cudaMemcpy2DToArrayAsync CUDART_MEMORY. 50 cudaMemcpy3D CUDART_MEMORY. 53 cudaMemcpyAsync CUDART_MEMORY. 327 cudaMemcpyArrayToArray CUDART_MEMORY. 80 cudaD3D11DeviceListNextFrame. 330 z. 329 cudaPos. 145 cudaMemcpyToArray CUDART_MEMORY. 55 cudaMemcpyFromSymbol CUDART_MEMORY. 58 cudaMemcpyToSymbol CUDART_MEMORY. 63 cudaMemsetAsync CUDART_MEMORY. 146 CUDART CUDART_VERSION. 52 cudaMemcpy3DParms. 60 cudaMemset2D CUDART_MEMORY. 48 cudaMemcpy2DToArray CUDART_MEMORY. 327 srcArray. 59 cudaMemcpyToSymbolAsync CUDART_MEMORY. 76 cudaD3D10DeviceListCurrentFrame. 329 xsize. 76 cudaD3D10RegisterFlagsArray. 329 pitch. 329 ptr. 327 srcPtr. 62 cudaMemset3DAsync CUDART_MEMORY. 327 dstPos. 145 cudaMemcpyKind CUDART_TYPES. 76 cudaD3D10MapFlagsNone. 55 cudaMemcpyFromArrayAsync CUDART_MEMORY. 330 y. 76 cudaD3D10MapFlagsReadOnly. 61 cudaMemset2DAsync CUDART_MEMORY. 45 cudaMemcpy2DArrayToArray CUDART_MEMORY. 54 cudaMemcpyDeviceToDevice CUDART_TYPES. 329 ysize. 58 cudaMemcpyToArrayAsync CUDART_MEMORY. 61 cudaMemset3D CUDART_MEMORY.350 CUDART_MEMORY.

144 cudaFuncCachePreferShared. 142 cudaErrorApiFailureBase. 144 cudaGraphicsMapFlagsReadOnly. 143 cudaErrorSharedObjectInitFailed. 145 cudaAddressModeClamp. 141 cudaErrorSetOnActiveProcess. 146 cudaFilterModePoint. 144 cudaGraphicsCubeFacePositiveX. 77 cudaD3D10MapFlags. 141 cudaErrorLaunchOutOfResources. 143 cudaErrorStartupFailure. 143 cudaErrorInvalidSurface. 76 cudaD3D10RegisterFlags. 146 cudaSuccess. 141 cudaErrorInvalidFilterSetting. 143 cudaErrorDuplicateSurfaceName. 76 cudaD3D10GetDevice. 141 cudaErrorInsufficientDriver. 142 cudaErrorInvalidNormSetting. 66 CUDART_TYPES cudaAddressModeBorder. 145 cudaChannelFormatKindFloat. 76 cudaD3D10GetDevices. 145 cudaReadModeElementType. 142 cudaErrorTextureFetchFailed. 145 cudaMemcpyHostToHost. 143 cudaErrorDuplicateVariableName. 144 cudaGraphicsCubeFaceNegativeZ. 143 cudaErrorNotReady. 144 cudaLimitMallocHeapSize. 141 cudaErrorUnsupportedLimit. 140 cudaComputeModeDefault. 143 cudaErrorIncompatibleDriverContext. 144 cudaGraphicsMapFlagsNone. 145 cudaLimitStackSize. 143 cudaErrorDuplicateTextureName. 143 Generated for NVIDIA CUDA Library by Doxygen 351 cudaErrorMissingConfiguration. 140 cudaComputeModeProhibited. 140 cudaComputeModeExclusive. 76 . 144 cudaGraphicsCubeFaceNegativeX. 142 cudaErrorUnmapBufferObjectFailed. 144 cudaGraphicsCubeFacePositiveY. 142 cudaErrorInvalidConfiguration. 141 cudaErrorInvalidDevicePointer. 77 cudaD3D10GetDirect3DDevice. 144 cudaGraphicsMapFlagsWriteDiscard. 145 cudaAddressModeWrap. 145 cudaBoundaryModeZero. 141 cudaErrorMixedDeviceExecution. 144 cudaGraphicsCubeFacePositiveZ. 142 cudaErrorInvalidPitchValue. 143 cudaErrorInvalidSymbol. 145 cudaMemcpyDeviceToDevice. 145 cudaFuncCachePreferL1. 146 cudaReadModeNormalizedFloat. 145 cudaMemcpyDeviceToHost. 141 cudaErrorInvalidDeviceFunction. 145 cudaBoundaryModeTrap. 141 cudaErrorLaunchFailure. 145 cudaLimitPrintfFifoSize. 141 cudaErrorMemoryValueTooLarge. 141 cudaErrorMapBufferObjectFailed. 141 cudaErrorInvalidDevice. 141 cudaErrorMemoryAllocation. 140 cudaChannelFormatKindNone. 145 cudaFormatModeForced. 143 cudaErrorInitializationError. 142 cudaErrorInvalidHostPointer. 142 cudaErrorTextureNotBound. 145 cudaAddressModeMirror. 141 cudaErrorInvalidResourceHandle. 142 cudaErrorDevicesUnavailable. 145 cudaMemcpyHostToDevice. 142 cudaErrorInvalidTextureBinding. 98 CUDART_D3D10 cudaD3D10DeviceList. 140 cudaChannelFormatKindSigned. 98 cudaRuntimeGetVersion. 141 CUDART__VERSION cudaDriverGetVersion. 141 cudaErrorInvalidTexture. 143 cudaErrorNotYetImplemented. 71 CUDART_OPENGL cudaGLMapFlagsNone. 143 cudaErrorECCUncorrectable. 143 cudaErrorNoKernelImageForDevice. 142 cudaErrorPriorLaunchFailure. 143 cudaErrorInvalidChannelDescriptor. 140 cudaChannelFormatKindUnsigned. 143 cudaErrorInvalidMemcpyDirection. 66 cudaGLMapFlagsWriteDiscard. 145 cudaBoundaryModeClamp. 144 cudaGraphicsCubeFaceNegativeY. 142 cudaErrorNoDevice. 144 cudaGraphicsRegisterFlagsNone. 141 cudaErrorLaunchTimeout. 140 cudaErrorAddressOfConstant. 66 cudaGLMapFlagsReadOnly. 146 cudaFormatModeAuto. 144 cudaErrorCudartUnloading. 143 cudaErrorSharedObjectSymbolNotFound. 143 cudaFilterModeLinear.INDEX cudaD3D9RegisterFlagsNone. 144 cudaFuncCachePreferNone. 141 cudaErrorInvalidKernelImage. 142 cudaErrorUnknown. 143 cudaErrorSynchronizationError. 142 cudaErrorInvalidValue.

21 CUDART_ERROR cudaGetErrorString.352 cudaD3D10SetDirect3DDevice. 126 cudaD3D10ResourceGetMappedSize. 87 cudaGraphicsResourceGetMappedPointer. 90 CUDART_MEMORY cudaFree. 105 cudaFuncGetAttributes. 127 cudaD3D10UnmapResources. 71 cudaD3D9GetDevice. 20 cudaSetValidDevices. 43 cudaMallocHost. 88 cudaGraphicsSubResourceGetMappedArray. 78 CUDART_D3D10_DEPRECATED cudaD3D10MapResources. 42 cudaMallocArray. 40 cudaMalloc. 125 cudaD3D10ResourceGetMappedPointer. 20 cudaSetDeviceFlags. 45 cudaMemcpy2D. 15 cudaPeekAtLastError. 73 CUDART_D3D9_DEPRECATED cudaD3D9MapResources. 81 cudaD3D11GetDevices. 121 CUDART_DEVICE cudaChooseDevice. 72 cudaD3D9GetDirect3DDevice. 107 cudaGetSymbolAddress. 89 cudaGraphicsUnmapResources. 32 cudaSetDoubleForDevice. 106 cudaFuncSetCacheConfig. 33 CUDART_HIGHLEVEL cudaBindSurfaceToArray. 104 cudaCreateChannelDesc. 82 CUDART_D3D9 cudaD3D9DeviceList. 122 cudaD3D10RegisterResource. 105 cudaEventCreate. 77 cudaGraphicsD3D10RegisterResource. 82 cudaGraphicsD3D11RegisterResource. 110 cudaUnbindTexture. 101. 118 cudaD3D9ResourceGetMappedSize. 41 cudaMalloc3D. 101 cudaBindTexture. 127 cudaD3D10ResourceSetMapFlags. 30 cudaFuncGetAttributes. 37 cudaFreeHost. 123 cudaD3D10ResourceGetMappedArray. 114 cudaD3D9RegisterResource. 37 cudaFreeArray. 126 cudaD3D10ResourceGetSurfaceDimensions. 81 cudaD3D11GetDirect3DDevice. 41 cudaMalloc3DArray. 17 cudaGetDeviceCount. 38 cudaGetSymbolAddress. 31 cudaLaunch. 45 Generated for NVIDIA CUDA Library by Doxygen . 102 cudaBindTexture2D. 100. 115 cudaD3D9ResourceGetMappedArray. 80 cudaD3D11GetDevice. 16 CUDART_EVENT cudaEventCreate. 33 cudaSetupArgument. 108 cudaLaunch. 109 cudaMallocHost. 32 cudaSetDoubleForHost. 71 cudaD3D9SetDirect3DDevice. 124 cudaD3D10ResourceGetMappedPitch. 29 CUDART_EXECUTION cudaConfigureCall. 15 cudaGetLastError. 28 cudaEventRecord. 71 cudaD3D9GetDevices. 103 cudaBindTextureToArray. 26 INDEX cudaEventCreateWithFlags. 18 cudaGetDeviceProperties. 44 cudaMemcpy. 31 cudaFuncSetCacheConfig. 27 cudaEventElapsedTime. 26 cudaEventDestroy. 27 cudaEventQuery. 40 cudaHostGetFlags. 81 cudaD3D11SetDirect3DDevice. 118 cudaD3D9ResourceGetSurfaceDimensions. 117 cudaD3D9ResourceGetMappedPointer. 17 cudaGetDevice. 38 cudaHostAlloc. 108 cudaGetTextureAlignmentOffset. 39 cudaHostGetDevicePointer. 72 cudaD3D9MapFlags. 89 cudaGraphicsUnregisterResource. 128 cudaD3D10UnregisterResource. 28 cudaEventSynchronize. 107 cudaGetSymbolSize. 120 cudaD3D9UnmapResources. 111 CUDART_INTEROP cudaGraphicsMapResources. 102. 72 cudaGraphicsD3D9RegisterResource. 43 cudaMallocPitch. 120 cudaD3D9UnregisterResource. 109 cudaSetupArgument. 129 CUDART_D3D11 cudaD3D11DeviceList. 71 cudaD3D9RegisterFlags. 38 cudaGetSymbolSize. 18 cudaSetDevice. 88 cudaGraphicsResourceSetMapFlags. 116 cudaD3D9ResourceGetMappedPitch. 119 cudaD3D9ResourceSetMapFlags.

13 cudaThreadSynchronize. 84 cudaGraphicsVDPAURegisterVideoSurface. 57 cudaMemcpyToArray. 144 cudaGraphicsRegisterFlags. 132 cudaGLUnmapBufferObject. 140 cudaHostAllocDefault. 140 cudaDeviceBlockingSync. 85 . 144 cudaMemcpyKind. 93 cudaGetChannelDesc. 96 CUDART_TEXTURE cudaBindTexture. 146 cudaUUID_t. 139 cudaHostAllocWriteCombined. 138 cudaDeviceMapHost. 132 cudaGLUnmapBufferObjectAsync. 95 cudaUnbindTexture. 144 cudaGraphicsResource_t. 140 CUDART_VDPAU cudaGraphicsVDPAURegisterOutputSurface. 64 make_cudaPitchedPtr. 61 cudaMemset2DAsync. 144 cudaGraphicsCubeFace. 139 cudaHostAllocPortable. 145 cudaStream_t. 23 cudaStreamQuery. 133 CUDART_STREAM cudaStreamCreate. 139 cudaHostAllocMapped. 12 cudaThreadSetLimit. 63 cudaMemsetAsync. 95 CUDART_THREAD cudaThreadExit. 140 cudaSurfaceBoundaryMode. 63 make_cudaExtent. 58 cudaMemcpyToArrayAsync. 138 cudaDeviceMask. 145 cudaTextureAddressMode. 65 CUDART_OPENGL cudaGLMapFlags. 133 cudaGLUnregisterBufferObject. 59 cudaMemGetInfo. 47 cudaMemcpy2DFromArray. 139 cudaError. 52 cudaMemcpyArrayToArray. 68 CUDART_OPENGL_DEPRECATED cudaGLMapBufferObject. 139 cudaFuncCache. 55 cudaMemcpyFromSymbol. 140 cudaError_t. 55 cudaMemcpyFromArrayAsync. 11 cudaThreadGetLimit. 94 cudaGetTextureAlignmentOffset. 24 CUDART_SURFACE cudaBindSurfaceToArray. 94 cudaGetTextureReference. 46 cudaMemcpy2DAsync. 14 CUDART_TYPES cudaArrayDefault. 91 cudaBindTexture2D. 140 cudaEventBlockingSync. 67 cudaGraphicsGLRegisterBuffer. 60 cudaMemset. 60 cudaMemset2D. 138 cudaDevicePropDontCare. 48 cudaMemcpy2DToArray. 85 cudaVDPAUGetDevice. 47 cudaMemcpy2DFromArrayAsync. 92 Generated for NVIDIA CUDA Library by Doxygen 353 cudaBindTextureToArray. 131 cudaGLSetBufferObjectMapFlags. 145 cudaTextureFilterMode. 24 cudaStreamSynchronize. 64 make_cudaPos. 59 cudaMemcpyToSymbolAsync. 140 cudaEvent_t. 139 cudaEventDisableTiming. 61 cudaMemset3D. 51 cudaMemcpy3DAsync. 138 cudaChannelFormatKind. 56 cudaMemcpyFromSymbolAsync. 130 cudaGLMapBufferObjectAsync. 138 cudaDeviceScheduleAuto. 53 cudaMemcpyAsync. 145 cudaSurfaceFormatMode. 67 cudaGraphicsGLRegisterImage. 138 cudaDeviceLmemResizeToMax. 139 cudaDeviceScheduleYield. 12 cudaThreadSetCacheConfig. 144 cudaGraphicsMapFlags.INDEX cudaMemcpy2DArrayToArray. 131 cudaGLRegisterBufferObject. 50 cudaMemcpy3D. 24 cudaStreamWaitEvent. 96 cudaGetSurfaceReference. 58 cudaMemcpyToSymbol. 54 cudaMemcpyFromArray. 139 cudaEventDefault. 66 cudaGLSetGLDevice. 11 cudaThreadGetCacheConfig. 138 cudaArraySurfaceLoadStore. 93 cudaCreateChannelDesc. 23 cudaStreamDestroy. 145 cudaTextureReadMode. 139 cudaLimit. 140 cudaComputeMode. 49 cudaMemcpy2DToArrayAsync. 62 cudaMemset3DAsync. 67 cudaWGLGetDevice. 139 cudaDeviceScheduleSpin.

111 CUDART_TEXTURE. 155 CUdevice_attribute CUDA_TYPES. 98 cudaSetDevice CUDART_DEVICE. 110 cudaSetValidDevices CUDART_DEVICE. 331 memPitch. 86 CUDART_VERSION CUDART. 12 cudaThreadSetCacheConfig CUDART_THREAD. 145 cudaTextureFilterMode CUDART_TYPES. 145 cudaTextureAddressMode CUDART_TYPES. 11 cudaThreadGetCacheConfig CUDART_THREAD. 21 cudaStream_t CUDART_TYPES. 145 cudaTextureReadMode CUDART_TYPES. 331 clockRate. 170 CUdeviceptr CUDA_TYPES. 331 regsPerBlock. 24 cudaStreamSynchronize CUDART_STREAM. 12 cudaThreadSetLimit CUDART_THREAD. 146 cudaThreadExit CUDART_THREAD. 14 cudaUnbindTexture CUDART_HIGHLEVEL. 20 cudaSetDeviceFlags CUDART_DEVICE. 167 cuDeviceGet CUDA_DEVICE. 161 INDEX Generated for NVIDIA CUDA Library by Doxygen . 171 CUdevprop CUDA_TYPES. 166 CUevent CUDA_TYPES. 155 CUevent_flags CUDA_TYPES. 155 CUdevprop_st. 332 cuDriverGetVersion CUDA_VERSION. 170 cuDeviceGetName CUDA_DEVICE. 331 maxGridSize. 141 cudaSurfaceBoundaryMode CUDART_TYPES. 331 SIMDWidth. 331 maxThreadsPerBlock. 33 CUDART_HIGHLEVEL. 86 cudaWGLGetDevice CUDART_OPENGL. 331 maxThreadsDim. 33 cudaSetupArgument CUDART_EXECUTION. 24 cudaSuccess CUDART_TYPES. 23 cudaStreamDestroy CUDART_STREAM. 331 sharedMemPerBlock. 24 cudaStreamWaitEvent CUDART_STREAM. 32 cudaSetDoubleForHost CUDART_EXECUTION. 23 cudaStreamQuery CUDART_STREAM. 20 cudaSetDoubleForDevice CUDART_EXECUTION. 145 cudaSurfaceFormatMode CUDART_TYPES. 85 cudaVDPAUSetVDPAUDevice CUDART_VDPAU. 155 CUevent_flags_enum CUDA_TYPES. 155 CUdevice_attribute_enum CUDA_TYPES. 68 CUdevice CUDA_TYPES. 95 cudaUUID_t CUDART_TYPES. 170 cuDeviceGetProperties CUDA_DEVICE. 140 cudaStreamCreate CUDART_STREAM.354 cudaVDPAUSetVDPAUDevice. 13 cudaThreadSynchronize CUDART_THREAD. 168 cuDeviceGetCount CUDA_DEVICE. 155 cuDeviceTotalMem CUDA_DEVICE. 140 cudaVDPAUGetDevice CUDART_VDPAU. 11 cudaThreadGetLimit CUDART_THREAD. 332 totalConstantMemory. 10 cudaRuntimeGetVersion CUDART__VERSION. 331 textureAlign. 168 cuDeviceGetAttribute CUDA_DEVICE. 160 cuDeviceComputeCapability CUDA_DEVICE.

266 cuGLMapBufferObject CUDA_GL_DEPRECATED. 161 cuFuncGetAttribute CUDA_EXEC. 156 CUjit_option_enum CUDA_TYPES. 268 cuGLUnmapBufferObject CUDA_GL_DEPRECATED. 307 cuGraphicsVDPAURegisterVideoSurface CUDA_VDPAU. 274 cuGraphicsGLRegisterBuffer CUDA_GL. 259 cuGraphicsUnmapResources CUDA_GRAPHICS. 266 cuGLMapBufferObjectAsync CUDA_GL_DEPRECATED. 155 CUfunction_attribute CUDA_TYPES. 236 CUfilter_mode CUDA_TYPES. 156 cuGraphicsResourceGetMappedPointer CUDA_GRAPHICS. 161 CUfunc_cache CUDA_TYPES. 162 CUgraphicsResource CUDA_TYPES. 262 cuGLInit CUDA_GL_DEPRECATED. 269 Generated for NVIDIA CUDA Library by Doxygen 355 cuGLUnregisterBufferObject CUDA_GL_DEPRECATED. 289 cuGraphicsD3D11RegisterResource CUDA_D3D11. 304 cuGraphicsD3D9RegisterResource CUDA_D3D9.INDEX cuEventCreate CUDA_EVENT. 162 CUjit_option CUDA_TYPES. 258 cuGraphicsResourceSetMapFlags CUDA_GRAPHICS. 238 cuFuncSetCacheConfig CUDA_EXEC. 235 cuEventRecord CUDA_EVENT. 260 cuGraphicsUnregisterResource CUDA_GRAPHICS. 163 cuLaunch CUDA_EXEC. 238 cuFuncSetBlockShape CUDA_EXEC. 156 CUjit_target_enum CUDA_TYPES. 308 cuInit CUDA_INITIALIZE. 235 cuEventSynchronize CUDA_EVENT. 155 CUgraphicsMapResourceFlags_enum CUDA_TYPES. 268 cuGLUnmapBufferObjectAsync CUDA_GL_DEPRECATED. 234 cuEventQuery CUDA_EVENT. 240 . 233 cuEventDestroy CUDA_EVENT. 165 CUjit_fallback CUDA_TYPES. 240 CUfunction CUDA_TYPES. 265 CUGLmap_flags_enum CUDA_GL_DEPRECATED. 257 CUgraphicsRegisterFlags CUDA_TYPES. 155 CUfunction_attribute_enum CUDA_TYPES. 155 CUfunc_cache_enum CUDA_TYPES. 267 cuGLRegisterBufferObject CUDA_GL_DEPRECATED. 239 cuFuncSetSharedSize CUDA_EXEC. 162 CUjit_target CUDA_TYPES. 156 CUjit_fallback_enum CUDA_TYPES. 267 cuGLSetBufferObjectMapFlags CUDA_GL_DEPRECATED. 161 cuGLCtxCreate CUDA_GL. 269 cuGraphicsD3D10RegisterResource CUDA_D3D10. 258 cuGraphicsSubResourceGetMappedArray CUDA_GRAPHICS. 260 cuGraphicsVDPAURegisterOutputSurface CUDA_VDPAU. 155 CUfilter_mode_enum CUDA_TYPES. 266 CUGLmap_flags CUDA_GL_DEPRECATED. 155 CUgraphicsRegisterFlags_enum CUDA_TYPES. 234 cuEventElapsedTime CUDA_EVENT. 162 cuGraphicsMapResources CUDA_GRAPHICS. 263 cuGraphicsGLRegisterImage CUDA_GL. 263 CUgraphicsMapResourceFlags CUDA_TYPES.

209 cuMemcpyAtoD CUDA_MEM. 209 cuMemcpyAtoH CUDA_MEM. 226 cuMemsetD32Async CUDA_MEM. 221 cuMemsetD16Async CUDA_MEM. 222 cuMemsetD2D16Async CUDA_MEM. 225 cuMemsetD2D8Async CUDA_MEM. 218 cuMemHostAlloc CUDA_MEM. 224 cuMemsetD2D8 CUDA_MEM. 184 cuModuleLoad CUDA_MODULE. 222 cuMemsetD2D16 CUDA_MEM. 227 cuMemsetD8 CUDA_MEM. 212 cuMemcpyDtoDAsync CUDA_MEM. 215 cuMemcpyHtoD CUDA_MEM. 220 cuMemHostGetFlags CUDA_MEM.356 cuLaunchGrid CUDA_EXEC. 240 cuLaunchGridAsync CUDA_EXEC. 182 cuModuleGetGlobal CUDA_MODULE. 206 cuMemcpyAtoA CUDA_MEM. 156 CUmemorytype_enum CUDA_TYPES. 217 cuMemGetAddressRange CUDA_MEM. 196 cuMemAllocPitch CUDA_MEM. 217 cuMemFreeHost CUDA_MEM. 184 cuModuleLoadData CUDA_MODULE. 223 cuMemsetD2D32 CUDA_MEM. 219 cuMemHostGetDevicePointer CUDA_MEM. 224 cuMemsetD2D32Async CUDA_MEM. 198 cuMemcpy2DAsync CUDA_MEM. 195 cuMemAllocHost CUDA_MEM. 213 cuMemcpyDtoHAsync CUDA_MEM. 200 cuMemcpy2DUnaligned CUDA_MEM. 185 cuModuleLoadDataEx CUDA_MODULE. 211 cuMemcpyDtoA CUDA_MEM. 156 CUlimit_enum CUDA_TYPES. 156 cuModuleGetFunction CUDA_MODULE. 211 cuMemcpyDtoD CUDA_MEM. 218 cuMemGetInfo CUDA_MEM. 202 cuMemcpy3D CUDA_MEM. 212 cuMemcpyDtoH CUDA_MEM. 183 cuModuleGetSurfRef CUDA_MODULE. 183 cuModuleGetTexRef CUDA_MODULE. 210 cuMemcpyAtoHAsync CUDA_MEM. 216 cuMemFree CUDA_MEM. 197 cuMemcpy2D CUDA_MEM. 241 CUlimit CUDA_TYPES. 214 cuMemcpyHtoA CUDA_MEM. 204 cuMemcpy3DAsync CUDA_MEM. 163 cuMemAlloc CUDA_MEM. 226 cuMemsetD32 CUDA_MEM. 216 cuMemcpyHtoDAsync CUDA_MEM. 228 CUmodule CUDA_TYPES. 185 INDEX Generated for NVIDIA CUDA Library by Doxygen . 228 cuMemsetD8Async CUDA_MEM. 164 cuMemsetD16 CUDA_MEM. 221 CUmemorytype CUDA_TYPES. 214 cuMemcpyHtoAAsync CUDA_MEM.

251 cuTexRefSetFormat CUDA_TEXREF. 286 Direct3D 11 Interoperability. 135 Depth CUDA_ARRAY3D_DESCRIPTOR_st. 317 dstPitch CUDA_MEMCPY2D_st. 249 cuTexRefSetAddressMode CUDA_TEXREF. 247 cuTexRefGetFlags CUDA_TEXREF. 243 CUresult CUDA_TYPES. 156 cuTexRefCreate CUDA_TEXREF_DEPRECATED. 317 dstPos cudaMemcpy3DParms. 248 Generated for NVIDIA CUDA Library by Doxygen 357 cuTexRefSetAddress2D CUDA_TEXREF. 156 cuStreamCreate CUDA_STREAM. 314 CUDA_MEMCPY3D_st. 75. 316 depth cudaExtent. 242 cuParamSetTexRef CUDA_EXEC_DEPRECATED. 327 . 314 CUDA_MEMCPY3D_st. 156 cuSurfRefGetArray CUDA_SURFREF. 232 CUsurfref CUDA_TYPES. 247 cuTexRefGetFormat CUDA_TEXREF. 301 Direct3D 9 Interoperability. 324 Device Management. 250 cuTexRefSetFlags CUDA_TEXREF. 317 dstLOD CUDA_MEMCPY3D_st. 311 CUDA_MEMCPY3D_st. 255 cuSurfRefSetArray CUDA_SURFREF. 271 dstArray CUDA_MEMCPY2D_st. 314 CUDA_MEMCPY3D_st. 246 cuTexRefGetFilterMode CUDA_TEXREF. 17. 230 cuStreamQuery CUDA_STREAM. 241 cuParamSeti CUDA_EXEC.INDEX cuModuleLoadFatBinary CUDA_MODULE. 250 cuTexRefSetFilterMode CUDA_TEXREF. 255 CUtexref CUDA_TYPES. 253 cuTexRefGetAddress CUDA_TEXREF. 244 cuParamSetv CUDA_EXEC. 309 cuWGLGetDevice CUDA_GL. 249 cuTexRefSetArray CUDA_TEXREF. 316 cudaMemcpy3DParms. 251 cuVDPAUCtxCreate CUDA_VDPAU. 230 cuStreamDestroy CUDA_STREAM. 246 cuTexRefGetArray CUDA_TEXREF. 264 Data types used by CUDA driver. 231 cuStreamSynchronize CUDA_STREAM. 317 dstMemoryType CUDA_MEMCPY2D_st. 242 cuParamSetSize CUDA_EXEC. 253 cuTexRefDestroy CUDA_TEXREF_DEPRECATED. 80. 248 cuTexRefSetAddress CUDA_TEXREF. 314 CUDA_MEMCPY3D_st. 327 dstDevice CUDA_MEMCPY2D_st. 231 cuStreamWaitEvent CUDA_STREAM. 316 dstHeight CUDA_MEMCPY3D_st. 167 deviceOverlap cudaDeviceProp. 187 cuParamSetf CUDA_EXEC. 321 Direct3D 10 Interoperability. 246 cuTexRefGetAddressMode CUDA_TEXREF. 309 cuVDPAUGetDevice CUDA_VDPAU. 70. 148 Data types used by CUDA Runtime. 316 dstHost CUDA_MEMCPY2D_st. 187 cuModuleUnload CUDA_MODULE. 314 CUDA_MEMCPY3D_st. 156 CUstream CUDA_TYPES.

182 multiProcessorCount cudaDeviceProp. 64 make_cudaPitchedPtr CUDART_MEMORY. 317 height cudaExtent. 321 CUdevprop_st. 34. 317 dstZ CUDA_MEMCPY3D_st. 317 dstY CUDA_MEMCPY2D_st. 321 kind cudaMemcpy3DParms. 325 major cudaDeviceProp. 324 Initialization. 327 dstXInBytes CUDA_MEMCPY2D_st. 64 make_cudaPos CUDART_MEMORY. 322 name cudaDeviceProp. 321 make_cudaExtent CUDART_MEMORY. 334 NumChannels CUDA_ARRAY3D_DESCRIPTOR_st. 321 maxTexture3D cudaDeviceProp. 331 minor cudaDeviceProp. 319 filterMode textureReference. 87. 233 Execution Control. 66. 322 Module Management. 327 f cudaChannelFormatDesc. 26. 313 CUDA_MEMCPY2D_st. 329 ptxVersion cudaFuncAttributes. 317 ECCEnabled cudaDeviceProp. 237 extent cudaMemcpy3DParms. 313 Graphics Interoperability. 315 CUDA_MEMCPY3D_st. 322 cudaFuncAttributes. 322 pciDeviceID cudaDeviceProp. 331 maxThreadsPerBlock cudaDeviceProp. 329 ptr cudaPitchedPtr. 65 maxGridSize cudaDeviceProp. 15 Event Management. 321 maxThreadsDim cudaDeviceProp. 311 CUDA_ARRAY_DESCRIPTOR_st. 313 numRegs cudaFuncAttributes. 311 CUDA_ARRAY_DESCRIPTOR_st. 322 normalized textureReference. 311 CUDA_ARRAY_DESCRIPTOR_st. 325 OpenGL Interoperability. 331 Memory Management. 334 Flags CUDA_ARRAY3D_DESCRIPTOR_st. 331 maxTexture1D cudaDeviceProp. 322 CUdevprop_st. 321 Interactions with the CUDA Driver API.358 dstPtr cudaMemcpy3DParms. 315 CUDA_MEMCPY3D_st. 112 kernelExecTimeoutEnabled cudaDeviceProp. 257 Height CUDA_ARRAY3D_DESCRIPTOR_st. 325 INDEX Generated for NVIDIA CUDA Library by Doxygen . 322 pitch cudaPitchedPtr. 314 CUDA_MEMCPY3D_st. 262 pciBusID cudaDeviceProp. 321 CUdevprop_st. 30. 321 maxTexture2DArray cudaDeviceProp. 327 localSizeBytes cudaFuncAttributes. 311 Format CUDA_ARRAY3D_DESCRIPTOR_st. 188 memPitch cudaDeviceProp. 325 CUdevprop_st. 321 Error Handling. 321 maxTexture2D cudaDeviceProp. 165 integrated cudaDeviceProp.

334 Thread Management. 315 CUDA_MEMCPY3D_st. 323 Width CUDA_ARRAY3D_DESCRIPTOR_st. 322 textureReference. 319 cudaPos. 315 CUDA_MEMCPY3D_st. 317 cudaMemcpy3DParms. 84. 11 totalConstantMemory CUdevprop_st. 318 srcY CUDA_MEMCPY2D_st. 333 channelDesc. 330 . 322 surfaceReference. 334 channelDesc. 96. 332 textureAlignment cudaDeviceProp. 315 CUDA_MEMCPY3D_st. 317 srcHeight CUDA_MEMCPY3D_st. 98. 315 CUDA_MEMCPY3D_st. 255 surfaceAlignment cudaDeviceProp. 332 totalConstMem cudaDeviceProp. 318 srcPos cudaMemcpy3DParms. 319 cudaPos. 323 totalGlobalMem cudaDeviceProp. 245 textureAlign CUdevprop_st. 330 ysize cudaPitchedPtr. 324 WidthInBytes CUDA_MEMCPY2D_st. 317 sharedMemPerBlock cudaDeviceProp. 315 CUDA_MEMCPY3D_st. 322 CUdevprop_st. 334 filterMode. 313 width cudaExtent. 318 srcLOD CUDA_MEMCPY3D_st. 331 reserved0 CUDA_MEMCPY3D_st. 331 srcArray CUDA_MEMCPY2D_st. 329 z cudaChannelFormatDesc.INDEX regsPerBlock cudaDeviceProp. 318 srcPitch CUDA_MEMCPY2D_st. 325 SIMDWidth CUdevprop_st. 319 cudaPos. 318 srcMemoryType CUDA_MEMCPY2D_st. 318 srcZ CUDA_MEMCPY3D_st. 327 srcXInBytes CUDA_MEMCPY2D_st. 327 srcDevice CUDA_MEMCPY2D_st. 230 Surface Reference Management. 322 CUdevprop_st. 317 reserved1 CUDA_MEMCPY3D_st. 166 w cudaChannelFormatDesc. 330 xsize cudaPitchedPtr. 315 CUDA_MEMCPY3D_st. 23. 318 srcHost CUDA_MEMCPY2D_st. 319 warpSize cudaDeviceProp. 318 Stream Management. 318 x cudaChannelFormatDesc. 315 CUDA_MEMCPY3D_st. 312 CUDA_ARRAY_DESCRIPTOR_st. 327 srcPtr cudaMemcpy3DParms. 323 VDPAU Interoperability. 334 normalized. 333 tccDriver Generated for NVIDIA CUDA Library by Doxygen 359 cudaDeviceProp. 331 sharedSizeBytes cudaFuncAttributes. 334 addressMode. 329 y cudaChannelFormatDesc. 307 Version Management. 322 Texture Reference Management. 315 CUDA_MEMCPY3D_st. 91.

NVIDIA Corporation assumes no responsibility for the consequences of use of such information or for any infringement of patents or other rights of third parties that may result from its use. Trademarks NVIDIA. AND OTHER DOCUMENTS (TOGETHER AND SEPARATELY. FILES. Specifications mentioned in this publication are subject to change without notice. STATUTORY. REFERENCE BOARDS.Notice ALL NVIDIA DESIGN SPECIFICATIONS. OR OTHERWISE WITH RESPECT TO THE MATERIALS.nvidia. NVIDIA Corporation products are not authorized for use as critical components in life support devices or systems without express written approval of NVIDIA Corporation.” NVIDIA MAKES NO WARRANTIES. No license is granted by implication or otherwise under any patent or patent rights of NVIDIA Corporation. All rights reserved. DRAWINGS. Information furnished is believed to be accurate and reliable. Tesla. Copyright © 2007-2010 NVIDIA Corporation. “MATERIALS”) ARE BEING PROVIDED “AS IS. LISTS. and Quadro are trademarks or registered trademarks of NVIDIA Corporation. AND FITNESS FOR A PARTICULAR PURPOSE. AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT. DIAGNOSTICS. NVIDIA Corporation 2701 San Tomas Expressway Santa Clara. However. EXPRESSED. This publication supersedes and replaces all information previously supplied. the NVIDIA logo. IMPLIED. CA 95050 www.com . MERCHANTABILITY. Other company and product names may be trademarks of the respective companies with which they are associated. GeForce.

Sign up to vote on this title
UsefulNot useful