Cuda Api Reference Manual

Cuda Api Reference Manual

CUDA API REFERENCE MANUAL March 2012 Version 4.2 Contents 1 API synchronization behavior1 1.1 Memcpy..................................................1 1.1.1 Synchronous...........................................1 1.1.2 Asynchronous..........................................1 1.2 Memset..................................................2 1.3 Kernel Launches.............................................2 2 Deprecated List 3 3 Module Index 9 3.1 Modules..................................................9 4 Data Structure Index 11 4.1 Data Structures.............................................. 11 5 Module Documentation 13 5.1 CUDA Runtime API........................................... 13 5.1.1 Detailed Description....................................... 14 5.1.2 Define Documentation...................................... 14 5.1.2.1 CUDART_VERSION................................. 14 5.2 Device Management........................................... 15 5.2.1 Detailed Description....................................... 16 5.2.2 Function Documentation..................................... 16 5.2.2.1 cudaChooseDevice.................................. 16 5.2.2.2 cudaDeviceGetByPCIBusId.............................. 16 5.2.2.3 cudaDeviceGetCacheConfig.............................. 17 5.2.2.4 cudaDeviceGetLimit.................................. 17 5.2.2.5 cudaDeviceGetPCIBusId............................... 18 5.2.2.6 cudaDeviceReset................................... 18 5.2.2.7 cudaDeviceSetCacheConfig.............................. 19 ii CONTENTS 5.2.2.8 cudaDeviceSetLimit.................................. 19 5.2.2.9 cudaDeviceSynchronize................................ 20 5.2.2.10 cudaGetDevice..................................... 20 5.2.2.11 cudaGetDeviceCount................................. 21 5.2.2.12 cudaGetDeviceProperties............................... 21 5.2.2.13 cudaIpcCloseMemHandle............................... 24 5.2.2.14 cudaIpcGetEventHandle................................ 25 5.2.2.15 cudaIpcGetMemHandle................................ 25 5.2.2.16 cudaIpcOpenEventHandle............................... 26 5.2.2.17 cudaIpcOpenMemHandle............................... 26 5.2.2.18 cudaSetDevice..................................... 27 5.2.2.19 cudaSetDeviceFlags.................................. 27 5.2.2.20 cudaSetValidDevices................................. 28 5.3 Thread Management [DEPRECATED].................................. 29 5.3.1 Detailed Description....................................... 29 5.3.2 Function Documentation..................................... 29 5.3.2.1 cudaThreadExit.................................... 29 5.3.2.2 cudaThreadGetCacheConfig.............................. 30 5.3.2.3 cudaThreadGetLimit.................................. 30 5.3.2.4 cudaThreadSetCacheConfig.............................. 31 5.3.2.5 cudaThreadSetLimit.................................. 32 5.3.2.6 cudaThreadSynchronize................................ 33 5.4 Error Handling.............................................. 34 5.4.1 Detailed Description....................................... 34 5.4.2 Function Documentation..................................... 34 5.4.2.1 cudaGetErrorString.................................. 34 5.4.2.2 cudaGetLastError................................... 34 5.4.2.3 cudaPeekAtLastError................................. 35 5.5 Stream Management........................................... 36 5.5.1 Detailed Description....................................... 36 5.5.2 Function Documentation..................................... 36 5.5.2.1 cudaStreamCreate................................... 36 5.5.2.2 cudaStreamDestroy.................................. 36 5.5.2.3 cudaStreamQuery................................... 37 5.5.2.4 cudaStreamSynchronize................................ 37 5.5.2.5 cudaStreamWaitEvent................................. 38 5.6 Event Management............................................ 39 Generated for NVIDIA CUDA Library by Doxygen CONTENTS iii 5.6.1 Detailed Description....................................... 39 5.6.2 Function Documentation..................................... 39 5.6.2.1 cudaEventCreate.................................... 39 5.6.2.2 cudaEventCreateWithFlags.............................. 40 5.6.2.3 cudaEventDestroy................................... 40 5.6.2.4 cudaEventElapsedTime................................ 41 5.6.2.5 cudaEventQuery.................................... 41 5.6.2.6 cudaEventRecord................................... 42 5.6.2.7 cudaEventSynchronize................................ 42 5.7 Execution Control............................................. 43 5.7.1 Detailed Description....................................... 43 5.7.2 Function Documentation..................................... 43 5.7.2.1 cudaConfigureCall................................... 43 5.7.2.2 cudaFuncGetAttributes................................ 44 5.7.2.3 cudaFuncSetCacheConfig............................... 44 5.7.2.4 cudaLaunch...................................... 45 5.7.2.5 cudaSetDoubleForDevice............................... 45 5.7.2.6 cudaSetDoubleForHost................................ 46 5.7.2.7 cudaSetupArgument.................................. 46 5.8 Memory Management........................................... 48 5.8.1 Detailed Description....................................... 51 5.8.2 Function Documentation..................................... 51 5.8.2.1 cudaArrayGetInfo................................... 51 5.8.2.2 cudaFree........................................ 52 5.8.2.3 cudaFreeArray..................................... 52 5.8.2.4 cudaFreeHost..................................... 53 5.8.2.5 cudaGetSymbolAddress................................ 53 5.8.2.6 cudaGetSymbolSize.................................. 53 5.8.2.7 cudaHostAlloc..................................... 54 5.8.2.8 cudaHostGetDevicePointer.............................. 55 5.8.2.9 cudaHostGetFlags................................... 55 5.8.2.10 cudaHostRegister................................... 56 5.8.2.11 cudaHostUnregister.................................. 57 5.8.2.12 cudaMalloc...................................... 57 5.8.2.13 cudaMalloc3D..................................... 57 5.8.2.14 cudaMalloc3DArray.................................. 58 5.8.2.15 cudaMallocArray................................... 60 Generated for NVIDIA CUDA Library by Doxygen iv CONTENTS 5.8.2.16 cudaMallocHost.................................... 61 5.8.2.17 cudaMallocPitch.................................... 61 5.8.2.18 cudaMemcpy..................................... 62 5.8.2.19 cudaMemcpy2D.................................... 62 5.8.2.20 cudaMemcpy2DArrayToArray............................ 63 5.8.2.21 cudaMemcpy2DAsync................................ 64 5.8.2.22 cudaMemcpy2DFromArray.............................. 65 5.8.2.23 cudaMemcpy2DFromArrayAsync.......................... 65 5.8.2.24 cudaMemcpy2DToArray............................... 66 5.8.2.25 cudaMemcpy2DToArrayAsync............................ 67 5.8.2.26 cudaMemcpy3D.................................... 68 5.8.2.27 cudaMemcpy3DAsync................................ 69 5.8.2.28 cudaMemcpy3DPeer................................. 71 5.8.2.29 cudaMemcpy3DPeerAsync.............................. 71 5.8.2.30 cudaMemcpyArrayToArray.............................. 72 5.8.2.31 cudaMemcpyAsync.................................. 72 5.8.2.32 cudaMemcpyFromArray............................... 73 5.8.2.33 cudaMemcpyFromArrayAsync............................ 74 5.8.2.34 cudaMemcpyFromSymbol.............................. 74 5.8.2.35 cudaMemcpyFromSymbolAsync........................... 75 5.8.2.36 cudaMemcpyPeer................................... 76 5.8.2.37 cudaMemcpyPeerAsync................................ 76 5.8.2.38 cudaMemcpyToArray................................. 77 5.8.2.39 cudaMemcpyToArrayAsync.............................. 78 5.8.2.40 cudaMemcpyToSymbol................................ 78 5.8.2.41 cudaMemcpyToSymbolAsync............................. 79 5.8.2.42 cudaMemGetInfo................................... 80 5.8.2.43 cudaMemset...................................... 80 5.8.2.44 cudaMemset2D.................................... 81 5.8.2.45 cudaMemset2DAsync................................. 81 5.8.2.46 cudaMemset3D.................................... 82 5.8.2.47 cudaMemset3DAsync................................. 82 5.8.2.48 cudaMemsetAsync.................................. 83 5.8.2.49 make_cudaExtent................................... 84 5.8.2.50 make_cudaPitchedPtr................................. 84 5.8.2.51 make_cudaPos..................................... 84 5.9 Unified Addressing............................................ 85 Generated for NVIDIA CUDA Library by Doxygen CONTENTS v 5.9.1 Detailed Description....................................... 85 5.9.2 Overview............................................. 85 5.9.3 Supported Platforms....................................... 85 5.9.4 Looking Up Information from Pointer Values.......................... 85 5.9.5 Automatic Mapping of Host Allocated Host Memory...................... 85 5.9.6 Direct Access of......................................... 86 5.9.7 Exceptions, Disjoint Addressing................................. 86 5.9.8 Function Documentation..................................... 86 5.9.8.1 cudaPointerGetAttributes............................... 86 5.10 Peer Device Memory Access....................................... 88 5.10.1 Detailed Description......................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    588 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us