CUDA Programming: A Developer's Guide to Parallel Computing with GPUsNewnes, 28 груд. 2012 р. - 600 стор. If you need to learn CUDA but don't have experience with parallel computing, CUDA Programming: A Developer's Introduction offers a detailed guide to CUDA with a grounding in parallel fundamentals. It starts by introducing CUDA and bringing you up to speed on GPU parallelism and hardware, then delving into CUDA installation. Chapters on core concepts including threads, blocks, grids, and memory focus on both parallel and CUDA-specific issues. Later, the book demonstrates CUDA in practice for optimizing applications, adjusting to new hardware, and solving common problems.
|
З цієї книги
Результати 1-5 із 49
Сторінка 74
... threadIdx.x; a[thread_idx] 1⁄4 b[thread_idx] * c[thread_idx]; } Note, some people prefer idx or tid as the name for the thread index since these are somewhat shorter to type. What is happening, now, is that for thread 0, the thread_idx ...
... threadIdx.x; a[thread_idx] 1⁄4 b[thread_idx] * c[thread_idx]; } Note, some people prefer idx or tid as the name for the thread index since these are somewhat shorter to type. What is happening, now, is that for thread 0, the thread_idx ...
Сторінка 78
... x) þ threadIdx.x; a[thread_idx] 1⁄4 b[thread_idx] * c[thread_idx]; } To calculate the thread_idx parameter, you must now take into account the number of blocks. For the first block, blockIdx.x will contain zero, so effectively the ...
... x) þ threadIdx.x; a[thread_idx] 1⁄4 b[thread_idx] * c[thread_idx]; } To calculate the thread_idx parameter, you must now take into account the number of blocks. For the first block, blockIdx.x will contain zero, so effectively the ...
Сторінка 80
... x) þ threadIdx.x; block[thread_idx] 1⁄4 blockIdx.x; thread[thread_idx] 1⁄4 threadIdx.x; /* Calculate warp using built in variable warpSize */ warp[thread_idx] 1⁄4 threadIdx.x / warpSize; calc_thread[thread_idx] 1⁄4 thread_idx; } Now on ...
... x) þ threadIdx.x; block[thread_idx] 1⁄4 blockIdx.x; thread[thread_idx] 1⁄4 threadIdx.x; /* Calculate warp using built in variable warpSize */ warp[thread_idx] 1⁄4 threadIdx.x / warpSize; calc_thread[thread_idx] 1⁄4 thread_idx; } Now on ...
Сторінка 85
... threadIdx.x; const unsigned int idy 1⁄4 (blockIdx.y * blockDim.y) þ threadIdx.y; some_array[idy][idx] þ1⁄4 1.0; Notice the use of blockDim.x and blockDim.y, which the CUDA runtime ... x–The size in blocks of the X dimension of the Grids 85.
... threadIdx.x; const unsigned int idy 1⁄4 (blockIdx.y * blockDim.y) þ threadIdx.y; some_array[idy][idx] þ1⁄4 1.0; Notice the use of blockDim.x and blockDim.y, which the CUDA runtime ... x–The size in blocks of the X dimension of the Grids 85.
Сторінка 98
... x) þ threadIdx.x; const unsigned int idy 1⁄4 (blockIdx.y * blockDim.y) þ threadIdx.y; const unsigned int tid 1⁄4 idx þ idy * blockDim.x * gridDim.x; /* Fetch the data value */ No. of Threads Maximum Register Usage 192 16 20 24 98 ...
... x) þ threadIdx.x; const unsigned int idy 1⁄4 (blockIdx.y * blockDim.y) þ threadIdx.y; const unsigned int tid 1⁄4 idx þ idy * blockDim.x * gridDim.x; /* Fetch the data value */ No. of Threads Maximum Register Usage 192 16 20 24 98 ...
Зміст
Chapter 8 MultiCPU and MultiGPU Solutions | 267 |
Chapter 9 Optimizing Your Application | 305 |
Chapter 10 Libraries and SDK | 441 |
Chapter 11 Designing GPUBased Systems | 503 |
Chapter 12 Common Problems Causes and Solutions | 527 |
Index | 565 |
Інші видання - Показати все
CUDA Programming: A Developer's Guide to Parallel Computing with GPUs Shane Cook Обмежений попередній перегляд - 2012 |
Загальні терміни та фрази
256 threads algorithm allocate application array atomic atomic operations blockDim.x blockIdx.x bytes calculation compiler compute 2.x const int const u32 constant memory copy CUDA CALL cuda CUDA cores dataset device device_num elements example execution Fermi Figure function GB/s GeForce GTX 470:GMEM global memory GMEM hardware host memory ID:0 GeForce GTX InfiniBand instruction issue iterations Kepler kernel L1 cache latency Linux look loop malloc Memcpy memory access memory bandwidth memory fetch merge sort node num_elem num_elements num_threads number of blocks number of threads NVIDIA OpenMP operation optimization output Parallel Nsight parameter PCI-E performance pointer prefix sum problem processor radix sort reduce registers result serial shared memory SIMD simply single SP SP SP speedup stream synchronization Tesla threadIdx.x threads per block transfer typically uint4 unsigned int usage version is faster void warp write þ¼