没有合适的资源?快使用搜索试试~ 我知道了~
CUDA API参考手册
4星 · 超过85%的资源 需积分: 10 18 下载量 46 浏览量
2012-12-28
21:19:22
上传
评论
收藏 1.09MB PDF 举报
温馨提示
试读
251页
CUDA API参考手册 中文版 运行时API 驱动API 原子操作
资源推荐
资源详情
资源评论
NVIDIA CUDA
计算统一设备架构
Unified
参考手册
2008 年 6 月
ii
目录
1 RuntimeApiReference 1
1.1 DeviceManagement RT .................................................................................................................................... 2
1.1.1 cudaGetDeviceCount ............................................................................................................................ 3
1.1.2 cudaSetDevice ...................................................................................................................................... 4
1.1.3 cudaGetDevice ...................................................................................................................................... 5
1.1.4 cudaGetDeviceProperties ...................................................................................................................... 6
1.1.5 cudaChooseDevice ................................................................................................................................ 8
1.2 ThreadManagement RT .................................................................................................................................... 9
1.2.1 cudaThreadSynchronize ........................................................................................................................ 10
1.2.2 cudaThreadExit ..................................................................................................................................... 11
1.3 StreamManagement RT .................................................................................................................................... 12
1.3.1 cudaStreamCreate ................................................................................................................................. 13
1.3.2 cudaStreamQuery .................................................................................................................................. 14
1.3.3 cudaStreamSynchronize ........................................................................................................................ 15
1.3.4 cudaStreamDestroy ............................................................................................................................... 16
1.4 EventManagement RT ...................................................................................................................................... 17
1.4.1 cudaEventCreate ................................................................................................................................... 18
1.4.2 cudaEventRecord .................................................................................................................................. 19
1.4.3 cudaEventQuery .................................................................................................................................... 20
1.4.4 cudaEventSynchronize .......................................................................................................................... 21
1.4.5 cudaEventDestroy ................................................................................................................................. 22
1.4.6 cudaEventElapsedTime ......................................................................................................................... 23
1.5 MemoryManagement RT ................................................................................................................................. 24
1.5.1 cudaMalloc ........................................................................................................................................... 25
1.5.2 cudaMallocPitch ................................................................................................................................... 26
1.5.3 cudaFree ................................................................................................................................................ 27
1.5.4 cudaMallocArray .................................................................................................................................. 28
1.5.5 cudaFreeArray ...................................................................................................................................... 29
1.5.6 cudaMallocHost .................................................................................................................................... 30
1.5.7 cudaFreeHost ........................................................................................................................................ 31
1.5.8 cudaMemset .......................................................................................................................................... 32
1.5.9 cudaMemset2D ..................................................................................................................................... 33
ii
1.5.10 cudaMemcpy ..................................................................................................................................... 34
1.5.11 cudaMemcpy2D ................................................................................................................................ 35
1.5.12 cudaMemcpyToArray ....................................................................................................................... 36
1.5.13 cudaMemcpy2DToArray .................................................................................................................. 37
1.5.14 cudaMemcpyFromArray ................................................................................................................... 38
1.5.15 cudaMemcpy2DFromArray .............................................................................................................. 39
1.5.16 cudaMemcpyArrayToArray .............................................................................................................. 40
1.5.17 cudaMemcpy2DArrayToArray ......................................................................................................... 41
1.5.18 cudaMemcpyToSymbol .................................................................................................................... 42
1.5.19 cudaMemcpyFromSymbol ................................................................................................................ 43
1.5.20 cudaGetSymbolAddress .................................................................................................................... 44
1.5.21 cudaGetSymbolSize .......................................................................................................................... 45
1.5.22 cudaMalloc3D ................................................................................................................................... 46
1.5.23 cudaMalloc3DArray ......................................................................................................................... 48
1.5.24 cudaMemset3D ................................................................................................................................. 50
1.5.25 cudaMemcpy3D ................................................................................................................................ 52
1.6 TextureReferenceManagement RT ................................................................................................................ 54
1.6.1 LowLevelApi ...................................................................................................................................... 55
1.6.2 HighLevelApi ..................................................................................................................................... 63
1.7 ExecutionControl RT ..................................................................................................................................... 68
1.7.1 cudaConfigureCall .............................................................................................................................. 69
1.7.2 cudaLaunch ......................................................................................................................................... 70
1.7.3 cudaSetupArgument ........................................................................................................................... 71
1.8 OpenGlInteroperability RT ............................................................................................................................ 72
1.8.1 cudaGLSetGLDevice .......................................................................................................................... 73
1.8.2 cudaGLRegisterBufferObject ............................................................................................................. 74
1.8.3 cudaGLMapBufferObject ................................................................................................................... 75
1.8.4 cudaGLUnmapBufferObject ............................................................................................................... 76
1.8.5 cudaGLUnregisterBufferObject .......................................................................................................... 77
1.9 Direct3dInteroperability RT ........................................................................................................................... 78
1.9.1 cudaD3D9SetDirect3DDevice ............................................................................................................ 79
1.9.2 cudaD3D9GetDirect3DDevice ........................................................................................................... 80
1.9.3 cudaD3D9RegisterResource ............................................................................................................... 81
1.9.4 cudaD3D9UnregisterResource ........................................................................................................... 83
v
1.9.5 cudaD3D9MapResources .................................................................................................................... 84
1.9.6 cudaD3D9UnmapResources ................................................................................................................ 85
1.9.7 cudaD3D9ResourceSetMapFlags ........................................................................................................ 86
1.9.8 cudaD3D9ResourceGetSurfaceDimensions ........................................................................................ 88
1.9.9 cudaD3D9ResourceGetMappedPointer ............................................................................................... 89
1.9.10 cudaD3D9ResourceGetMappedSize .................................................................................................. 90
1.9.11 cudaD3D9ResourceGetMappedPitch ................................................................................................ 91
1.9.12 cudaD3D9Begin ................................................................................................................................. 92
1.9.13 cudaD3D9End .................................................................................................................................... 93
1.9.14 cudaD3D9RegisterVertexBuffer ........................................................................................................ 94
1.9.15 cudaD3D9MapVertexBuffer .............................................................................................................. 95
1.9.16 cudaD3D9UnmapVertexBuffer ......................................................................................................... 96
1.9.17 cudaD3D9UnregisterVertexBuffer .................................................................................................... 97
1.9.18 cudaD3D9GetDevice ......................................................................................................................... 98
1.10 ErrorHandling RT .......................................................................................................................................... 99
1.10.1 cudaGetLastError ............................................................................................................................. 100
1.10.2 cudaGetErrorString .......................................................................................................................... 102
2 DriverApiReference 103
2.1 Initialization ................................................................................................................................................... 104
2.1.1 cuInit .................................................................................................................................................. 105
2.2 DeviceManagement ....................................................................................................................................... 106
2.2.1 cuDeviceComputeCapability ............................................................................................................. 107
2.2.2 cuDeviceGet ....................................................................................................................................... 108
2.2.3 cuDeviceGetAttribute ........................................................................................................................ 109
2.2.4 cuDeviceGetCount ............................................................................................................................. 111
2.2.5 cuDeviceGetName ............................................................................................................................. 112
2.2.6 cuDeviceGetProperties ...................................................................................................................... 113
2.2.7 cuDeviceTotalMem ............................................................................................................................ 115
2.3 ContextManagement ...................................................................................................................................... 116
2.3.1 cuCtxAttach ....................................................................................................................................... 117
2.3.2 cuCtxCreate ....................................................................................................................................... 118
2.3.3 cuCtxDetach ....................................................................................................................................... 120
2.3.4 cuCtxGetDevice ................................................................................................................................. 121
v
2.3.5 cuCtxPopCurrent ............................................................................................................................... 122
2.3.6 cuCtxPushCurrent .............................................................................................................................. 123
2.3.7 cuCtxSynchronize .............................................................................................................................. 124
2.4 ModuleManagement ..................................................................................................................................... 125
2.4.1 cuModuleGetFunction ....................................................................................................................... 126
2.4.2 cuModuleGetGlobal .......................................................................................................................... 127
2.4.3 cuModuleGetTexRef ......................................................................................................................... 128
2.4.4 cuModuleLoad ................................................................................................................................... 129
2.4.5 cuModuleLoadData ........................................................................................................................... 130
2.4.6 cuModuleLoadFatBinary ................................................................................................................... 131
2.4.7 cuModuleUnload ............................................................................................................................... 132
2.5 StreamManagement ....................................................................................................................................... 133
2.5.1 cuStreamCreate .................................................................................................................................. 134
2.5.2 cuStreamDestroy ............................................................................................................................... 135
2.5.3 cuStreamQuery .................................................................................................................................. 136
2.5.4 cuStreamDestroy ............................................................................................................................... 137
2.6 EventManagement ......................................................................................................................................... 138
2.6.1 cuEventCreate .................................................................................................................................... 139
2.6.2 cuEventDestroy ................................................................................................................................. 140
2.6.3 cuEventElapsedTime ......................................................................................................................... 141
2.6.4 cuEventQuery .................................................................................................................................... 142
2.6.5 cuEventRecord .................................................................................................................................. 143
2.6.6 cuEventSynchronize .......................................................................................................................... 144
2.7 ExecutionControl .......................................................................................................................................... 145
2.7.1 cuLaunch ........................................................................................................................................... 146
2.7.2 cuLaunchGrid .................................................................................................................................... 147
2.7.3 cuParamSetSize ................................................................................................................................. 148
2.7.4 cuParamSetTexRef ............................................................................................................................ 149
2.7.5 cuParamSetf ....................................................................................................................................... 150
2.7.6 cuParamSeti ....................................................................................................................................... 151
2.7.7 cuParamSetv ...................................................................................................................................... 152
2.7.8 cuFuncSetBlockShape ....................................................................................................................... 153
2.7.9 cuFuncSetSharedSize ........................................................................................................................ 154
2.8 MemoryManagement .................................................................................................................................... 155
剩余250页未读,继续阅读
资源评论
- zd_cui2015-12-19版本有点老,有些函数没有。
- fengbingchun2013-07-31还可以,只是版本有些老,2.0
老黄同学
- 粉丝: 1
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功