P. 1
CUDA Toolkit Reference Manual

CUDA Toolkit Reference Manual

|Views: 709|Likes:
Published by Vinay Goli

More info:

Published by: Vinay Goli on Jun 02, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

06/02/2011

pdf

text

original

Sections

  • Deprecated List
  • Module Index
  • 2.1 Modules
  • Data Structure Index
  • 3.1 Data Structures
  • Module Documentation
  • 4.1 CUDA Runtime API
  • 4.1.1 Detailed Description
  • 4.1.2 Define Documentation
  • 4.2 Thread Management
  • 4.2.1 Detailed Description
  • 4.2.2 Function Documentation
  • 4.3 Error Handling
  • 4.3.1 Detailed Description
  • 4.3.2 Function Documentation
  • 4.4 Device Management
  • 4.4.1 Detailed Description
  • 4.4.2 Function Documentation
  • 4.5 Stream Management
  • 4.5.1 Detailed Description
  • 4.5.2 Function Documentation
  • 4.6 Event Management
  • 4.6.1 Detailed Description
  • 4.6.2 Function Documentation
  • 4.7 Execution Control
  • 4.7.1 Detailed Description
  • 4.7.2 Function Documentation
  • 4.8 Memory Management
  • 4.8.1 Detailed Description
  • 4.8.2 Function Documentation
  • 4.9 OpenGL Interoperability
  • 4.9.1 Detailed Description
  • 4.9.2 Enumeration Type Documentation
  • 4.9.3 Function Documentation
  • 4.10 Direct3D 9 Interoperability
  • 4.10.1 Detailed Description
  • 4.10.2 Enumeration Type Documentation
  • 4.10.2.3 enum cudaD3D9RegisterFlags
  • 4.10.3 Function Documentation
  • cudaD3D9SetDirect3DDevice
  • 4.11 Direct3D 10 Interoperability
  • 4.11.1 Detailed Description
  • 4.11.2 Enumeration Type Documentation
  • 4.11.2.1 enum cudaD3D10DeviceList
  • 4.11.2.3 enum cudaD3D10RegisterFlags
  • 4.11.3 Function Documentation
  • cudaD3D10SetDirect3DDevice
  • 4.12 Direct3D 11 Interoperability
  • 4.12.1 Detailed Description
  • 4.12.2 Enumeration Type Documentation
  • 4.12.2.1 enum cudaD3D11DeviceList
  • 4.12.3 Function Documentation
  • cudaD3D11SetDirect3DDevice
  • 4.13 VDPAU Interoperability
  • 4.13.1 Detailed Description
  • 4.13.2 Function Documentation
  • cudaVDPAUSetVDPAUDevice
  • 4.14 Graphics Interoperability
  • 4.14.1 Detailed Description
  • 4.14.2 Function Documentation
  • cudaGraphicsMapResources
  • 4.15 Texture Reference Management
  • 4.15.1 Detailed Description
  • 4.15.2 Function Documentation
  • 4.16 Surface Reference Management
  • 4.16.1 Detailed Description
  • 4.16.2 Function Documentation
  • 4.17 Version Management
  • 4.17.1 Function Documentation
  • cudaRuntimeGetVersion
  • 4.18 C++ API Routines
  • 4.18.1 Detailed Description
  • 4.18.2 Function Documentation
  • cudaBindSurfaceToArray (C API), cudaBindSurfaceToArray (C++ API)
  • 4.19 Interactions with the CUDA Driver API
  • 4.19.1 Context Management
  • 4.19.2 Interactions between CUstream and cudaStream_t
  • 4.19.3 Interactions between CUevent and cudaEvent_t
  • 4.19.4 Interactions between CUarray and struct cudaArray ∗
  • 4.19.5 Interactions between CUgraphicsResource and cudaGraphicsResource_t
  • 4.20 Direct3D 9 Interoperability [DEPRECATED]
  • 4.20.1 Detailed Description
  • 4.20.2 Function Documentation
  • 4.21 Direct3D 10 Interoperability [DEPRECATED]
  • 4.21.1 Detailed Description
  • 4.21.2 Function Documentation
  • 4.22 OpenGL Interoperability [DEPRECATED]
  • 4.22.1 Detailed Description
  • 4.22.2 Function Documentation
  • 4.23 Data types used by CUDA Runtime
  • Data types used by CUDA Runtime
  • 4.23.1 Define Documentation
  • 4.23.2 Typedef Documentation
  • 4.23.3 Enumeration Type Documentation
  • 4.23.3.1 enum cudaChannelFormatKind
  • cudaChannelFormatKindSigned Signed channel format
  • cudaChannelFormatKindFloat Float channel format
  • 4.23.3.5 enum cudaGraphicsCubeFace
  • 4.23.3.6 enum cudaGraphicsMapFlags
  • 4.23.3.7 enum cudaGraphicsRegisterFlags
  • cudaGraphicsRegisterFlagsNone Default
  • 4.23.3.10 enum cudaSurfaceBoundaryMode
  • 4.23.3.11 enum cudaSurfaceFormatMode
  • 4.23.3.12 enum cudaTextureAddressMode
  • 4.23.3.13 enum cudaTextureFilterMode
  • 4.23.3.14 enum cudaTextureReadMode
  • 4.24 CUDA Driver API
  • 4.24.1 Detailed Description
  • 4.25 Data types used by CUDA driver
  • 4.25.1 Define Documentation
  • 4.25.2 Typedef Documentation
  • 4.25.3 Enumeration Type Documentation
  • 4.25.3.1 enum CUaddress_mode_enum
  • 4.25.3.2 enum CUarray_cubemap_face_enum
  • 4.25.3.3 enum CUarray_format_enum
  • 4.25.3.4 enum CUcomputemode_enum
  • 4.25.3.5 enum CUctx_flags_enum
  • 4.25.3.6 enum cudaError_enum
  • 4.25.3.7 enum CUdevice_attribute_enum
  • CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH Maximum 3D texture depth
  • CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH Maximum texture array width
  • 4.25.3.8 enum CUevent_flags_enum
  • 4.25.3.9 enum CUfilter_mode_enum
  • 4.25.3.10 enum CUfunc_cache_enum
  • 4.25.3.11 enum CUfunction_attribute_enum
  • 4.25.3.12 enum CUgraphicsMapResourceFlags_enum
  • 4.25.3.13 enum CUgraphicsRegisterFlags_enum
  • 4.25.3.14 enum CUjit_fallback_enum
  • 4.25.3.15 enum CUjit_option_enum
  • 4.25.3.16 enum CUjit_target_enum
  • 4.25.3.17 enum CUlimit_enum
  • 4.25.3.18 enum CUmemorytype_enum
  • CU_MEMORYTYPE_HOST Host memory
  • CU_MEMORYTYPE_DEVICE Device memory
  • CU_MEMORYTYPE_ARRAY Array memory
  • 4.26 Initialization
  • 4.26.1 Detailed Description
  • 4.26.2 Function Documentation
  • 4.27 Version Management
  • 4.27.1 Detailed Description
  • 4.27.2 Function Documentation
  • 4.28 Device Management
  • 4.28.1 Detailed Description
  • 4.28.2 Function Documentation
  • 4.29 Context Management
  • 4.29.1 Detailed Description
  • 4.29.2 Function Documentation
  • 4.30 Module Management
  • 4.30.1 Detailed Description
  • 4.30.2 Function Documentation
  • 4.31 Memory Management
  • 4.31.1 Detailed Description
  • 4.31.2 Function Documentation
  • 4.32 Stream Management
  • 4.32.1 Detailed Description
  • 4.32.2 Function Documentation
  • 4.33 Event Management
  • 4.33.1 Detailed Description
  • 4.33.2 Function Documentation
  • 4.34 Execution Control
  • 4.34.1 Detailed Description
  • 4.34.2 Function Documentation
  • 4.35 Execution Control [DEPRECATED]
  • 4.35.1 Detailed Description
  • 4.35.2 Function Documentation
  • 4.36 Texture Reference Management
  • 4.36.1 Detailed Description
  • 4.36.2 Function Documentation
  • 4.37 Texture Reference Management [DEPRECATED] 253
  • 4.37 Texture Reference Management [DEPRECATED]
  • 4.37.1 Detailed Description
  • 4.37.2 Function Documentation
  • cuTexRefDestroy
  • 4.38 Surface Reference Management
  • 4.38.1 Detailed Description
  • 4.38.2 Function Documentation
  • 4.39 Graphics Interoperability
  • 4.39.1 Detailed Description
  • 4.39.2 Function Documentation
  • cuGraphicsMapResources
  • 4.40 OpenGL Interoperability
  • 4.40.1 Detailed Description
  • 4.40.2 Function Documentation
  • 4.41 OpenGL Interoperability [DEPRECATED] 265
  • 4.41 OpenGL Interoperability [DEPRECATED]
  • 4.41.1 Detailed Description
  • 4.41.2 Typedef Documentation
  • 4.41.3 Enumeration Type Documentation
  • 4.41.3.1 enum CUGLmap_flags_enum
  • 4.41.4 Function Documentation
  • 4.42 Direct3D 9 Interoperability
  • 4.42.1 Detailed Description
  • 4.42.2 Typedef Documentation
  • 4.42.3 Enumeration Type Documentation
  • 4.42.3.1 enum CUd3d9DeviceList_enum
  • 4.42.4 Function Documentation
  • 4.43 Direct3D 9 Interoperability [DEPRECATED] 277
  • 4.43 Direct3D 9 Interoperability [DEPRECATED]
  • 4.43.1 Detailed Description
  • 4.43.2 Typedef Documentation
  • 4.43.3 Enumeration Type Documentation
  • 4.43.3.1 enum CUd3d9map_flags_enum
  • 4.43.3.2 enum CUd3d9register_flags_enum
  • 4.43.4 Function Documentation
  • 4.44 Direct3D 10 Interoperability
  • 4.44.1 Detailed Description
  • 4.44.2 Typedef Documentation
  • 4.44.3 Enumeration Type Documentation
  • 4.44.3.1 enum CUd3d10DeviceList_enum
  • 4.44.4 Function Documentation
  • 4.45 Direct3D 10 Interoperability [DEPRECATED]
  • 4.45.1 Detailed Description
  • 4.45.2 Typedef Documentation
  • 4.45.3 Enumeration Type Documentation
  • 4.45.3.1 enum CUD3D10map_flags_enum
  • 4.45.3.2 enum CUD3D10register_flags_enum
  • 4.45.4 Function Documentation
  • 4.46 Direct3D 11 Interoperability
  • 4.46.1 Detailed Description
  • 4.46.2 Typedef Documentation
  • 4.46.3 Enumeration Type Documentation
  • 4.46.3.1 enum CUd3d11DeviceList_enum
  • 4.46.4 Function Documentation
  • 4.47 VDPAU Interoperability
  • 4.47.1 Detailed Description
  • 4.47.2 Function Documentation
  • Data Structure Documentation
  • 5.1 CUDA_ARRAY3D_DESCRIPTOR_st Struct Reference
  • 5.1.1 Detailed Description
  • 5.1.2 Field Documentation
  • Flags
  • 5.2 CUDA_ARRAY_DESCRIPTOR_st Struct Reference 313
  • 5.2 CUDA_ARRAY_DESCRIPTOR_st Struct Reference
  • 5.2.1 Detailed Description
  • 5.2.2 Field Documentation
  • 5.3 CUDA_MEMCPY2D_st Struct Reference
  • 5.3.1 Detailed Description
  • 5.3.2 Field Documentation
  • 5.4 CUDA_MEMCPY3D_st Struct Reference
  • 5.4.1 Detailed Description
  • 5.4.2 Field Documentation
  • 5.5 cudaChannelFormatDesc Struct Reference
  • 5.5.1 Detailed Description
  • 5.5.2 Field Documentation
  • 5.6 cudaDeviceProp Struct Reference
  • 5.6.1 Detailed Description
  • 5.6.2 Field Documentation
  • 5.7 cudaExtent Struct Reference
  • 5.7.1 Detailed Description
  • 5.7.2 Field Documentation
  • 5.8 cudaFuncAttributes Struct Reference
  • 5.8.1 Detailed Description
  • 5.8.2 Field Documentation
  • 5.9 cudaMemcpy3DParms Struct Reference
  • 5.9.1 Detailed Description
  • 5.9.2 Field Documentation
  • 5.10 cudaPitchedPtr Struct Reference
  • 5.10.1 Detailed Description
  • 5.10.2 Field Documentation
  • 5.11 cudaPos Struct Reference
  • 5.11.1 Detailed Description
  • 5.11.2 Field Documentation
  • 5.12 CUdevprop_st Struct Reference
  • 5.12.1 Detailed Description
  • 5.12.2 Field Documentation
  • 5.13 surfaceReference Struct Reference
  • 5.13.1 Detailed Description
  • 5.13.2 Field Documentation
  • 5.14 textureReference Struct Reference
  • 5.14.1 Detailed Description
  • 5.14.2 Field Documentation

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. . . . . 4. . . . . . . . . . .15. . . . . . .7 cudaGetTextureReference . . . . . . . . . . . .6 cudaBindTexture2D . . . . . .2. .2. . .18.18.18 cudaSetupArgument . . . . 4. . . .2. . . . . . . . . . . . . . . . . . . . . . . . .2. 107 4. . .2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15. . .2. . . . . . . . . . . . .2. . . . . . . . . . . . . . . . 100 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2. . . . . . . . . . .9 cudaCreateChannelDesc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Generated for NVIDIA CUDA Library by Doxygen . . . . . .5 cudaGetChannelDesc . . . . . . . . . . 101 4. . . . . . . . . . . . . . . . . . . . . . . . . .18. . . . . . . . . . . 4. . . . .18. . . . . . . .1 Function Documentation .17. . . .15. . . . . . .2. . . . .17 Version Management . . . . .2. .2 cudaBindSurfaceToArray . . . . . . . . . . . .18.18. . . . . . . . . . .18.6 cudaGetTextureAlignmentOffset . . . . . . . . . . . . . . . .2.7 cudaBindTextureToArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18. . . . . . . . . . . . . . . . . . . . .8 cudaUnbindTexture . . . . . . .17. . . . . . 105 4. . . . . . . . . .8 cudaBindTextureToArray . . . . . . .16 cudaLaunch . . . 108 4. . . . . . . . . . . .16. .18. . . .2. . . . . .2. . . .3 cudaBindTextureToArray . . . . . . . . . . . 4. . . . . . . . . 4. . . . . . . .15. . . . . . . . . . . 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 93 94 94 95 95 96 96 96 96 96 98 98 98 98 99 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2. . .16. . . . 100 4. . .14 cudaGetSymbolSize . . . . . . . . . .2. . . . . . . . . . . . . . . . . . 4. . 4. . . . . . . . . . . . . . . . . . 108 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 cudaDriverGetVersion . . . . .2.2. 109 4. .5 cudaBindTexture2D . . . . . . . . . . . . . . . . . . . . .18 C++ API Routines .3 cudaBindTexture . . .18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18.15 cudaGetTextureAlignmentOffset . . . . . . . . . . . . . 4. 109 4. . . . .10 cudaEventCreate . . . . . . . .1.16. . . . . . . . . . . . . .2. . . . . . . . . . . . . . . 101 4. . . . . . . . .15.2. . . . . . . . . . . . . . . . . . . 103 4. . . . . . . . . . . . .2. . . . . . . . . . . . . . . .2. . . 4. . . . .17.1 Detailed Description . 103 4. . . . . . .16. . . . . . . . . . . . . . . . . .2. . . . . . . . . .4 cudaBindTexture . . . . . . . . .18. . . . . . . . . .1. . . . . . . . . . . . . . . .2 cudaGetSurfaceReference . . . . . . . . . . . . . . . 4. . . . . .16 Surface Reference Management . 106 4. . . . 107 4.18. . . . . . . .18. . . . . . . . . . . . . . . . . . . 104 4. . . . .18. . . . . . . . . . . . . . . . .1 Detailed Description . . . .17 cudaMallocHost . . . . . . . . . . . . . . . . . . .2 Function Documentation . . . . . .18. . . . . . . . . . . . . . 4. .1 cudaBindSurfaceToArray . . .12 cudaFuncSetCacheConfig . . .2. . . . . . . . . . . . . . . . . .18. . . . 100 4.18. .2 cudaRuntimeGetVersion . . . . . . .18. . . . . . . . . . . . . . . . . . . . . . . . . . 105 4. . .18. . . . . . . .15. . 110 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4. . . . .2. . . . . .vi CONTENTS 4. . . . . . .11 cudaFuncGetAttributes . . . . . . . . . . . . . . . . . . .4 cudaCreateChannelDesc .2. . .1 cudaBindSurfaceToArray . . . . . . . . . . . . . . . . . . . . . . . . .19 cudaUnbindTexture . . . . . . . . . . .18. . . . . . . . . . . . .2.2.13 cudaGetSymbolAddress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4. . . . . . . . . . . . . . . . 102 4. . . . . . . . . . . . . . . . . . . . . 106 4. . . 4. . . . . . . . . . . . . . . . . . .

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

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

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

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

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

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

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

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

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

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

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

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

Global cuGLMapBufferObject This function is deprecated as of Cuda 3. Global CUDA_ERROR_CONTEXT_ALREADY_CURRENT This error return is deprecated as of CUDA 3.1.1 release.0. Global cuGLUnmapBufferObjectAsync This function is deprecated as of 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. Global cudaErrorMemoryValueTooLarge This error return is deprecated as of CUDA 3.2. Global cuGLMapBufferObjectAsync This function is deprecated as of Cuda 3.1.0. Device emulation mode was removed with the CUDA 3.0. It is no longer an error to attempt to push the active context via cuCtxPushCurrent().0. Global cudaErrorSynchronizationError This error return is deprecated as of CUDA 3. Device emulation mode was removed with the CUDA 3. Device emulation mode was removed with the CUDA 3. Global cuParamSetTexRef Global cuTexRefCreate Global cuTexRefDestroy Global cuGLInit This function is deprecated as of Cuda 3.1 release. Generated for NVIDIA CUDA Library by Doxygen . Global cuGLRegisterBufferObject This function is deprecated as of Cuda 3. Global cuGLSetBufferObjectMapFlags This function is deprecated as of Cuda 3. Global cudaErrorMixedDeviceExecution This error return is deprecated as of CUDA 3.1.1.0.0.3 Global cudaErrorTextureNotBound This error return is deprecated as of CUDA 3.2.0. Global cuGLUnregisterBufferObject This function is deprecated as of Cuda 3.0.1 release.1 release.

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

. . . Version Management . . . . . . . . . . . . . . . . Thread Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CUDA Driver API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Context Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Memory Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C++ API Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Direct3D 9 Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Texture Reference Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Event Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Version Management . . . . . . . . . . Direct3D 10 Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . Graphics Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter 2 Module Index 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Direct3D 11 Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Stream Management . . . . . . . . . . . . . . . . . . . . . . . . . Memory Management . . . . . . . Surface Reference Management . . . . 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Device Management . . . . . . . . . . . . . . . . . . . . . . . . . Event Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data types used by CUDA Runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Stream Management . . . . . . . . . . . . . . . . . . . . . . . . . . Direct3D 9 Interoperability [DEPRECATED] . . . . . . . . .1 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Direct3D 10 Interoperability [DEPRECATED] . . . . . . Device Management . . . . . . . . . . . . . . . . . . . . Execution Control . Interactions with the CUDA Driver API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . OpenGL Interoperability [DEPRECATED] . . . . . . . . . . . . . . VDPAU Interoperability . . . . . . . . OpenGL Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Module Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data types used by CUDA driver . . . . . . . . . .

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

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaFuncAttributes . . . . . . . cudaChannelFormatDesc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CUdevprop_st . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CUDA_MEMCPY2D_st . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaDeviceProp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaPitchedPtr . . . .Chapter 3 Data Structure Index 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaExtent . . . . . . . . . . CUDA_MEMCPY3D_st . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cudaMemcpy3DParms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . surfaceReference . . . . . . . . . . . . . . . . . . textureReference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

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.Chapter 4 Module Documentation 4.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.

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

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

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

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

cudaErrorInvalidValue 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. cudaThreadSynchronize() returns an error if one of the preceding tasks has failed. cudaErrorUnsupportedLimit.0 and higher. Parameters: limit .6 cudaError_t cudaThreadSynchronize (void) Blocks until the device has completed all preceding requested tasks. Returns: cudaSuccess Note: Note that this function may also return error codes from previous.Limit to set value .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. See also: cudaThreadGetLimit 4. asynchronous launches. Setting cudaLimitMallocHeapSize must be performed before launching any kernel that uses the malloc() or free() device system calls. See also: cudaThreadExit Generated for NVIDIA CUDA Library by Doxygen .2.0 will result in the error cudaErrorUnsupportedLimit being returned. asynchronous launches.Size in bytes of limit Returns: cudaSuccess.2. This limit is only applicable to devices of compute capability 2. If the cudaDeviceBlockingSync flag was set for this device. otherwise cudaErrorInvalidValue will be returned.

cudaPeekAtLastError. cudaErrorApiFailureBase Generated for NVIDIA CUDA Library by Doxygen .3. • cudaError_t cudaGetLastError (void) Returns the last error from a runtime call. cudaErrorUnknown. • cudaError_t cudaPeekAtLastError (void) Returns the last error from a runtime call. cudaError 4. cudaErrorLaunchOutOfResources. cudaErrorInvalidDevice. Parameters: error . cudaErrorInsufficientDriver.1 Detailed Description This section describes the error handling functions of the CUDA runtime application programming interface. cudaErrorUnmapBufferObjectFailed. cudaErrorInvalidFilterSetting.2. cudaErrorInvalidDeviceFunction.2 4. cudaErrorInvalidNormSetting. Returns: cudaSuccess. cudaErrorMemoryAllocation. cudaErrorInvalidDevicePointer.4. 4. cudaErrorSetOnActiveProcess.3. cudaErrorInvalidMemcpyDirection.3 Error Handling 15 4. cudaErrorInitializationError.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 Error Handling Functions • const char ∗ cudaGetErrorString (cudaError_t error) Returns the message string from an error code. cudaErrorInvalidValue. cudaErrorInvalidPitchValue. cudaErrorInvalidSymbol. cudaErrorInvalidTextureBinding. cudaErrorInvalidHostPointer. cudaErrorStartupFailure. cudaErrorInvalidResourceHandle. cudaErrorLaunchFailure.1 Function Documentation const char∗ cudaGetErrorString (cudaError_t error) Returns the message string from an error code. cudaErrorInvalidChannelDescriptor. cudaErrorMissingConfiguration. cudaErrorNotYetImplemented.3. cudaErrorInvalidTexture.3.Error code to convert to string Returns: char∗ pointer to a NULL-terminated string See also: cudaGetLastError.2. 4. cudaErrorInvalidConfiguration. cudaErrorLaunchTimeout.

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

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

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

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

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

6 cudaError_t cudaSetDeviceFlags (unsigned int flags) 21 Records flags as the flags to use when the active host thread executes device code. CUDA will try devices from the list sequentially until it finds one that works. cudaErrorInvalidDevice. cudaHostGetDevicePointer() will always return a failure code. cudaGetDevice. cudaChooseDevice 4. If this function is not called. Parameters: flags . 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. • cudaDeviceScheduleSpin: Instruct CUDA to actively spin when waiting for results from the device.2. 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.2. then this call returns cudaErrorSetOnActiveProcess. cudaSetDevice. • cudaDeviceLmemResizeToMax: Instruct CUDA to not reduce local memory after resizing local memory for a kernel. cudaErrorSetOnActiveProcess See also: cudaGetDeviceCount. cudaSetValidDevices. or if it is called with a len of 0. but may lower the performance of CPU threads if they are performing work in parallel with the CUDA thread. • cudaDeviceScheduleYield: Instruct CUDA to yield its thread when waiting for results from the device.4. Parameters: device_arr . then CUDA will yield to other OS threads when waiting for the device. If this flag is not set.4 Device Management 4. • cudaDeviceBlockingSync: Instruct CUDA to block the CPU thread on a synchronization primitive when waiting for the device to finish work. This can decrease latency when waiting for the device.4. If a specified device ID in the list does not exist. cudaGetDeviceProperties. this function will return cudaErrorInvalidDevice.List of devices to try Generated for NVIDIA CUDA Library by Doxygen . If len is not 0 and device_arr is NULL or if len exceeds the number of devices in the system. • cudaDeviceMapHost: This flag must be set in order to allocate pinned host memory that is accessible to the device. The parameter len specifies the number of elements in the list. 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. 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.Parameters for device operation Returns: cudaSuccess. • cudaDeviceScheduleAuto: The default value if the flags parameter is zero.7 cudaError_t cudaSetValidDevices (int ∗ device_arr. This can increase latency when waiting for the device. If C > P.4. 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. then cudaErrorInvalidValue is returned. otherwise CUDA will not yield while waiting for results and actively spin on the processor. int len) Sets a list of devices for CUDA execution in priority order using device_arr. but can increase the performance of CPU threads performing work in parallel with the device.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

cudaChannelFormatKindUnsigned. w. 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 allocation size (width field in elements) flags . cudaMallocPitch. cudaFree.Requested properties of allocated array Returns: cudaSuccess.8 Memory Management desc .4. cudaHostAlloc. or cudaChannelFormatKindFloat. cudaMalloc3DArray. as follows. cudaFreeArray.12 cudaError_t cudaMallocArray (struct cudaArray ∗∗ array.Requested channel format width . asynchronous launches.Flags for extensions (must be 0 for now) Returns: cudaSuccess. cudaFreeArray. See also: cudaMalloc. }. const struct cudaChannelFormatDesc ∗ desc. cudaFreeHost. cudaErrorMemoryAllocation Note: Note that this function may also return error codes from previous. y.Requested channel format extent . cudaMalloc3D. size_t height = 0. size_t width. enum cudaChannelFormatKind f. make_cudaExtent 4.8. z.Requested array allocation height flags . cudaFreeHost. cudaFree. where cudaChannelFormatKind is one of cudaChannelFormatKindSigned.2. The flags parameter enables different options to be specified that affect the allocation. The cudaChannelFormatDesc is defined as: struct cudaChannelFormatDesc { int x. cudaMallocHost (C API).Pointer to allocated array in device memory desc . asynchronous launches.Requested array allocation width height . cudaMallocHost (C API). cudaHostAlloc Generated for NVIDIA CUDA Library by Doxygen . See also: 43 cudaMalloc3D. • 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 . cudaMalloc. cudaErrorMemoryAllocation Note: Note that this function may also return error codes from previous. cudaMallocPitch.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

9.2. • cudaError_t cudaWGLGetDevice (int ∗device.9 OpenGL Interoperability Modules • OpenGL Interoperability [DEPRECATED] Enumerations • enum cudaGLMapFlags { cudaGLMapFlagsNone = 0. 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 . GLuint image. unsigned int flags) Register an OpenGL texture or renderbuffer object.66 Module Documentation 4. 4. unsigned int flags) Registers an OpenGL buffer object. • cudaError_t cudaGraphicsGLRegisterImage (struct cudaGraphicsResource ∗∗resource.1 Enumeration Type Documentation enum cudaGLMapFlags CUDA GL Map Flags Enumerator: cudaGLMapFlagsNone Default.9.1 Detailed Description This section describes the OpenGL interoperability functions of the CUDA runtime application programming interface.9. HGPUNV hGpu) Gets the CUDA device associated with hGpu.2 4. cudaGLMapFlagsReadOnly = 1. 4. GLuint buffer. GLenum target. cudaGLMapFlagsWriteDiscard = 2 } Functions • cudaError_t cudaGLSetGLDevice (int device) Sets the CUDA device for use with OpenGL interoperability. • cudaError_t cudaGraphicsGLRegisterBuffer (struct cudaGraphicsResource ∗∗resource.

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

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

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

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

cudaErrorInvalidValue. asynchronous launches.3.Returns the device corresponding to pszAdapterName pszAdapterName . const char ∗ pszAdapterName) Returns in ∗device the CUDA-compatible device corresponding to the adapter name pszAdapterName obtained from EnumDisplayDevices or IDirect3D9::GetAdapterIdentifier(). If no device on the adapter with name pszAdapterName is CUDA-compatible then the call will fail.2.10.2 4. Parameters: device .4.2. Generated for NVIDIA CUDA Library by Doxygen .10.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. cudaErrorUnknown Note: Note that this function may also return error codes from previous. 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.D3D9 adapter to get device for Returns: cudaSuccess.10.2.10.1 Function Documentation cudaError_t cudaD3D9GetDevice (int ∗ device.3 enum cudaD3D9RegisterFlags CUDA D3D9 Register Flags Enumerator: cudaD3D9RegisterFlagsNone Default.3 4.2 enum cudaD3D9MapFlags CUDA D3D9 Map Flags Enumerator: cudaD3D9MapFlagsNone Default. Resource can be accessed througa void∗ cudaD3D9RegisterFlagsArray Resource can be accessed through a CUarray∗ 4.10 Direct3D 9 Interoperability 71 4.10.10.

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

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

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

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

2. IDXGIAdapter ∗ pAdapter) Returns in ∗device the CUDA-compatible device corresponding to the adapter pAdapter obtained from IDXGIFactory::EnumAdapters. Generated for NVIDIA CUDA Library by Doxygen .11.2 4.3 enum cudaD3D10RegisterFlags CUDA D3D10 Register Flags Enumerator: cudaD3D10RegisterFlagsNone Default.3.1 Function Documentation cudaError_t cudaD3D10GetDevice (int ∗ device. This call will succeed only if a device on adapter pAdapter is Cuda-compatible.76 Module Documentation 4.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. Resource can be accessed through a void∗ cudaD3D10RegisterFlagsArray Resource can be accessed through a CUarray∗ 4. asynchronous launches.11.Returns the device corresponding to pAdapter pAdapter .11. cudaErrorInvalidValue.3 4.2. Parameters: device . 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.11.11.D3D10 adapter to get device for Returns: cudaSuccess.2 enum cudaD3D10MapFlags CUDA D3D10 Map Flags Enumerator: cudaD3D10MapFlagsNone Default. cudaErrorUnknown Note: Note that this function may also return error codes from previous.11.

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

Also on success. See also: cudaD3D10GetDevice. The following are some limitations.The CUDA device to use. cudaErrorInitializationError.Direct3D device to use for interoperability device . cudaErrorInvalidValue. The type of pD3DResource must be one of the following. then this call returns cudaErrorSetOnActiveProcess. unsigned int flags) Registers the Direct3D 10 resource pD3DResource for access by CUDA. Returns: cudaSuccess. then the application will be able to map and unmap this resource until it is unregistered through cudaGraphicsUnregisterResource(). Successful context creation on pD3D10Device will increase the internal reference count on pD3D10Device. asynchronous launches. • 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.3. 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. The only valid value for this parameter is • cudaGraphicsRegisterFlagsNone Not all Direct3D resources of the above types may be used for interoperability with CUDA. Generated for NVIDIA CUDA Library by Doxygen . This device must be among the devices returned when querying cudaD3D10DeviceListAll from cudaD3D10GetDevices.4 Module Documentation cudaError_t cudaD3D10SetDirect3DDevice (ID3D10Device ∗ pD3D10Device. int device = -1) Records pD3D10Device as the Direct3D 10 device to use for Direct3D 10 interoperability on this host thread. Parameters: pD3D10Device .3. may be set to -1 to automatically select an appropriate CUDA device. This call is potentially high-overhead and should not be called every frame in interactive applications. If this call is successful.11.78 4. this call will increase the internal reference count on pD3DResource. 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().11. cudaErrorSetOnActiveProcess Note: Note that this function may also return error codes from previous. cudaGraphicsD3D10RegisterResource 4.5 cudaError_t cudaGraphicsD3D10RegisterResource (struct cudaGraphicsResource ∗∗ resource. ID3D10Resource ∗ pD3DResource.

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

IDXGIAdapter ∗pAdapter) Gets the device number for an adapter. ID3D11Device ∗pD3D11Device. unsigned int cudaDeviceCount. • cudaError_t cudaD3D11GetDevices (unsigned int ∗pCudaDeviceCount. • cudaError_t cudaD3D11SetDirect3DDevice (ID3D11Device ∗pD3D11Device.2 4. 4. int device=-1) Sets the Direct3D 11 device to use for interoperability in this thread. int ∗pCudaDevices. (struct cudaGraphicsResource ∗∗resource.12 Direct3D 11 Interoperability Enumerations • enum cudaD3D11DeviceList { cudaD3D11DeviceListAll = 1. • cudaError_t cudaGraphicsD3D11RegisterResource ID3D11Resource ∗pD3DResource.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 . cudaD3D11DeviceListCurrentFrame = 2.2. 4.12.80 Module Documentation 4.12.12. enum cudaD3D11DeviceList deviceList) Gets the CUDA devices corresponding to a Direct3D 11 device. • cudaError_t cudaD3D11GetDirect3DDevice (ID3D11Device ∗∗ppD3D11Device) Gets the Direct3D device against which the current CUDA context was created. cudaD3D11DeviceListNextFrame = 3 } Functions • cudaError_t cudaD3D11GetDevice (int ∗device.1 Detailed Description This section describes the Direct3D 11 interoperability functions of the CUDA runtime application programming interface. unsigned int flags) Register a Direct3D 11 resource for access by CUDA.

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

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

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

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

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

See also: cudaVDPAUSetVDPAUDevice 4. Records the thread as using VDPAU interoperability. then this call returns cudaErrorSetOnActiveProcess. cudaGraphicsVDPAURegisterOutputSurface Generated for NVIDIA CUDA Library by Doxygen .The VdpDevice to interoperate with vdpGetProcAddress . cudaErrorInvalidDevice.86 Returns: cudaSuccess Note: Module Documentation Note that this function may also return error codes from previous.Device to use for VDPAU interoperability vdpDevice . VdpDevice vdpDevice.2. cudaErrorSetOnActiveProcess Note: Note that this function may also return error codes from previous.4 cudaError_t cudaVDPAUSetVDPAUDevice (int device. Parameters: device . 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. asynchronous launches. See also: cudaGraphicsVDPAURegisterVideoSurface. asynchronous launches.VDPAU’s VdpGetProcAddress function pointer Returns: cudaSuccess.13. VdpGetProcAddress ∗ vdpGetProcAddress) Records device as the device on which the active host thread executes the device code.

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

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

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

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

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

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

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

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

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

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

16 Surface Reference Management symbol . 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. asynchronous launches.Symbol to find surface reference for Returns: cudaSuccess.4.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The lifetime of a CUcontext is managed by a reference counting mechanism. In particular.g.3 Interactions between CUevent and cudaEvent_t The types CUevent and cudaEvent_t are identical and may be used interchangeably. then the CUDA runtime will decrement the reference count of that CUcontext in the function cudaThreadExit. it is necessary to explicitly cast the struct cudaArray ∗ to a CUarray .112 Module Documentation 4. In order to use a CUarray in a CUDA Runtime API function which takes a struct cudaArray ∗.19. cudaSetDeviceFlags.19. 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. cudaD3D9SetDirect3DDevice. 4.2 Interactions between CUstream and cudaStream_t The types CUstream and cudaStream_t are identical and may be used interchangeably. 4.19. All CUDA Runtime API state (e. Note that these functions will fail with cudaErrorSetOnActiveProcess if they are called when a CUcontext is bound to the current host thread. cudaD3D10SetDirect3DDevice.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. 4. Please note that attaching to legacy contexts (those with a version of 3010 as returned by cuCtxGetApiVersion()) is not possible. If a CUcontext is created by the CUDA Runtime. cudaSetValidDevices.19 Interactions with the CUDA Driver API Interactions between the CUDA Driver API and the CUDA Runtime API. and is incremented by cuCtxAttach and decremented by cuCtxDetach. it is necessary to explicitly cast the CUarray to a struct cudaArray ∗. If a CUcontext is created by the CUDA Driver API (or is created by a separate instance of the CUDA Runtime API library). The reference count of a CUcontext is initially set to 0. In order to use a struct cudaArray ∗ in a CUDA Driver API function which takes a CUarray. 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. This section describes the interactions between the CUDA Driver API and the CUDA Runtime API 4.1 Context Management CUDA Runtime API calls operate on the CUDA Driver API CUcontext which is bound to the current host thread. cudaGLSetGLDevice.19. global variables’ addresses and values) travels with its underlying CUcontext. If the CUDA Runtime creates a CUcontext then the CUcontext will be created using the parameters specified by the CUDA Runtime API functions cudaSetDevice. Generated for NVIDIA CUDA Library by Doxygen . then the CUDA Runtime will not increment or decrement the reference count of that CUcontext. The CUDA Runtime will return cudaErrorIncompatibleDriverContext in such cases. and cudaD3D11SetDirect3DDevice.

it is necessary to explicitly cast the struct cudaGraphicsResource ∗ to a CUgraphicsResource . it is necessary to explicitly cast the CUgraphicsResource to a struct cudaGraphicsResource ∗. In order to use a CUgraphicsResource in a CUDA Runtime API function which takes a struct cudaGraphicsResource ∗. Generated for NVIDIA CUDA Library by Doxygen .19 Interactions with the CUDA Driver API 113 4.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.4. In order to use a struct cudaGraphicsResource ∗ in a CUDA Driver API function which takes a CUgraphicsResource.19.

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

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

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

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

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

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

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

9 cudaError_t cudaD3D9UnmapResources (int count. If any of ppResources are not presently mapped for access by CUDA then cudaErrorUnknown is returned. then cudaErrorInvalidResourceHandle is returned. See also: cudaGraphicsUnmapResources 4.2. If pResource is not registered.0. See also: cudaGraphicsUnregisterResource Generated for NVIDIA CUDA Library by Doxygen . Unregisters the Direct3D resource pResource so it is not accessible by CUDA unless registered again. Parameters: pResource . IDirect3DResource9 ∗∗ ppResources) 121 Deprecated This function is deprecated as of Cuda 3.20.0.Number of resources to unmap for CUDA ppResources .Resource to unregister Returns: cudaSuccess. cudaErrorInvalidResourceHandle. cudaErrorUnknown Note: Note that this function may also return error codes from previous.10 cudaError_t cudaD3D9UnregisterResource (IDirect3DResource9 ∗ pResource) Deprecated This function is deprecated as of Cuda 3.Resources to unmap for CUDA Returns: cudaSuccess. Parameters: count . Unmaps the count Direct3D resources in 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. asynchronous launches.2. cudaErrorUnknown Note: Note that this function may also return error codes from previous.4. asynchronous launches.20. then cudaErrorInvalidResourceHandle is returned.20 Direct3D 9 Interoperability [DEPRECATED] 4. cudaErrorInvalidResourceHandle.

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

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

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

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

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

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

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

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

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

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

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

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

134 4. Parameters: bufObj .7 cudaError_t cudaGLUnregisterBufferObject (GLuint bufObj) Module Documentation Deprecated This function is deprecated as of Cuda 3. must be bound to the current thread when this is called.22. it may no longer be mapped by CUDA. or another context from the same share group.Buffer object to unregister Returns: cudaSuccess Note: Note that this function may also return error codes from previous. 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. asynchronous launches.0. Once a buffer is unregistered. See also: cudaGraphicsUnregisterResource Generated for NVIDIA CUDA Library by Doxygen .2.

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. cudaBoundaryModeClamp = 1. cudaChannelFormatKindFloat = 2. cudaReadModeNormalizedFloat = 1 } Data types used by CUDA Runtime Data types used by CUDA Runtime Author: NVIDIA Corporation • enum cudaChannelFormatKind { cudaChannelFormatKindSigned = 0.4. cudaChannelFormatKindUnsigned = 1. cudaAddressModeClamp = 1. cudaFilterModeLinear = 1 } • enum cudaTextureReadMode { cudaReadModeElementType = 0. cudaBoundaryModeTrap = 2 } • enum cudaSurfaceFormatMode { cudaFormatModeForced = 0.23 Data types used by CUDA Runtime 135 4. cudaAddressModeMirror = 2. cudaFormatModeAuto = 1 } • enum cudaTextureAddressMode { cudaAddressModeWrap = 0. cudaChannelFormatKindNone = 3 } Generated for NVIDIA CUDA Library by Doxygen .

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

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

23.Use blocking synchronization 4.2 #define cudaArraySurfaceLoadStore 0x02 Must be set in cudaMallocArray in order to bind surfaces to the CUDA array 4.23.1 4.23.23.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.5 #define cudaDeviceMapHost 8 Device flag .6 #define cudaDeviceMask 0x1f Device flags mask Generated for NVIDIA CUDA Library by Doxygen .23.4 #define cudaDeviceLmemResizeToMax 16 Device flag .1.1.Keep local memory allocation after launch 4.1.1.1.23.3 #define cudaDeviceBlockingSync 4 Device flag .1.23.1 Define Documentation #define cudaArrayDefault 0x00 Default CUDA array allocation flag 4.Support mapped pinned allocations 4.

23.16 #define cudaHostAllocPortable 1 Pinned memory accessible by all CUDA contexts 4.1.Spin default scheduling 4.1.10 #define cudaDeviceScheduleYield 2 Device flag .1.23.7 #define cudaDevicePropDontCare 139 Empty device properties 4.23.23.1.1.8 #define cudaDeviceScheduleAuto 0 Device flag .23.1.4.Automatic scheduling 4.23.9 #define cudaDeviceScheduleSpin 1 Device flag .1.1.13 #define cudaEventDisableTiming 2 Event will not record timing data 4.23.1.1.23.23.23 Data types used by CUDA Runtime 4.12 #define cudaEventDefault 0 Default event flag 4.17 #define cudaHostAllocWriteCombined 4 Write-combined memory Generated for NVIDIA CUDA Library by Doxygen .23.1.11 #define cudaEventBlockingSync 1 Event uses blocking synchronization 4.15 #define cudaHostAllocMapped 2 Map allocation into device space 4.14 #define cudaHostAllocDefault 0 Default page-locked allocation flag 4.23.Yield default scheduling 4.

3.3.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.4 typedef struct CUstream_st∗ cudaStream_t CUDA stream 4.5 typedef struct CUuuid_st cudaUUID_t CUDA UUID types 4.2 4.2.23.140 Module Documentation 4.3 typedef struct cudaGraphicsResource∗ cudaGraphicsResource_t CUDA graphics resource types 4.2.2.23.23.2 typedef struct CUevent_st∗ cudaEvent_t CUDA event types 4.23.3 4.1 Typedef Documentation typedef enum cudaError cudaError_t CUDA Error types 4.23.23.2.23.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 .2.23.23.

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

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

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

23. Production releases of CUDA should not return such errors.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.3.7 enum cudaGraphicsRegisterFlags CUDA graphics interop register flags Enumerator: cudaGraphicsRegisterFlagsNone Default Generated for NVIDIA CUDA Library by Doxygen . 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.144 Module Documentation cudaErrorStartupFailure This indicates an internal startup failure in the CUDA runtime.4 enum cudaFuncCache CUDA function cache configurations Enumerator: cudaFuncCachePreferNone Default function cache configuration. cudaErrorApiFailureBase Any unhandled CUDA driver error is added to this value and returned via the runtime.23.23.3. no preference cudaFuncCachePreferShared Prefer larger shared memory and smaller L1 cache cudaFuncCachePreferL1 Prefer larger L1 cache and smaller shared memory 4.6 enum cudaGraphicsMapFlags CUDA graphics interop map flags Enumerator: cudaGraphicsMapFlagsNone Default.3.3. 4.

3.3.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 .3.11 enum cudaSurfaceFormatMode CUDA Surface format modes Enumerator: cudaFormatModeForced Forced format mode cudaFormatModeAuto Auto format mode 4.23.10 enum cudaSurfaceBoundaryMode CUDA Surface boundary modes Enumerator: cudaBoundaryModeZero Zero boundary mode cudaBoundaryModeClamp Clamp boundary mode cudaBoundaryModeTrap Trap boundary mode 4.23 Data types used by CUDA Runtime 4.3.4.23.3.8 enum cudaLimit 145 CUDA Limits Enumerator: cudaLimitStackSize GPU thread stack size cudaLimitPrintfFifoSize GPU printf FIFO size cudaLimitMallocHeapSize GPU malloc heap size 4.23.23.9 enum cudaMemcpyKind CUDA memory copy types Enumerator: cudaMemcpyHostToHost Host -> Host cudaMemcpyHostToDevice Host -> Device cudaMemcpyDeviceToHost Device -> Host cudaMemcpyDeviceToDevice Device -> Device 4.23.

13 enum cudaTextureFilterMode Module Documentation CUDA texture filter modes Enumerator: cudaFilterModePoint Point filter mode cudaFilterModeLinear Linear filter mode 4.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 .3.146 4.3.23.

4.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.1 Detailed Description This section describes the low-level CUDA driver application programming interface. Generated for NVIDIA CUDA Library by Doxygen .24.

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_CUBEMAP_FACE_NEGATIVE_X = 0x01. CU_TR_ADDRESS_MODE_BORDER = 3 } • enum CUarray_cubemap_face_enum { CU_CUBEMAP_FACE_POSITIVE_X = 0x00. CU_CTX_SCHED_SPIN = 1. CU_CUBEMAP_FACE_POSITIVE_Y = 0x02. CU_AD_FORMAT_UNSIGNED_INT16 = 0x02. CU_CTX_MAP_HOST = 8. CU_CUBEMAP_FACE_POSITIVE_Z = 0x04. CU_CUBEMAP_FACE_NEGATIVE_Z = 0x05 } • enum CUarray_format_enum { CU_AD_FORMAT_UNSIGNED_INT8 = 0x01. CU_CUBEMAP_FACE_NEGATIVE_Y = 0x03. CU_CTX_LMEM_RESIZE_TO_MAX = 16 } Generated for NVIDIA CUDA Library by Doxygen . CU_AD_FORMAT_HALF = 0x10. CU_AD_FORMAT_SIGNED_INT8 = 0x08. CU_AD_FORMAT_UNSIGNED_INT32 = 0x03.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_AD_FORMAT_SIGNED_INT32 = 0x0a. CU_COMPUTEMODE_EXCLUSIVE = 1. CU_AD_FORMAT_SIGNED_INT16 = 0x09. CU_TR_ADDRESS_MODE_MIRROR = 2. CU_CTX_SCHED_YIELD = 2 . CU_COMPUTEMODE_PROHIBITED = 2 } • enum CUctx_flags_enum { CU_CTX_SCHED_AUTO = 0.4. CU_TR_ADDRESS_MODE_CLAMP = 1. CU_CTX_BLOCKING_SYNC = 4. CU_AD_FORMAT_FLOAT = 0x20 } • enum CUcomputemode_enum { CU_COMPUTEMODE_DEFAULT = 0.

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

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

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

Flag for cuTexRefSetArray() 4.4 #define CU_PARAM_TR_DEFAULT -1 For texture references loaded into the module.7 #define CU_TRSF_READ_AS_INTEGER 0x01 Read the texture as integers rather than promoting the values to floats in the range [0. host memory is allocated as write-combined .1.25.6 #define CU_TRSF_NORMALIZED_COORDINATES 0x02 Use normalized texture coordinates in the range [0. host memory is portable between CUDA contexts. Flag for cuMemHostAlloc() 4. faster to DMA. the CUDA array contains an array of 2D slices and the Depth member of CUDA_ARRAY3D_DESCRIPTOR specifies the number of slices.1].1 4. Flag for cuMemHostAlloc() 4.fast to write.25.2 #define CU_MEMHOSTALLOC_PORTABLE 0x01 If set.8 #define CU_TRSF_SRGB 0x10 Perform sRGB->linear conversion during texture read. 4.25.1. slow to read except via SSE4 streaming load instruction (MOVNTDQA).1.1.25.25 Data types used by CUDA driver 153 4.25.1.1. use default texunit from texture reference.25.25. host memory is mapped into CUDA address space and cuMemHostGetDevicePointer() may be called on the host pointer.3 #define CU_MEMHOSTALLOC_WRITECOMBINED 0x04 If set.1. Flag for cuTexRefSetFlags() 4.1.5 #define CU_TRSA_OVERRIDE_FORMAT 0x01 Override the texref format with a format inferred from the array.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 . Flag for cuTexRefSetFlags() 4.1. Flag for cuTexRefSetFlags() 4.25.4. Flag for cuMemHostAlloc() 4.1) instead of [0.1 Define Documentation #define CU_MEMHOSTALLOC_DEVICEMAP 0x02 If set.9 #define CUDA_ARRAY3D_2DARRAY 0x01 If set.25.25.25.1. 4.dim). not the depth of a 3D array.

25.2.2.25.25.25.2.2 typedef struct CUarray_st∗ CUarray CUDA array 4.25.2.10 typedef struct CUDA_MEMCPY2D_st CUDA_MEMCPY2D 2D memory copy parameters Generated for NVIDIA CUDA Library by Doxygen .5 typedef enum CUcomputemode_enum CUcomputemode Compute Modes 4.154 4.1.25.25.25.1 Typedef Documentation typedef enum CUaddress_mode_enum CUaddress_mode Texture reference addressing modes 4.2.11 #define CUDA_VERSION 3020 Module Documentation CUDA API version number 4.9 typedef struct CUDA_ARRAY_DESCRIPTOR_st CUDA_ARRAY_DESCRIPTOR Array descriptor 4.25.2.25.3 typedef enum CUarray_cubemap_face_enum CUarray_cubemap_face Array indices for cube faces 4.2 4.4 typedef enum CUarray_format_enum CUarray_format Array formats 4.2.25.2.2.8 typedef struct CUDA_ARRAY3D_DESCRIPTOR_st CUDA_ARRAY3D_DESCRIPTOR 3D array descriptor 4.7 typedef enum CUctx_flags_enum CUctx_flags Context creation flags 4.6 typedef struct CUctx_st∗ CUcontext CUDA context 4.25.2.

12 typedef int CUdevice CUDA device 4.25.15 typedef struct CUdevprop_st CUdevprop Legacy device properties 4.19 typedef enum CUfunc_cache_enum CUfunc_cache Function cache configurations 4.13 typedef enum CUdevice_attribute_enum CUdevice_attribute Device properties 4.25.25.16 typedef struct CUevent_st∗ CUevent CUDA event 4.2.11 typedef struct CUDA_MEMCPY3D_st CUDA_MEMCPY3D 155 3D memory copy parameters 4.18 typedef enum CUfilter_mode_enum CUfilter_mode Texture reference filtering modes 4.2.25.25.25.25 Data types used by CUDA driver 4.25.20 typedef struct CUfunc_st∗ CUfunction CUDA function 4.2.2.25.2.21 typedef enum CUfunction_attribute_enum CUfunction_attribute Function properties 4.25.2.2.2.2.14 typedef unsigned int CUdeviceptr CUDA device pointer 4.25.17 typedef enum CUevent_flags_enum CUevent_flags Event creation flags 4.2.25.25.2.22 typedef enum CUgraphicsMapResourceFlags_enum CUgraphicsMapResourceFlags Flags for mapping and unmapping interop resources Generated for NVIDIA CUDA Library by Doxygen .4.2.

30 typedef struct CUmod_st∗ CUmodule CUDA module 4.25.25.25.25.26 typedef enum CUjit_option_enum CUjit_option Online compiler options 4.25.2.25 typedef enum CUjit_fallback_enum CUjit_fallback Cubin matching fallback strategies 4.25.33 typedef struct CUsurfref_st∗ CUsurfref CUDA surface reference 4.24 typedef struct CUgraphicsResource_st∗ CUgraphicsResource CUDA graphics interop resource 4.2.156 4.29 typedef enum CUmemorytype_enum CUmemorytype typedef enum CUlimit_enum CUlimit Memory types 4.2.2.25.23 typedef enum CUgraphicsRegisterFlags_enum CUgraphicsRegisterFlags Module Documentation Flags to register a graphics resource 4.25.2.31 Error codes 4.34 typedef struct CUtexref_st∗ CUtexref CUDA texture reference Generated for NVIDIA CUDA Library by Doxygen .2.27 typedef enum CUjit_target_enum CUjit_target Online compilation targets 4.2.2.32 typedef struct CUstream_st∗ CUstream typedef enum cudaError_enum CUresult CUDA stream 4.25.2.25.2.25.2.25.28 Limits 4.2.

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.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.4.3.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.25 Data types used by CUDA driver 157 4.25.3 4.25.3.25.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.

CUDA_ERROR_OUT_OF_MEMORY The API call failed because it was unable to allocate enough memory to perform the requested operation. 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_VALUE This indicates that one or more of the parameters passed to the API call is not within an acceptable range of values. 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). CUDA_ERROR_INVALID_IMAGE This indicates that the device kernel image is invalid.6 enum cudaError_enum Error codes Enumerator: CUDA_SUCCESS The API call returned with no errors. See cuCtxGetApiVersion() for more details.3. Deprecated This error return is deprecated as of CUDA 3. This can also indicate an invalid CUDA module.25. CUDA_ERROR_INVALID_CONTEXT This most frequently indicates that there is no context bound to the current thread. In the case of query calls. CUDA_ERROR_NO_DEVICE This indicates that no CUDA-capable devices were detected by the installed CUDA driver.25. CUDA_ERROR_DEINITIALIZED This indicates that the CUDA driver is in the process of shutting down. CUDA_ERROR_NOT_INITIALIZED This indicates that the CUDA driver has not been initialized with cuInit() or that initialization has failed.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.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. It is no longer an error to attempt to push the active context via cuCtxPushCurrent(). This can also be returned if a user mixes different API versions (i. Generated for NVIDIA CUDA Library by Doxygen .3. 3010 context with 3020 API calls).e. this can also mean that the operation being queried is complete (see cuEventQuery() and cuStreamQuery()).2.

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

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.25.160 Module Documentation CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING This error indicates a kernel launch that uses an incompatible texturing mode. 4. CUDA_ERROR_UNKNOWN This indicates that an unknown internal error has occurred. 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 .3. 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.

25.25.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.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 .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.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.

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.3. CU_FUNC_ATTRIBUTE_NUM_REGS The number of registers used by each thread of this function.162 4. so a PTX version 1. Note that this may return the undefined value of 0 for cubins compiled prior to CUDA 3.0. 4.3 function would return the value 13.25. Option type: unsigned int Generated for NVIDIA CUDA Library by Doxygen . CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES The size in bytes of statically-allocated shared memory required by this function.25.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_CONST_SIZE_BYTES The size in bytes of user-allocated constant memory required by this function. This value is the major binary version ∗ 10 + the minor binary version.25. This number depends on both the function and the device on which the function is currently loaded. CU_FUNC_ATTRIBUTE_BINARY_VERSION The binary architecture version for which the function was compiled. This does not include dynamically-allocated shared memory requested by the user at runtime.11 enum CUfunction_attribute_enum Module Documentation Function properties Enumerator: CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK The maximum number of threads per block.25. so a binary version 1.3.3.3. CU_FUNC_ATTRIBUTE_PTX_VERSION The PTX virtual architecture version for which the function was compiled. This value is the major PTX version ∗ 10 + the minor PTX version.3. beyond which a launch of the function would fail.25.13 enum CUgraphicsRegisterFlags_enum Flags to register a graphics resource 4. CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES The size in bytes of local memory used by each thread of this function.15 enum CUjit_option_enum Online compiler options Enumerator: CU_JIT_MAX_REGISTERS Max number of registers that a thread may use.12 enum CUgraphicsMapResourceFlags_enum Flags for mapping and unmapping interop resources 4.

This restricts the resource utilization fo the compiler (e. with 4 being the default and highest level of optimizations. Option type: unsigned int CU_JIT_WALL_TIME Returns a float value in the option of the wall clock time.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. 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.4). 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.g. 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 .0 Compute device class 1.3.2 Compute device class 1.4.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. such as shared memory utilization.0 Compute device class 2. Option type: unsigned int for enumerated type CUjit_fallback_enum 4. in milliseconds. Choice is based on supplied CUjit_fallback_enum. 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.25. 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. Note.1 Generated for NVIDIA CUDA Library by Doxygen .1 Compute device class 1.3 Compute device class 2. max registers) such that a block with the given number of threads should be able to launch based on register limitations. Option type: unsigned int CU_JIT_TARGET_FROM_CUCONTEXT No option value required. this option does not currently take into account any other resource limitations.

164 4.3.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 .25.25.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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

• CU_JIT_ERROR_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. possible values are: – CU_PREFER_PTX – CU_PREFER_BINARY Parameters: module . • CU_JIT_THREADS_PER_BLOCK: (unsigned int) input specifies number of threads per block to target compilation for. 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. CUDA_ERROR_NO_BINARY_FOR_GPU. with 4 being the default and highest level. CUDA_ERROR_NOT_INITIALIZED. CUDA_ERROR_INVALID_CONTEXT.Option values for JIT Returns: CUDA_SUCCESS. in milliseconds. • CU_JIT_INFO_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_SHARED_OBJECT_INIT_FAILED Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_INVALID_VALUE.4). • 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). CUDA_ERROR_OUT_OF_MEMORY.186 Module Documentation • CU_JIT_MAX_REGISTERS: (unsigned int) input specifies the maximum number of registers per thread.Options for JIT optionValues . spent compiling the PTX code.Returned module image . • CU_JIT_TARGET: (unsigned int for enumerated type CUjit_target_enum) input is the compilation target based on supplied CUjit_target_enum. output is the number of bytes filled with messages. CUDA_ERROR_DEINITIALIZED. • 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: (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). CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND.Module data to load numOptions . • CU_JIT_OPTIMIZATION_LEVEL: (unsigned int) input is the level of optimization to apply to generated code (0 .Number of options options . output returns the number of threads the compiler actually targeted.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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_-

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Dimension am .250 Parameters: hTexRef . cuTexRefSetFilterMode. CUfilter_mode_enum is defined as: typedef enum CUfilter_mode_enum { CU_TR_FILTER_MODE_POINT = 0. CUarray hArray.36. Note that this call has no effect if hTexRef is bound to linear memory. cuTexRefGetFlags. CUDA_ERROR_NOT_INITIALIZED.2. cuTexRefGetArray. cuTexRefSetFilterMode. cuTexRefGetAddress. CUDA_ERROR_INVALID_VALUE See also: CUDA_- cuTexRefSetAddress.Texture reference to bind hArray .36.Options (must be CU_TRSA_OVERRIDE_FORMAT) Returns: CUDA_SUCCESS.Array to bind Flags . cuTexRefGetFormat CUDA_- 4. ERROR_INVALID_CONTEXT. cuTexRefSetAddressMode. cuTexRefGetAddressMode. cuTexRefGetFormat 4. cuTexRefGetAddressMode.Texture reference dim . CUDA_ERROR_DEINITIALIZED. cuTexRefGetAddress. 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. Flags must be set to CU_TRSA_OVERRIDE_FORMAT. CUDA_ERROR_INVALID_VALUE See also: cuTexRefSetAddress. cuTexRefSetArray. CUDA_ERROR_DEINITIALIZED. CU_TR_FILTER_MODE_LINEAR = 1 } CUfilter_mode. cuTexRefSetFlags. cuTexRefGetFilterMode. cuTexRefGetArray. CUDA_ERROR_NOT_INITIALIZED. cuTexRefGetFilterMode. cuTexRefGetFlags. Parameters: hTexRef .2. cuTexRefSetAddress2D. cuTexRefSetAddress2D. Parameters: hTexRef . cuTexRefSetFlags.11 CUresult cuTexRefSetFilterMode (CUtexref hTexRef. cuTexRefSetFormat. ERROR_INVALID_CONTEXT.Texture reference Generated for NVIDIA CUDA Library by Doxygen . unsigned int Flags) Binds the CUDA array hArray to the texture reference hTexRef. CUfilter_mode fm) Specifies the filtering mode fm to be used when reading memory through the texture reference hTexRef. Any CUDA array previously bound to hTexRef is unbound.10 CUresult cuTexRefSetArray (CUtexref hTexRef.

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

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

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

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

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

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

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

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

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

asynchronous launches. See also: cuGraphicsMapResources 4. If resource is invalid then CUDA_ERROR_INVALID_HANDLE is returned. CUDA_ERROR_NOT_INITIALIZED. If any of resources are not presently mapped for access by CUDA then CUDA_ERROR_NOT_MAPPED is returned.Number of resources to unmap resources . If resources includes any duplicate entries then CUDA_ERROR_INVALID_HANDLE is returned.260 Returns: Module Documentation CUDA_SUCCESS. CUDA_ERROR_INVALID_CONTEXT.Resource to unregister Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_NOT_MAPPED.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.Resources to unmap hStream . CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous.Stream with which to synchronize Returns: CUDA_SUCCESS.2. CUDA_ERROR_NOT_MAPPED CUDA_ERROR_NOT_MAPPED_AS_ARRAY Note: Note that this function may also return error codes from previous. the resources in resources may not be accessed by CUDA until they are mapped again. CUDA_ERROR_INVALID_HANDLE.6 CUresult cuGraphicsUnregisterResource (CUgraphicsResource resource) Unregisters the graphics resource resource so it is not accessible by CUDA unless registered again. CUDA_ERROR_INVALID_HANDLE. CUDA_ERROR_NOT_INITIALIZED. Parameters: resource . CUDA_ERROR_DEINITIALIZED.39.5 CUresult cuGraphicsUnmapResources (unsigned int count. Once unmapped. CUstream hStream) Unmaps the count graphics resources in resources. CUDA_ERROR_DEINITIALIZED. asynchronous launches. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_INVALID_VALUE. CUgraphicsResource ∗ resources.2. See also: cuGraphicsResourceGetMappedPointer 4. Parameters: count .

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

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

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

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

41 OpenGL Interoperability [DEPRECATED] 265 4.2 4.41.41. 4. • CUresult cuGLMapBufferObject (CUdeviceptr ∗dptr. CUstream hStream) Unmaps an OpenGL buffer object. • CUresult cuGLUnmapBufferObjectAsync (GLuint buffer. size_t ∗size. • CUresult cuGLRegisterBufferObject (GLuint buffer) Registers an OpenGL buffer object. 4.4. • CUresult cuGLUnmapBufferObject (GLuint buffer) Unmaps 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.1 Detailed Description This section describes deprecated OpenGL interoperability functionality. • CUresult cuGLSetBufferObjectMapFlags (GLuint buffer. GLuint buffer.1 Typedef Documentation typedef enum CUGLmap_flags_enum CUGLmap_flags Flags to map or unmap a resource Generated for NVIDIA CUDA Library by Doxygen .2. unsigned int Flags) Set the map flags for an OpenGL buffer object. GLuint buffer) Maps an OpenGL buffer object. size_t ∗size.41. • CUresult cuGLUnregisterBufferObject (GLuint buffer) Unregister an OpenGL buffer object. • CUresult cuGLMapBufferObjectAsync (CUdeviceptr ∗dptr. CUstream hStream) Maps an OpenGL buffer object.

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

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

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

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

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

• CUresult cuD3D9CtxCreateOnDevice (CUcontext ∗pCtx. unsigned int flags. unsigned int Flags) Register a Direct3D 9 resource for access by CUDA. • CUresult cuD3D9GetDirect3DDevice (IDirect3DDevice9 ∗∗ppD3DDevice) Get the Direct3D 9 device against which the current CUDA context was created. IDirect3DResource9 ∗pD3DResource. CU_D3D9_DEVICE_LIST_NEXT_FRAME = 0x03 } Functions • CUresult cuD3D9CtxCreate (CUcontext ∗pCtx. • CUresult cuD3D9GetDevices (unsigned int ∗pCudaDeviceCount. unsigned int cudaDeviceCount. unsigned int Flags. const char ∗pszAdapterName) Gets the CUDA device corresponding to a display adapter. • CUresult cuGraphicsD3D9RegisterResource (CUgraphicsResource ∗pCudaResource. IDirect3DDevice9 ∗pD3DDevice) Create a CUDA context for interoperability with Direct3D 9. • CUresult cuD3D9GetDevice (CUdevice ∗pCudaDevice.4. IDirect3DDevice9 ∗pD3DDevice.42. Generated for NVIDIA CUDA Library by Doxygen . 4. CUd3d9DeviceList deviceList) Gets the CUDA devices corresponding to a Direct3D 9 device. CUdevice cudaDevice) Create a CUDA context for interoperability with Direct3D 9.1 Detailed Description This section describes the Direct3D 9 interoperability functions of the low-level CUDA driver application programming interface. CUdevice ∗pCudaDevice.42 Direct3D 9 Interoperability 271 4. IDirect3DDevice9 ∗pD3D9Device. CUdevice ∗pCudaDevices. 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.

Context creation flags (see cuCtxCreate() for details) pD3DDevice . The created CUcontext will be returned in ∗pCtx.42.1 Function Documentation CUresult cuD3D9CtxCreate (CUcontext ∗ pCtx. This reference count will be decremented upon destruction of this context through cuCtxDestroy(). this call will increase the internal reference count on pD3DDevice.272 Module Documentation 4. CUDA_ERROR_INVALID_VALUE. If pCudaDevice is non-NULL then the CUdevice on which this CUDA context was created will be returned in ∗pCudaDevice.3.4.42.42. This context will cease to function if pD3DDevice is destroyed or encounters an error. unsigned int Flags.Direct3D device to create interoperability context with Returns: CUDA_SUCCESS.Returned newly created CUDA context pCudaDevice .42.4 4. CUdevice ∗ pCudaDevice.42. CUDA_ERROR_OUT_OF_MEMORY.2.2 4. and associates the created CUDA context with the calling thread. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. See also: cuD3D9GetDevice.42. Parameters: pCtx . CUDA_ERROR_DEINITIALIZED. enables interoperability for that context with the Direct3D device pD3DDevice.1 Typedef Documentation typedef enum CUd3d9DeviceList_enum CUd3d9DeviceList CUDA devices corresponding to a D3D9 device 4. On success. Direct3D resources from this device may be registered and mapped through the lifetime of this CUDA context. cuGraphicsD3D9RegisterResource Generated for NVIDIA CUDA Library by Doxygen .Returned pointer to the device on which the context was created Flags . asynchronous launches. IDirect3DDevice9 ∗ pD3DDevice) Creates a new CUDA context.3 4.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. CUDA_ERROR_NOT_INITIALIZED.

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

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

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

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

• CUresult cuD3D9ResourceGetMappedPitch (size_t ∗pPitch. unsigned int Level) Get an array through which to access a subresource of a Direct3D resource which has been mapped for access by CUDA. unsigned int Level) Get the pointer through which to access a subresource of a Direct3D resource which has been mapped for access by CUDA. unsigned int Face. IDirect3DResource9 ∗∗ppResource) Map Direct3D resources for access by CUDA. unsigned int Level) Get the dimensions of a registered surface. size_t ∗pPitchSlice.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. • CUresult cuD3D9UnmapResources (unsigned int count. IDirect3DResource9 ∗∗ppResource) Unmaps Direct3D resources. • CUresult cuD3D9ResourceGetMappedSize (size_t ∗pSize. unsigned int Level) Get the size 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. IDirect3DResource9 ∗pResource. unsigned int Face.43 Direct3D 9 Interoperability [DEPRECATED] 277 4. IDirect3DResource9 ∗pResource. unsigned int Face. unsigned int Face. • CUresult cuD3D9ResourceGetMappedPointer (CUdeviceptr ∗pDevPtr. IDirect3DResource9 ∗pResource. size_t ∗pDepth. unsigned int Flags) Register a Direct3D resource for access by CUDA. size_t ∗pHeight. • CUresult cuD3D9UnregisterResource (IDirect3DResource9 ∗pResource) Unregister a Direct3D resource. unsigned int Face. unsigned int Level) Get the pitch of a subresource of a Direct3D resource which has been mapped for access by CUDA. IDirect3DResource9 ∗pResource. • CUresult cuD3D9ResourceSetMapFlags (IDirect3DResource9 ∗pResource.4. IDirect3DResource9 ∗pResource. • CUresult cuD3D9ResourceGetSurfaceDimensions (size_t ∗pWidth. • CUresult cuD3D9RegisterResource (IDirect3DResource9 ∗pResource. • CUresult cuD3D9ResourceGetMappedArray (CUarray ∗pArray. Generated for NVIDIA CUDA Library by Doxygen .

If any of ppResource are presently mapped for access by CUDA.4.2 typedef enum CUd3d9register_flags_enum CUd3d9register_flags Flags to register a resource 4.4 4. This function provides the synchronization guarantee that any Direct3D calls issued before cuD3D9MapResources() will complete before any CUDA kernels issued after cuD3D9MapResources() begin. Maps the count Direct3D resources in ppResource for access by CUDA.43. 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.0.1 Typedef Documentation typedef enum CUd3d9map_flags_enum CUd3d9map_flags Flags to map or unmap a resource 4.3. 4.43.278 Module Documentation 4.43.1 Function Documentation CUresult cuD3D9MapResources (unsigned int count. then CUDA_ERROR_ALREADY_MAPPED is returned. If any of ppResource have not been registered for use with CUDA or if ppResource contains any duplicate entries. then CUDA_ERROR_INVALID_HANDLE is returned. Direct3D should not access any resources while they are mapped by CUDA.Number of resources in ppResource ppResource .2 4.3 4.3.43.2 enum CUd3d9register_flags_enum Flags to register a resource 4.43.2.43.43.1 Detailed Description This section describes deprecated Direct3D 9 interoperability functionality. Parameters: count .1 Enumeration Type Documentation enum CUd3d9map_flags_enum Flags to map or unmap a resource 4.2.43. If an application does so the results are undefined.Resources to map for CUDA usage Generated for NVIDIA CUDA Library by Doxygen .43.

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

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

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

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

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

CUDA_ERROR_INVALID_HANDLE 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. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_ALREADY_MAPPED Note: Note that this function may also return error codes from previous. Parameters: pResource . The Flags argument may be any of the following: • CU_D3D9_MAPRESOURCE_FLAGS_NONE: Specifies no hints about how this resource will be used. unsigned int Flags) 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. See also: cuGraphicsResourceSetMapFlags Generated for NVIDIA CUDA Library by Doxygen . then CUDA_ERROR_ALREADY_MAPPED is returned. CUDA_ERROR_NOT_INITIALIZED.43. See also: cuGraphicsSubResourceGetMappedArray 4. This is the default value. asynchronous launches. CUDA_ERROR_DEINITIALIZED. • 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. CUDA_ERROR_INVALID_CONTEXT. CUDA_ERROR_INVALID_HANDLE. CUDA_ERROR_NOT_INITIALIZED.Face of resource to access Level . CUDA_ERROR_INVALID_VALUE.Level of resource to access Returns: Module Documentation CUDA_SUCCESS.8 CUresult cuD3D9ResourceSetMapFlags (IDirect3DResource9 ∗ pResource.Registered resource to set flags for Flags . Changes to Flags will take effect the next time pResource is mapped. If pResource is presently mapped for access by CUDA. If pResource has not been registered for use with CUDA.Registered resource to access Face .284 pResource . asynchronous launches. then CUDA_ERROR_INVALID_HANDLE is returned. Set Flags for mapping the Direct3D resource pResource. CUDA_ERROR_DEINITIALIZED.Parameters for resource mapping Returns: CUDA_SUCCESS. • CU_D3D9_MAPRESOURCE_FLAGS_READONLY: Specifies that CUDA kernels which access this resource will not write to this resource.4.0. CUDA_ERROR_INVALID_VALUE.

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

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

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

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

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

4. CUDA_ERROR_NOT_INITIALIZED. • ID3D10Buffer: may be accessed through a device pointer. • The primary rendertarget may not be registered with CUDA. The following are some limitations.Direct3D resource to register Flags . Generated for NVIDIA CUDA Library by Doxygen . asynchronous launches. CUDA_ERROR_INVALID_VALUE. The type of pD3DResource must be one of the following. 2. or 32-bit integer or floating-point data cannot be shared. Parameters: pCudaResource . CUDA_ERROR_DEINITIALIZED. CUDA_ERROR_INVALID_HANDLE. If Flags is not one of the above specified value then CUDA_ERROR_INVALID_VALUE is returned. This reference count will be decremented when this resource is unregistered through cuGraphicsUnregisterResource(). CUDA_ERROR_INVALID_CONTEXT.Parameters for resource registration Returns: CUDA_SUCCESS. This call is potentially high-overhead and should not be called every frame in interactive applications. If pD3DResource cannot be registered then CUDA_ERROR_UNKNOWN is returned.290 4. 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. 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. On success this call will increase the internal reference count on pD3DResource. unsigned int Flags) Registers the Direct3D 10 resource pD3DResource for access by CUDA and returns a CUDA handle to pD3Dresource in pCudaResource. • Textures which are not of a format which is 1.6 Module Documentation CUresult cuGraphicsD3D10RegisterResource (CUgraphicsResource ∗ pCudaResource. • Surfaces of depth or stencil formats cannot be shared.Returned graphics resource handle pD3DResource . • 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.44. If Direct3D interoperability is not initialized for this context using cuD3D10CtxCreate then CUDA_ERROR_INVALID_CONTEXT is returned. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. 16. or 4 channels of 8. • Resources allocated as shared may not be registered with CUDA. ID3D10Resource ∗ pD3DResource.

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

unsigned int SubResource) Get the dimensions of a registered surface. unsigned int SubResource) size_t ∗pPitchSlice. unsigned int SubResource) Get an array through which to access a subresource of a Direct3D resource which has been mapped for access by CUDA. Generated for NVIDIA CUDA Library by Doxygen . • CUresult cuD3D10ResourceGetMappedPointer (CUdeviceptr ∗pDevPtr. • CUresult cuD3D10ResourceGetMappedSize (size_t ∗pSize. size_t ∗pDepth. • CUresult cuD3D10ResourceGetMappedPitch (size_t ∗pPitch.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. ID3D10Resource ∗pResource. unsigned int Flags) Register a Direct3D resource for access by CUDA. ID3D10Resource ∗pResource.292 Module Documentation 4. • CUresult cuD3D10UnregisterResource (ID3D10Resource ∗pResource) Unregister a Direct3D resource. • CUresult cuD3D10ResourceSetMapFlags (ID3D10Resource ∗pResource. unsigned int SubResource) Get the size of a subresource of a Direct3D resource which has been mapped for access by CUDA. • CUresult cuD3D10ResourceGetMappedArray (CUarray ∗pArray. unsigned int Flags) Set usage flags for mapping a Direct3D resource. ∗pResource. size_t ∗pHeight. ID3D10Resource ∗∗ppResources) Map Direct3D resources for access by CUDA. • CUresult cuD3D10ResourceGetSurfaceDimensions (size_t ∗pWidth. • CUresult cuD3D10RegisterResource (ID3D10Resource ∗pResource. 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 cuD3D10UnmapResources (unsigned int count. ID3D10Resource Get the pitch of a subresource of a Direct3D resource which has been mapped for access by CUDA. ID3D10Resource ∗pResource. ID3D10Resource ∗∗ppResources) Unmap Direct3D resources. ID3D10Resource ∗pResource.

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

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

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

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

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

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

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

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

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

CUdevice ∗ pCudaDevice.4.4.3.Context creation flags (see cuCtxCreate() for details) pD3DDevice . and associates the created CUDA context with the calling thread.Returned pointer to the device on which the context was created Flags .2 CUresult cuD3D11CtxCreateOnDevice (CUcontext ∗ pCtx. CUDA_ERROR_OUT_OF_MEMORY. unsigned int 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. Generated for NVIDIA CUDA Library by Doxygen . If pCudaDevice is non-NULL then the CUdevice on which this CUDA context was created will be returned in ∗pCudaDevice.46.46. cuGraphicsD3D11RegisterResource 4.Direct3D device to create interoperability context with Returns: CUDA_SUCCESS. The created CUcontext will be returned in ∗pCtx. On success. CUDA_ERROR_INVALID_VALUE.302 Module Documentation 4. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. CUDA_ERROR_DEINITIALIZED. This context will cease to function if pD3DDevice is destroyed or encounters an error.4 4.1 Function Documentation CUresult cuD3D11CtxCreate (CUcontext ∗ pCtx. ID3D11Device ∗ pD3DDevice) Creates a new CUDA context.46. Parameters: pCtx . This reference count will be decremented upon destruction of this context through cuCtxDestroy(). See also: cuD3D11GetDevice. asynchronous launches. enables interoperability for that context with the Direct3D device pD3DDevice. unsigned int Flags. Direct3D resources from this device may be registered and mapped through the lifetime of this CUDA context. CUdevice cudaDevice) Creates a new CUDA context. Direct3D resources from this device may be registered and mapped through the lifetime of this CUDA context.Returned newly created CUDA context pCudaDevice . CUDA_ERROR_NOT_INITIALIZED. The created CUcontext will be returned in ∗pCtx.3 4.46. enables interoperability for that context with the Direct3D device pD3DDevice. ID3D11Device ∗ pD3DDevice. and associates the created CUDA context with the calling thread. this call will increase the internal reference count on pD3DDevice.46.

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

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

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

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

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

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

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

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

2 Flags 5.1.1 Detailed Description 3D array descriptor 5.1.2.2.1.3 CUarray_format CUDA_ARRAY3D_DESCRIPTOR_st::Format unsigned int CUDA_ARRAY3D_DESCRIPTOR_st::Flags Array format 5.2.1.1.1 Field Documentation size_t CUDA_ARRAY3D_DESCRIPTOR_st::Depth Depth of 3D array 5.Chapter 5 Data Structure Documentation 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.2.1.2 5.4 size_t CUDA_ARRAY3D_DESCRIPTOR_st::Height Height of 3D array .

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

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

314 Data Structure Documentation 5.1 Field Documentation CUarray CUDA_MEMCPY2D_st::dstArray Destination array reference 5.2.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.3.3. device.3.3.3 void∗ CUDA_MEMCPY2D_st::dstHost Destination host pointer 5.3.2. array) 5.2 CUdeviceptr CUDA_MEMCPY2D_st::dstDevice Destination device pointer 5.2 5.5 size_t CUDA_MEMCPY2D_st::dstPitch Destination pitch (ignored when dst is array) Generated for NVIDIA CUDA Library by Doxygen .3.4 CUmemorytype CUDA_MEMCPY2D_st::dstMemoryType Destination memory type (host.2.3.2.

8 size_t CUDA_MEMCPY2D_st::Height Height of 2D memory copy 5.2.7 size_t CUDA_MEMCPY2D_st::dstY Destination Y 5.5.3.11 const void∗ CUDA_MEMCPY2D_st::srcHost Source host pointer 5.12 CUmemorytype CUDA_MEMCPY2D_st::srcMemoryType Source memory type (host. device.3.2.2.6 size_t CUDA_MEMCPY2D_st::dstXInBytes 315 Destination X in bytes 5.2. array) 5.3.3.3.2.14 size_t CUDA_MEMCPY2D_st::srcXInBytes Source X in bytes 5.3 CUDA_MEMCPY2D_st Struct Reference 5.2.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 .10 CUdeviceptr CUDA_MEMCPY2D_st::srcDevice Source device pointer 5.3.2.2.3.3.3.9 CUarray CUDA_MEMCPY2D_st::srcArray Source array reference 5.3.3.2.15 Source Y 5.13 size_t CUDA_MEMCPY2D_st::srcPitch Source pitch (ignored when src is array) 5.2.2.

4.4.1 Detailed Description 3D memory copy parameters 5.316 Data Structure Documentation 5.2 CUarray CUDA_MEMCPY3D_st::dstArray Destination array reference 5.1 Field Documentation size_t CUDA_MEMCPY3D_st::Depth Depth of 3D memory copy 5.2.4.2 5.2.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.4.2.4.3 CUdeviceptr CUDA_MEMCPY3D_st::dstDevice Destination device pointer Generated for NVIDIA CUDA Library by Doxygen .

2.6 size_t CUDA_MEMCPY3D_st::dstLOD Destination LOD 5.4 CUDA_MEMCPY3D_st Struct Reference 5. device.4.8 size_t CUDA_MEMCPY3D_st::dstPitch Destination pitch (ignored when dst is array) 5. array) 5.15 CUarray CUDA_MEMCPY3D_st::srcArray Source array reference Generated for NVIDIA CUDA Library by Doxygen .4 size_t CUDA_MEMCPY3D_st::dstHeight 317 Destination height (ignored when dst is array.11 size_t CUDA_MEMCPY3D_st::dstZ Destination Z 5.4.2.4.2.4.2.2.10 size_t CUDA_MEMCPY3D_st::dstY Destination Y 5.4.7 CUmemorytype CUDA_MEMCPY3D_st::dstMemoryType Destination memory type (host.2.2.4. may be 0 if Depth==1) 5.4.5.4.4.2.2.13 void∗ CUDA_MEMCPY3D_st::reserved0 Must be NULL 5.12 size_t CUDA_MEMCPY3D_st::Height Height of 3D memory copy 5.2.4.4.14 void∗ CUDA_MEMCPY3D_st::reserved1 Must be NULL 5.4.2.5 void∗ CUDA_MEMCPY3D_st::dstHost Destination host pointer 5.9 size_t CUDA_MEMCPY3D_st::dstXInBytes Destination X in bytes 5.2.

2.2.4.4.4.4.2.2.19 size_t CUDA_MEMCPY3D_st::srcLOD Source LOD 5.2.2. array) 5.4.21 size_t CUDA_MEMCPY3D_st::srcPitch Source pitch (ignored when src is array) 5.24 Source Z 5.17 size_t CUDA_MEMCPY3D_st::srcHeight Source height (ignored when src is array.2.4.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 .4.318 5. may be 0 if Depth==1) 5.2.16 CUdeviceptr CUDA_MEMCPY3D_st::srcDevice Data Structure Documentation Source device pointer 5.18 const void∗ CUDA_MEMCPY3D_st::srcHost Source host pointer 5.2.4.4.4.2.22 size_t CUDA_MEMCPY3D_st::srcXInBytes Source X in bytes 5.20 CUmemorytype CUDA_MEMCPY3D_st::srcMemoryType Source memory type (host. device.23 Source Y 5.

1 Field Documentation enum cudaChannelFormatKind cudaChannelFormatDesc::f Channel format kind 5.5 cudaChannelFormatDesc Struct Reference 319 5.5.5 cudaChannelFormatDesc Struct Reference Data Fields • • • • • enum cudaChannelFormatKind f int w int x int y int z 5.2.2.1 Detailed Description CUDA Channel format descriptor 5.5 z int cudaChannelFormatDesc::z int cudaChannelFormatDesc::y int cudaChannelFormatDesc::x int cudaChannelFormatDesc::w Generated for NVIDIA CUDA Library by Doxygen .2.5.4 y 5.2.5.2.3 x 5.5.5.5.5.2 5.5.2 w 5.

6.1 Detailed Description CUDA device properties 5.2.320 Data Structure Documentation 5.6.6.2 int cudaDeviceProp::clockRate Clock frequency in kilohertz Generated for NVIDIA CUDA Library by Doxygen .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.2.6.1 Field Documentation int cudaDeviceProp::canMapHostMemory Device can map host memory with cudaHostAlloc/cudaHostGetDevicePointer 5.2 5.

6.2.2.2.2.6.11 int cudaDeviceProp::maxTexture1D Maximum 1D texture size 5.6.2.2.6.6.14 int cudaDeviceProp::maxTexture3D[3] Maximum 3D texture dimensions Generated for NVIDIA CUDA Library by Doxygen .6.6 cudaDeviceProp Struct Reference 5.6.4 int cudaDeviceProp::concurrentKernels Device can possibly execute multiple kernels concurrently 5.6.3 int cudaDeviceProp::computeMode 321 Compute mode (See cudaComputeMode) 5.6.2.6.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.7 int cudaDeviceProp::integrated Device is integrated as opposed to discrete 5.5.12 int cudaDeviceProp::maxTexture2D[2] Maximum 2D texture dimensions 5.2.6.2.6 int cudaDeviceProp::ECCEnabled Device has ECC support enabled 5.6.2.10 int cudaDeviceProp::maxGridSize[3] Maximum size of each dimension of a grid 5.9 int cudaDeviceProp::major Major compute capability 5.5 int cudaDeviceProp::deviceOverlap Device can concurrently copy memory and execute a kernel 5.2.2.

6.22 int cudaDeviceProp::pciDeviceID PCI device ID of the device 5.2.6.2.19 int cudaDeviceProp::multiProcessorCount Number of multiprocessors on device 5.17 size_t cudaDeviceProp::memPitch Maximum pitch in bytes allowed by memory copies 5.21 int cudaDeviceProp::pciBusID PCI bus ID of the device 5.20 char cudaDeviceProp::name[256] ASCII string identifying device 5.18 int cudaDeviceProp::minor Minor compute capability 5.16 int cudaDeviceProp::maxThreadsPerBlock Maximum number of threads per block 5.26 int cudaDeviceProp::tccDriver 1 if device is a Tesla device using TCC driver.2.6.6.2.6.15 int cudaDeviceProp::maxThreadsDim[3] Data Structure Documentation Maximum size of each dimension of a block 5.2.2.23 int cudaDeviceProp::regsPerBlock 32-bit registers available per block 5. 0 otherwise Generated for NVIDIA CUDA Library by Doxygen .6.25 size_t cudaDeviceProp::surfaceAlignment Alignment requirements for surfaces 5.6.6.2.6.6.6.2.6.2.2.2.24 size_t cudaDeviceProp::sharedMemPerBlock Shared memory available per block in bytes 5.2.322 5.

2.29 size_t cudaDeviceProp::totalGlobalMem Global memory available on device in bytes 5.30 int cudaDeviceProp::warpSize Warp size in threads Generated for NVIDIA CUDA Library by Doxygen .5.6.6.6 cudaDeviceProp Struct Reference 5.2.28 size_t cudaDeviceProp::totalConstMem Constant memory available on device in bytes 5.27 size_t cudaDeviceProp::textureAlignment 323 Alignment requirement for textures 5.6.2.6.2.

2 size_t cudaExtent::height Height in elements 5.2.7 cudaExtent Struct Reference Data Fields • size_t depth • size_t height • size_t width 5.1 Detailed Description CUDA extent See also: make_cudaExtent 5.7.324 Data Structure Documentation 5. in bytes when referring to linear memory Generated for NVIDIA CUDA Library by Doxygen .2.3 size_t cudaExtent::width Width in elements when referring to array memory.7.7.2.1 Field Documentation size_t cudaExtent::depth Depth in elements 5.7.2 5.7.

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

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

5 enum cudaMemcpyKind cudaMemcpy3DParms::kind Type of transfer 5.9 cudaMemcpy3DParms Struct Reference 327 5.5.1 Field Documentation struct cudaArray∗ cudaMemcpy3DParms::dstArray [read] Destination memory address 5.6 struct cudaArray∗ cudaMemcpy3DParms::srcArray [read] Source memory address 5.9.2 struct cudaPos cudaMemcpy3DParms::dstPos [read] Destination position offset 5.2.2.9.1 Detailed Description CUDA 3D memory copying parameters 5.9.2.9.9.2.9.2 5.3 struct cudaPitchedPtr cudaMemcpy3DParms::dstPtr [read] Pitched destination memory address 5.2.9.2.7 struct cudaPos cudaMemcpy3DParms::srcPos [read] Source position offset Generated for NVIDIA CUDA Library by Doxygen .9.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.4 struct cudaExtent cudaMemcpy3DParms::extent [read] Requested memory copy size 5.9.

9.8 struct cudaPitchedPtr cudaMemcpy3DParms::srcPtr [read] Data Structure Documentation Pitched source memory address Generated for NVIDIA CUDA Library by Doxygen .2.328 5.

10.2 5.2.10.2 void∗ cudaPitchedPtr::ptr Pointer to allocated memory 5.10 cudaPitchedPtr Struct Reference 329 5.2.10.10 cudaPitchedPtr Struct Reference Data Fields • • • • size_t pitch void ∗ ptr size_t xsize size_t ysize 5.10.5.10.1 Field Documentation size_t cudaPitchedPtr::pitch Pitch of allocated memory in bytes 5.1 Detailed Description CUDA Pitched memory pointer See also: make_cudaPitchedPtr 5.2.3 size_t cudaPitchedPtr::xsize Logical width of allocation in elements 5.4 size_t cudaPitchedPtr::ysize Logical height of allocation in elements Generated for NVIDIA CUDA Library by Doxygen .10.2.

11.330 Data Structure Documentation 5.2.11.2.1 Detailed Description CUDA 3D position See also: make_cudaPos 5.11.11.2 5.2.3 z Field Documentation size_t cudaPos::x size_t cudaPos::y size_t cudaPos::z Generated for NVIDIA CUDA Library by Doxygen .1 x 5.11.11 cudaPos Struct Reference Data Fields • size_t x • size_t y • size_t z 5.2 y 5.

5 int CUdevprop_st::memPitch Maximum pitch in bytes allowed by memory copies 5.2.12.1 Field Documentation int CUdevprop_st::clockRate Clock frequency in kilohertz 5.12 CUdevprop_st Struct Reference 331 5.12.2.2 5.2.12.5.12.7 int CUdevprop_st::sharedMemPerBlock Shared memory available per block in bytes Generated for NVIDIA CUDA Library by Doxygen .12.12.2.6 int CUdevprop_st::regsPerBlock 32-bit registers available per block 5.1 Detailed Description Legacy device properties 5.2 int CUdevprop_st::maxGridSize[3] Maximum size of each dimension of a grid 5.12.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.2.2.4 int CUdevprop_st::maxThreadsPerBlock Maximum number of threads per block 5.3 int CUdevprop_st::maxThreadsDim[3] Maximum size of each dimension of a block 5.2.12.

12.332 5.2.12.9 int CUdevprop_st::textureAlign Alignment requirement for textures 5.8 int CUdevprop_st::SIMDWidth Data Structure Documentation Warp size in threads 5.10 int CUdevprop_st::totalConstantMemory Constant memory available on device in bytes Generated for NVIDIA CUDA Library by Doxygen .12.2.2.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->