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

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

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

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

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

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

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

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

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

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

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

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

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

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

0. Global cuGLMapBufferObjectAsync This function is deprecated as of Cuda 3. Global cuGLRegisterBufferObject This function is deprecated as of Cuda 3.0.0.1.1.1 release. Global cudaErrorMemoryValueTooLarge This error return is deprecated as of CUDA 3. Global cuGLMapBufferObject This function is deprecated as of Cuda 3.1 release. 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.0.0.0.3 Global cudaErrorTextureNotBound This error return is deprecated as of CUDA 3. Global cuGLSetBufferObjectMapFlags This function is deprecated as of Cuda 3.1. Device emulation mode was removed with the CUDA 3.1 release.0. Global CUDA_ERROR_CONTEXT_ALREADY_CURRENT This error return is deprecated as of CUDA 3. It is no longer an error to attempt to push the active context via cuCtxPushCurrent(). Global cudaErrorCudartUnloading This error return is deprecated as of CUDA 3.1 release. Device emulation mode was removed with the CUDA 3. Generated for NVIDIA CUDA Library by Doxygen . Global cuGLUnmapBufferObject This function is deprecated as of Cuda 3.2.1.0. Device emulation mode was removed with the CUDA 3. Global cudaErrorSynchronizationError This error return is deprecated as of CUDA 3. Global cuGLUnmapBufferObjectAsync This function is deprecated as of Cuda 3. Global cudaErrorMixedDeviceExecution This error return is deprecated as of CUDA 3.2. Global cuGLUnregisterBufferObject This function is deprecated as of Cuda 3.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

asynchronous launches. cudaErrorUnknown Note: Note that this function may also return error codes from previous.Returns the device corresponding to pszAdapterName pszAdapterName . If no device on the adapter with name pszAdapterName is CUDA-compatible then the call will fail.10 Direct3D 9 Interoperability 71 4. Generated for NVIDIA CUDA Library by Doxygen .2.10.2.2 4.3 4.2.4.D3D9 adapter to get device for Returns: cudaSuccess.10.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.10. 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. cudaErrorInvalidValue.1 Function Documentation cudaError_t cudaD3D9GetDevice (int ∗ device.3 enum cudaD3D9RegisterFlags CUDA D3D9 Register Flags Enumerator: cudaD3D9RegisterFlagsNone Default.3.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. const char ∗ pszAdapterName) Returns in ∗device the CUDA-compatible device corresponding to the adapter name pszAdapterName obtained from EnumDisplayDevices or IDirect3D9::GetAdapterIdentifier(). Parameters: device .10.

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

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

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

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

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.76 Module Documentation 4.2 enum cudaD3D10MapFlags CUDA D3D10 Map Flags Enumerator: cudaD3D10MapFlagsNone Default. cudaErrorUnknown Note: Note that this function may also return error codes from previous.2.11.Returns the device corresponding to pAdapter pAdapter .11.11.2.1 Enumeration Type Documentation enum cudaD3D10DeviceList CUDA devices corresponding to a D3D10 device Enumerator: cudaD3D10DeviceListAll The CUDA devices for all GPUs used by a D3D10 device cudaD3D10DeviceListCurrentFrame The CUDA devices for the GPUs used by a D3D10 device in its currently rendering frame cudaD3D10DeviceListNextFrame The CUDA devices for the GPUs to be used by a D3D10 device in the next frame 4. IDXGIAdapter ∗ pAdapter) Returns in ∗device the CUDA-compatible device corresponding to the adapter pAdapter obtained from IDXGIFactory::EnumAdapters. Resource can be accessed through a void∗ cudaD3D10RegisterFlagsArray Resource can be accessed through a CUarray∗ 4.11.2 4.D3D10 adapter to get device for Returns: cudaSuccess. cudaErrorInvalidValue. This call will succeed only if a device on adapter pAdapter is Cuda-compatible.1 Function Documentation cudaError_t cudaD3D10GetDevice (int ∗ device.2. Parameters: device . asynchronous launches. Generated for NVIDIA CUDA Library by Doxygen .3 4.11.3.3 enum cudaD3D10RegisterFlags CUDA D3D10 Register Flags Enumerator: cudaD3D10RegisterFlagsNone Default.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

1.1.8 #define cudaDeviceScheduleAuto 0 Device flag .1.4.1.Automatic scheduling 4.1.12 #define cudaEventDefault 0 Default event flag 4.23.1.7 #define cudaDevicePropDontCare 139 Empty device properties 4.23.13 #define cudaEventDisableTiming 2 Event will not record timing data 4.23.16 #define cudaHostAllocPortable 1 Pinned memory accessible by all CUDA contexts 4.1.23.1.Yield default scheduling 4.1.23 Data types used by CUDA Runtime 4.15 #define cudaHostAllocMapped 2 Map allocation into device space 4.Spin default scheduling 4.23.1.10 #define cudaDeviceScheduleYield 2 Device flag .17 #define cudaHostAllocWriteCombined 4 Write-combined memory Generated for NVIDIA CUDA Library by Doxygen .11 #define cudaEventBlockingSync 1 Event uses blocking synchronization 4.14 #define cudaHostAllocDefault 0 Default page-locked allocation flag 4.9 #define cudaDeviceScheduleSpin 1 Device flag .23.23.1.23.23.23.23.

3.23.140 Module Documentation 4.3 typedef struct cudaGraphicsResource∗ cudaGraphicsResource_t CUDA graphics resource types 4.3 4.1 Typedef Documentation typedef enum cudaError cudaError_t CUDA Error types 4.2.3.23.2 typedef struct CUevent_st∗ cudaEvent_t CUDA event types 4.23.23.1 Enumeration Type Documentation enum cudaChannelFormatKind Channel format kind Enumerator: cudaChannelFormatKindSigned Signed channel format cudaChannelFormatKindUnsigned Unsigned channel format cudaChannelFormatKindFloat Float channel format cudaChannelFormatKindNone No channel format 4.2.23.23.2.23.5 typedef struct CUuuid_st cudaUUID_t CUDA UUID types 4.2.23.4 typedef struct CUstream_st∗ cudaStream_t CUDA stream 4.2.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 4.23.

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

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

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

23.6 enum cudaGraphicsMapFlags CUDA graphics interop map flags Enumerator: cudaGraphicsMapFlagsNone Default.144 Module Documentation cudaErrorStartupFailure This indicates an internal startup failure in the CUDA runtime.3. Production releases of CUDA should not return such errors. no preference cudaFuncCachePreferShared Prefer larger shared memory and smaller L1 cache cudaFuncCachePreferL1 Prefer larger L1 cache and smaller shared memory 4.23. Assume resource can be read/written cudaGraphicsMapFlagsReadOnly CUDA will not write to this resource cudaGraphicsMapFlagsWriteDiscard CUDA will only write to and will not read from this resource 4.3.3. 4. cudaErrorApiFailureBase Any unhandled CUDA driver error is added to this value and returned via the runtime.23.3.7 enum cudaGraphicsRegisterFlags CUDA graphics interop register flags Enumerator: cudaGraphicsRegisterFlagsNone Default Generated for NVIDIA CUDA Library by Doxygen .23.4 enum cudaFuncCache CUDA function cache configurations Enumerator: cudaFuncCachePreferNone Default function cache configuration.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.3.23.9 enum cudaMemcpyKind CUDA memory copy types Enumerator: cudaMemcpyHostToHost Host -> Host cudaMemcpyHostToDevice Host -> Device cudaMemcpyDeviceToHost Device -> Host cudaMemcpyDeviceToDevice Device -> Device 4.23.23.23.4.8 enum cudaLimit 145 CUDA Limits Enumerator: cudaLimitStackSize GPU thread stack size cudaLimitPrintfFifoSize GPU printf FIFO size cudaLimitMallocHeapSize GPU malloc heap size 4.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.10 enum cudaSurfaceBoundaryMode CUDA Surface boundary modes Enumerator: cudaBoundaryModeZero Zero boundary mode cudaBoundaryModeClamp Clamp boundary mode cudaBoundaryModeTrap Trap boundary mode 4.3.23.23 Data types used by CUDA Runtime 4.11 enum cudaSurfaceFormatMode CUDA Surface format modes Enumerator: cudaFormatModeForced Forced format mode cudaFormatModeAuto Auto format mode 4.

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

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

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

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

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

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

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

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

25.11 #define CUDA_VERSION 3020 Module Documentation CUDA API version number 4.25.25.154 4.3 typedef enum CUarray_cubemap_face_enum CUarray_cubemap_face Array indices for cube faces 4.9 typedef struct CUDA_ARRAY_DESCRIPTOR_st CUDA_ARRAY_DESCRIPTOR Array descriptor 4.2.1 Typedef Documentation typedef enum CUaddress_mode_enum CUaddress_mode Texture reference addressing modes 4.2.2.6 typedef struct CUctx_st∗ CUcontext CUDA context 4.7 typedef enum CUctx_flags_enum CUctx_flags Context creation flags 4.25.2.2.25.2.4 typedef enum CUarray_format_enum CUarray_format Array formats 4.25.2.5 typedef enum CUcomputemode_enum CUcomputemode Compute Modes 4.25.25.25.8 typedef struct CUDA_ARRAY3D_DESCRIPTOR_st CUDA_ARRAY3D_DESCRIPTOR 3D array descriptor 4.1.2 typedef struct CUarray_st∗ CUarray CUDA array 4.2.25.25.25.2 4.2.10 typedef struct CUDA_MEMCPY2D_st CUDA_MEMCPY2D 2D memory copy parameters Generated for NVIDIA CUDA Library by Doxygen .2.

25.2.25.18 typedef enum CUfilter_mode_enum CUfilter_mode Texture reference filtering modes 4.25.25.25 Data types used by CUDA driver 4.25.2.2.2.25.25.2.25.19 typedef enum CUfunc_cache_enum CUfunc_cache Function cache configurations 4.16 typedef struct CUevent_st∗ CUevent CUDA event 4.2.14 typedef unsigned int CUdeviceptr CUDA device pointer 4.4.15 typedef struct CUdevprop_st CUdevprop Legacy device properties 4.12 typedef int CUdevice CUDA device 4.25.25.2.11 typedef struct CUDA_MEMCPY3D_st CUDA_MEMCPY3D 155 3D memory copy parameters 4.25.2.2.2.20 typedef struct CUfunc_st∗ CUfunction CUDA function 4.21 typedef enum CUfunction_attribute_enum CUfunction_attribute Function properties 4.25.17 typedef enum CUevent_flags_enum CUevent_flags Event creation flags 4.2.2.13 typedef enum CUdevice_attribute_enum CUdevice_attribute Device properties 4.22 typedef enum CUgraphicsMapResourceFlags_enum CUgraphicsMapResourceFlags Flags for mapping and unmapping interop resources Generated for NVIDIA CUDA Library by Doxygen .

27 typedef enum CUjit_target_enum CUjit_target Online compilation targets 4.2.25.31 Error codes 4.26 typedef enum CUjit_option_enum CUjit_option Online compiler options 4.2.2.25.24 typedef struct CUgraphicsResource_st∗ CUgraphicsResource CUDA graphics interop resource 4.25.25.25.156 4.25.25.2.2.2.25.2.29 typedef enum CUmemorytype_enum CUmemorytype typedef enum CUlimit_enum CUlimit Memory types 4.2.25.25.25.34 typedef struct CUtexref_st∗ CUtexref CUDA texture reference Generated for NVIDIA CUDA Library by Doxygen .2.30 typedef struct CUmod_st∗ CUmodule CUDA module 4.32 typedef struct CUstream_st∗ CUstream typedef enum cudaError_enum CUresult CUDA stream 4.25 typedef enum CUjit_fallback_enum CUjit_fallback Cubin matching fallback strategies 4.2.2.23 typedef enum CUgraphicsRegisterFlags_enum CUgraphicsRegisterFlags Module Documentation Flags to register a graphics resource 4.2.28 Limits 4.25.33 typedef struct CUsurfref_st∗ CUsurfref CUDA surface reference 4.

25.3 enum CUarray_format_enum Array formats Enumerator: CU_AD_FORMAT_UNSIGNED_INT8 Unsigned 8-bit integers CU_AD_FORMAT_UNSIGNED_INT16 Unsigned 16-bit integers CU_AD_FORMAT_UNSIGNED_INT32 Unsigned 32-bit integers CU_AD_FORMAT_SIGNED_INT8 Signed 8-bit integers CU_AD_FORMAT_SIGNED_INT16 Signed 16-bit integers CU_AD_FORMAT_SIGNED_INT32 Signed 32-bit integers CU_AD_FORMAT_HALF 16-bit floating point CU_AD_FORMAT_FLOAT 32-bit floating point 4.3 4.3.4.1 Enumeration Type Documentation enum CUaddress_mode_enum Texture reference addressing modes Enumerator: CU_TR_ADDRESS_MODE_WRAP Wrapping address mode CU_TR_ADDRESS_MODE_CLAMP Clamp to edge address mode CU_TR_ADDRESS_MODE_MIRROR Mirror address mode CU_TR_ADDRESS_MODE_BORDER Border address mode 4.3.3.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.25.25.25.3.25 Data types used by CUDA driver 157 4.25.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 .

this can also mean that the operation being queried is complete (see cuEventQuery() and cuStreamQuery()). CUDA_ERROR_NO_DEVICE This indicates that no CUDA-capable devices were detected by the installed CUDA driver. Deprecated This error return is deprecated as of CUDA 3.158 Module Documentation CU_COMPUTEMODE_EXCLUSIVE Compute-exclusive mode (Only one context can be present on this device at a time) CU_COMPUTEMODE_PROHIBITED Compute-prohibited mode (No contexts can be created on this device at this time) 4. CUDA_ERROR_INVALID_VALUE This indicates that one or more of the parameters passed to the API call is not within an acceptable range of values.25. In the case of query calls.25.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. 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). This can also indicate an invalid CUDA module. CUDA_ERROR_NOT_INITIALIZED This indicates that the CUDA driver has not been initialized with cuInit() or that initialization has failed. 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. CUDA_ERROR_OUT_OF_MEMORY The API call failed because it was unable to allocate enough memory to perform the requested operation.e.3. CUDA_ERROR_DEINITIALIZED This indicates that the CUDA driver is in the process of shutting down. 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. See cuCtxGetApiVersion() for more details. CUDA_ERROR_INVALID_DEVICE This indicates that the device ordinal supplied by the user does not correspond to a valid CUDA device.2. CUDA_ERROR_INVALID_CONTEXT This most frequently indicates that there is no context bound to the current thread. 3010 context with 3020 API calls). Generated for NVIDIA CUDA Library by Doxygen . CUDA_ERROR_CONTEXT_ALREADY_CURRENT This indicated that the context being supplied as a parameter to the API call was already the active context.3.

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

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 .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. CUDA_ERROR_UNKNOWN This indicates that an unknown internal error has occurred. 4.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.

3.25.10 enum CUfunc_cache_enum Function cache configurations Enumerator: CU_FUNC_CACHE_PREFER_NONE no preference for shared memory or L1 (default) CU_FUNC_CACHE_PREFER_SHARED prefer larger shared memory and smaller L1 cache CU_FUNC_CACHE_PREFER_L1 prefer larger L1 cache and smaller shared memory Generated for NVIDIA CUDA Library by Doxygen .25 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.4.3.25.25.8 enum CUevent_flags_enum Event creation flags Enumerator: CU_EVENT_DEFAULT Default event flag CU_EVENT_BLOCKING_SYNC Event uses blocking synchronization CU_EVENT_DISABLE_TIMING Event will not record timing data 4.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.

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

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.0 Compute device class 1. Option type: unsigned int CU_JIT_WALL_TIME Returns a float value in the option of the wall clock time. 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. Note.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. Option type: unsigned int CU_JIT_TARGET_FROM_CUCONTEXT No option value required.0 Compute device class 2.2 Compute device class 1. Log messages will be capped at this size (including null terminator) OUT: Amount of log buffer filled with messages Option type: unsigned int CU_JIT_ERROR_LOG_BUFFER Pointer to a buffer in which to print any log messages from PTXAS that reflect errors (the buffer size is specified via option CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES) Option type: char∗ CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES IN: Log buffer size in bytes. Choice is based on supplied CUjit_fallback_enum. with 4 being the default and highest level of optimizations.1 Compute device class 1.4.3. Log messages will be capped at this size (including null terminator) OUT: Amount of log buffer filled with messages Option type: unsigned int CU_JIT_OPTIMIZATION_LEVEL Level of optimizations to apply to generated code (0 . Option type: unsigned int for enumerated type CUjit_fallback_enum 4.g. max registers) such that a block with the given number of threads should be able to launch based on register limitations.4). This restricts the resource utilization fo the compiler (e.1 Generated for NVIDIA CUDA Library by Doxygen . such as shared memory utilization.3 Compute device class 2.25. this option does not currently take into account any other resource limitations. 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. in milliseconds.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.

164 4.3.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.25.18 enum CUmemorytype_enum Memory types Enumerator: CU_MEMORYTYPE_HOST Host memory CU_MEMORYTYPE_DEVICE Device memory CU_MEMORYTYPE_ARRAY Array memory Generated for NVIDIA CUDA Library by Doxygen .

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

GLuint buffer) Maps an OpenGL buffer object. • CUresult cuGLUnmapBufferObjectAsync (GLuint buffer. • CUresult cuGLMapBufferObject (CUdeviceptr ∗dptr. size_t ∗size.4.41 OpenGL Interoperability [DEPRECATED] 265 4. • CUresult cuGLRegisterBufferObject (GLuint buffer) Registers an OpenGL buffer object. • CUresult cuGLUnmapBufferObject (GLuint buffer) Unmaps an OpenGL buffer object.1 Detailed Description This section describes deprecated OpenGL interoperability functionality. • CUresult cuGLSetBufferObjectMapFlags (GLuint buffer. 4. GLuint buffer. unsigned int Flags) Set the map flags for an OpenGL buffer object. • CUresult cuGLUnregisterBufferObject (GLuint buffer) Unregister an OpenGL buffer object.41.41. CUstream hStream) Maps an OpenGL buffer object. CUstream hStream) Unmaps an OpenGL buffer object.2 4.41. size_t ∗size.2. 4.1 Typedef Documentation typedef enum CUGLmap_flags_enum CUGLmap_flags Flags to map or unmap a resource Generated for NVIDIA CUDA Library by Doxygen . • CUresult cuGLMapBufferObjectAsync (CUdeviceptr ∗dptr.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 Function Documentation CUresult cuGLInit (void) Deprecated This function is deprecated as of Cuda 3.41. cuGLUnmapBufferObject.0.1 Enumeration Type Documentation enum CUGLmap_flags_enum Flags to map or unmap a resource 4. This function is deprecated and calling it is no longer required. CUDA_ERROR_MAP_FAILED Generated for NVIDIA CUDA Library by Doxygen . as the context that was bound when the buffer was registered.0. Returns: CUDA_SUCCESS.3.4 4. GLuint buffer) Deprecated This function is deprecated as of Cuda 3.41.4. Initializes OpenGL interoperability.The name of the buffer object to map Returns: CUDA_SUCCESS. CUDA_ERROR_INVALID_CONTEXT. cuGLUnmapBufferObjectAsync. CUDA_ERROR_NOT_INITIALIZED. cuWGLGetDevice CUDA_- 4. CUDA_ERROR_NOT_INITIALIZED. All streams in the current CUDA context are synchronized with the current GL context. There must be a valid OpenGL context bound to the current thread when this function is called.Returned size of mapping buffer . CUDA_ERROR_INVALID_VALUE. asynchronous launches. cuGLRegisterBufferObject.4.41. cuGLMapBufferObjectAsync. 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. cuGLUnregisterBufferObject. CUDA_ERROR_DEINITIALIZED. See also: cuGLCtxCreate. This must be the same context. cuGLMapBufferObject.2 CUresult cuGLMapBufferObject (CUdeviceptr ∗ dptr. size_t ∗ size.Returned mapped base pointer size .41. It may fail if the needed OpenGL driver facilities are not available. CUDA_ERROR_UNKNOWN Note: Note that this function may also return error codes from previous. ERROR_INVALID_CONTEXT.3 4. or a member of the same shareGroup. CUDA_ERROR_DEINITIALIZED. cuGLSetBufferObjectMapFlags.41. Parameters: dptr .266 Module Documentation 4.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

4.2.45.45.1 Function Documentation CUresult cuD3D10MapResources (unsigned int count. then CUDA_ERROR_INVALID_HANDLE is returned.3 4.2.45.45. ID3D10Resource ∗∗ ppResources) Deprecated This function is deprecated as of Cuda 3.4 4.Number of resources to map for CUDA ppResources .4.1 Enumeration Type Documentation enum CUD3D10map_flags_enum Flags to map or unmap a resource 4.45.45. 4.1 Detailed Description This section describes deprecated Direct3D 10 interoperability functionality. Maps the count Direct3D resources in ppResources for access by CUDA.3. If an application does so. Direct3D should not access any resources while they are mapped by CUDA. Parameters: count .2 4.45 Direct3D 10 Interoperability [DEPRECATED] 293 4.0.2 enum CUD3D10register_flags_enum Flags to register a resource 4.3. the results are undefined. If any of ppResources have not been registered for use with CUDA or if ppResources contains any duplicate entries. If any of ppResources are presently mapped for access by CUDA.2 typedef enum CUD3D10register_flags_enum CUD3D10register_flags Flags to register a resource 4.45. then CUDA_ERROR_ALREADY_MAPPED is returned.45. 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 cuD3D10MapResources() will complete before any CUDA kernels issued after cuD3D10MapResources() begin.1 Typedef Documentation typedef enum CUD3D10map_flags_enum CUD3D10map_flags Flags to map or unmap a resource 4.45.Resources to map for CUDA Generated for NVIDIA CUDA Library by Doxygen .

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

1 Detailed Description 3D array descriptor 5.1.3 CUarray_format CUDA_ARRAY3D_DESCRIPTOR_st::Format unsigned int CUDA_ARRAY3D_DESCRIPTOR_st::Flags Array format 5.2 Flags 5.1.1 Field Documentation size_t CUDA_ARRAY3D_DESCRIPTOR_st::Depth Depth of 3D array 5.2.Chapter 5 Data Structure Documentation 5.2.2.1.1.2 5.1.1.2.4 size_t CUDA_ARRAY3D_DESCRIPTOR_st::Height Height of 3D array .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.

6 size_t CUDA_ARRAY3D_DESCRIPTOR_st::Width Width of 3D array Generated for NVIDIA CUDA Library by Doxygen .1.312 5.2.2.5 unsigned int CUDA_ARRAY3D_DESCRIPTOR_st::NumChannels Data Structure Documentation Channels per array element 5.1.

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

2.2.3.3.1 Field Documentation CUarray CUDA_MEMCPY2D_st::dstArray Destination array reference 5.3.4 CUmemorytype CUDA_MEMCPY2D_st::dstMemoryType Destination memory type (host.5 size_t CUDA_MEMCPY2D_st::dstPitch Destination pitch (ignored when dst is array) Generated for NVIDIA CUDA Library by Doxygen .3.2.314 Data Structure Documentation 5.3.1 Detailed Description 2D memory copy parameters 5. device.2 CUdeviceptr CUDA_MEMCPY2D_st::dstDevice Destination device pointer 5.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.3 void∗ CUDA_MEMCPY2D_st::dstHost Destination host pointer 5. array) 5.2.3.3.2.2 5.

3.9 CUarray CUDA_MEMCPY2D_st::srcArray Source array reference 5.14 size_t CUDA_MEMCPY2D_st::srcXInBytes Source X in bytes 5.3.3. array) 5.2.6 size_t CUDA_MEMCPY2D_st::dstXInBytes 315 Destination X in bytes 5.2.2. device.15 Source Y 5.2.3.8 size_t CUDA_MEMCPY2D_st::Height Height of 2D memory copy 5.2.2.3.10 CUdeviceptr CUDA_MEMCPY2D_st::srcDevice Source device pointer 5.13 size_t CUDA_MEMCPY2D_st::srcPitch Source pitch (ignored when src is array) 5.3.2.2.11 const void∗ CUDA_MEMCPY2D_st::srcHost Source host pointer 5.3.5.3.2.7 size_t CUDA_MEMCPY2D_st::dstY Destination Y 5.2.3 CUDA_MEMCPY2D_st Struct Reference 5.3.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 .3.12 CUmemorytype CUDA_MEMCPY2D_st::srcMemoryType Source memory type (host.3.2.

1 Detailed Description 3D memory copy parameters 5.2 5.2.2 CUarray CUDA_MEMCPY3D_st::dstArray Destination array reference 5.4.3 CUdeviceptr CUDA_MEMCPY3D_st::dstDevice Destination device pointer Generated for NVIDIA CUDA Library by Doxygen .316 Data Structure Documentation 5.4.1 Field Documentation size_t CUDA_MEMCPY3D_st::Depth Depth of 3D memory copy 5.2.4.4.4.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.

6 size_t CUDA_MEMCPY3D_st::dstLOD Destination LOD 5.2.2.4.4.2.7 CUmemorytype CUDA_MEMCPY3D_st::dstMemoryType Destination memory type (host.2.4.2.4 size_t CUDA_MEMCPY3D_st::dstHeight 317 Destination height (ignored when dst is array.15 CUarray CUDA_MEMCPY3D_st::srcArray Source array reference Generated for NVIDIA CUDA Library by Doxygen .2.2.12 size_t CUDA_MEMCPY3D_st::Height Height of 3D memory copy 5.4. device.10 size_t CUDA_MEMCPY3D_st::dstY Destination Y 5.4.4. array) 5.8 size_t CUDA_MEMCPY3D_st::dstPitch Destination pitch (ignored when dst is array) 5.4.2.4.13 void∗ CUDA_MEMCPY3D_st::reserved0 Must be NULL 5.4.14 void∗ CUDA_MEMCPY3D_st::reserved1 Must be NULL 5.5 void∗ CUDA_MEMCPY3D_st::dstHost Destination host pointer 5.11 size_t CUDA_MEMCPY3D_st::dstZ Destination Z 5.2.2.2.5.4.4.4.9 size_t CUDA_MEMCPY3D_st::dstXInBytes Destination X in bytes 5.4 CUDA_MEMCPY3D_st Struct Reference 5. may be 0 if Depth==1) 5.2.

23 Source Y 5.22 size_t CUDA_MEMCPY3D_st::srcXInBytes Source X in bytes 5.2. device.4. array) 5. may be 0 if Depth==1) 5.4.19 size_t CUDA_MEMCPY3D_st::srcLOD Source LOD 5.318 5.2.2.2.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.4.2.21 size_t CUDA_MEMCPY3D_st::srcPitch Source pitch (ignored when src is array) 5.4.20 CUmemorytype CUDA_MEMCPY3D_st::srcMemoryType Source memory type (host.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.4.2.4.2.4.4.2.24 Source Z 5.4.2.17 size_t CUDA_MEMCPY3D_st::srcHeight Source height (ignored when src is array.

5.5.2.2.1 Field Documentation enum cudaChannelFormatKind cudaChannelFormatDesc::f Channel format kind 5.5.5.4 y 5.5.2.5.5.2.3 x 5.1 Detailed Description CUDA Channel format descriptor 5.2 5.5 cudaChannelFormatDesc Struct Reference 319 5.2 w 5.5.2.5 z int cudaChannelFormatDesc::z int cudaChannelFormatDesc::y int cudaChannelFormatDesc::x int cudaChannelFormatDesc::w Generated for NVIDIA CUDA Library by Doxygen .5 cudaChannelFormatDesc Struct Reference Data Fields • • • • • enum cudaChannelFormatKind f int w int x int y int z 5.

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

6 int cudaDeviceProp::ECCEnabled Device has ECC support enabled 5.2.12 int cudaDeviceProp::maxTexture2D[2] Maximum 2D texture dimensions 5.6.2.9 int cudaDeviceProp::major Major compute capability 5.6.10 int cudaDeviceProp::maxGridSize[3] Maximum size of each dimension of a grid 5.2.4 int cudaDeviceProp::concurrentKernels Device can possibly execute multiple kernels concurrently 5.2.5 int cudaDeviceProp::deviceOverlap Device can concurrently copy memory and execute a kernel 5.2.2.6.6.13 int cudaDeviceProp::maxTexture2DArray[3] Maximum 2D texture array dimensions 5.6.6 cudaDeviceProp Struct Reference 5.2.6.6.2.5.7 int cudaDeviceProp::integrated Device is integrated as opposed to discrete 5.6.6.6.2.2.6.14 int cudaDeviceProp::maxTexture3D[3] Maximum 3D texture dimensions Generated for NVIDIA CUDA Library by Doxygen .11 int cudaDeviceProp::maxTexture1D Maximum 1D texture size 5.8 int cudaDeviceProp::kernelExecTimeoutEnabled Specified whether there is a run time limit on kernels 5.6.2.2.3 int cudaDeviceProp::computeMode 321 Compute mode (See cudaComputeMode) 5.

0 otherwise Generated for NVIDIA CUDA Library by Doxygen .6.6.20 char cudaDeviceProp::name[256] ASCII string identifying device 5.23 int cudaDeviceProp::regsPerBlock 32-bit registers available per block 5.25 size_t cudaDeviceProp::surfaceAlignment Alignment requirements for surfaces 5.2.6.2.24 size_t cudaDeviceProp::sharedMemPerBlock Shared memory available per block in bytes 5.21 int cudaDeviceProp::pciBusID PCI bus ID of the device 5.6.6.15 int cudaDeviceProp::maxThreadsDim[3] Data Structure Documentation Maximum size of each dimension of a block 5.2.322 5.2.18 int cudaDeviceProp::minor Minor compute capability 5.6.6.6.2.6.2.26 int cudaDeviceProp::tccDriver 1 if device is a Tesla device using TCC driver.2.2.22 int cudaDeviceProp::pciDeviceID PCI device ID of the device 5.2.6.2.17 size_t cudaDeviceProp::memPitch Maximum pitch in bytes allowed by memory copies 5.2.16 int cudaDeviceProp::maxThreadsPerBlock Maximum number of threads per block 5.19 int cudaDeviceProp::multiProcessorCount Number of multiprocessors on device 5.6.2.6.

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

7.7.7.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.2.324 Data Structure Documentation 5.2 size_t cudaExtent::height Height in elements 5. in bytes when referring to linear memory Generated for NVIDIA CUDA Library by Doxygen .2.7.3 size_t cudaExtent::width Width in elements when referring to array memory.7.1 Field Documentation size_t cudaExtent::depth Depth in elements 5.2.2 5.

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

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

2.2 struct cudaPos cudaMemcpy3DParms::dstPos [read] Destination position offset 5.2.9.3 struct cudaPitchedPtr cudaMemcpy3DParms::dstPtr [read] Pitched destination memory address 5.6 struct cudaArray∗ cudaMemcpy3DParms::srcArray [read] Source memory address 5.9.9.2.2.1 Detailed Description CUDA 3D memory copying parameters 5.7 struct cudaPos cudaMemcpy3DParms::srcPos [read] Source position offset Generated for NVIDIA CUDA Library by Doxygen .9.5.5 enum cudaMemcpyKind cudaMemcpy3DParms::kind Type of transfer 5.9 cudaMemcpy3DParms Struct Reference 327 5.2.9.1 Field Documentation struct cudaArray∗ cudaMemcpy3DParms::dstArray [read] Destination memory address 5.9 cudaMemcpy3DParms Struct Reference Data Fields • • • • • • • • struct cudaArray ∗ dstArray struct cudaPos dstPos struct cudaPitchedPtr dstPtr struct cudaExtent extent enum cudaMemcpyKind kind struct cudaArray ∗ srcArray struct cudaPos srcPos struct cudaPitchedPtr srcPtr 5.2.9.2 5.9.9.9.4 struct cudaExtent cudaMemcpy3DParms::extent [read] Requested memory copy size 5.2.

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

10.4 size_t cudaPitchedPtr::ysize Logical height of allocation in elements Generated for NVIDIA CUDA Library by Doxygen .10.10.10.10 cudaPitchedPtr Struct Reference 329 5.5.1 Detailed Description CUDA Pitched memory pointer See also: make_cudaPitchedPtr 5.2 5.10.2.10 cudaPitchedPtr Struct Reference Data Fields • • • • size_t pitch void ∗ ptr size_t xsize size_t ysize 5.2.1 Field Documentation size_t cudaPitchedPtr::pitch Pitch of allocated memory in bytes 5.2.3 size_t cudaPitchedPtr::xsize Logical width of allocation in elements 5.10.2.2 void∗ cudaPitchedPtr::ptr Pointer to allocated memory 5.

11.11 cudaPos Struct Reference Data Fields • size_t x • size_t y • size_t z 5.11.11.2 y 5.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.2.2.11.330 Data Structure Documentation 5.2.1 Detailed Description CUDA 3D position See also: make_cudaPos 5.2 5.

2.12.12 CUdevprop_st Struct Reference 331 5.2.2 5.12.12.1 Detailed Description Legacy device properties 5.12.2.12.12.2.12.1 Field Documentation int CUdevprop_st::clockRate Clock frequency in kilohertz 5.2 int CUdevprop_st::maxGridSize[3] Maximum size of each dimension of a grid 5.5.2.5 int CUdevprop_st::memPitch Maximum pitch in bytes allowed by memory copies 5.4 int CUdevprop_st::maxThreadsPerBlock Maximum number of threads per block 5.2.12.7 int CUdevprop_st::sharedMemPerBlock Shared memory available per block in bytes Generated for NVIDIA CUDA Library by Doxygen .12.3 int CUdevprop_st::maxThreadsDim[3] Maximum size of each dimension of a block 5.2.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.6 int CUdevprop_st::regsPerBlock 32-bit registers available per block 5.

2.8 int CUdevprop_st::SIMDWidth Data Structure Documentation Warp size in threads 5.12.2.12.12.332 5.9 int CUdevprop_st::textureAlign Alignment requirement for textures 5.10 int CUdevprop_st::totalConstantMemory Constant memory available on device in bytes Generated for NVIDIA CUDA Library by Doxygen .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_NEGATIVE_Z. 161 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT. 161 CU_FUNC_ATTRIBUTE_BINARY_VERSION. 161 CU_DEVICE_ATTRIBUTE_GPU_OVERLAP. 161 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES. 160 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT. 160 CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT. 160 CUDA_ERROR_UNMAP_FAILED CUDA_TYPES. 157 CU_AD_FORMAT_SIGNED_INT32. 160 CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z. 160 CU_DEVICE_ATTRIBUTE_INTEGRATED. 158 CU_CUBEMAP_FACE_NEGATIVE_X. 159 CUDA_ERROR_UNSUPPORTED_LIMIT CUDA_TYPES. 157 CU_CUBEMAP_FACE_POSITIVE_Z. 160 CU_EVENT_BLOCKING_SYNC. 157 CU_AD_FORMAT_UNSIGNED_INT16. 160 CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y. 160 CU_DEVICE_ATTRIBUTE_CLOCK_RATE. 160 CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z. 157 CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY. 162 CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES.340 CUDA_ERROR_UNKNOWN CUDA_TYPES. 157 CU_AD_FORMAT_SIGNED_INT16. 158 CU_CTX_LMEM_RESIZE_TO_MAX. 157 CU_COMPUTEMODE_EXCLUSIVE. 160 CU_DEVICE_ATTRIBUTE_MAX_PITCH. 160 CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT. 162 CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES. 158 CU_CTX_SCHED_AUTO. 157 CU_COMPUTEMODE_DEFAULT. 160 CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK. 160 CU_DEVICE_ATTRIBUTE_COMPUTE_MODE. 157 CU_CUBEMAP_FACE_NEGATIVE_Y. 160 CU_DEVICE_ATTRIBUTE_PCI_BUS_ID. 161 CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID. Generated for NVIDIA CUDA Library by Doxygen . 158 CUDA_TYPES CU_AD_FORMAT_FLOAT. 157 CU_AD_FORMAT_SIGNED_INT8. 157 CU_CUBEMAP_FACE_POSITIVE_X. 160 CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY. 158 CU_CTX_SCHED_YIELD. 160 CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK. 160 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH. 158 CU_CTX_SCHED_SPIN. 160 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH. 159 CUDA_SUCCESS CUDA_TYPES. 161 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH. 161 CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK. 160 CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK. 160 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT. 160 CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X. 160 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH. 157 CU_AD_FORMAT_HALF. 160 CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT. 161 CU_DEVICE_ATTRIBUTE_ECC_ENABLED. 161 CU_EVENT_DEFAULT. 160 CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK. 157 CU_AD_FORMAT_UNSIGNED_INT8. 161 CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT. 161 CU_DEVICE_ATTRIBUTE_TCC_DRIVER. 161 CU_EVENT_DISABLE_TIMING. 157 CU_AD_FORMAT_UNSIGNED_INT32. 157 CU_COMPUTEMODE_PROHIBITED. 160 CU_DEVICE_ATTRIBUTE_WARP_SIZE. 160 INDEX CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y. 160 CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS. 160 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH. 160 CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X. 157 CU_CUBEMAP_FACE_POSITIVE_Y. 158 CU_CTX_MAP_HOST. 158 CU_CTX_BLOCKING_SYNC.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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)//-->