12.07.2015 Views

CUDA TIPS and FAQ

CUDA TIPS and FAQ

CUDA TIPS and FAQ

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Topic 4: 並 列 化 (Coalesced Access)__global__void coalescedMemcpyKernel(int *dDst, const int *dSrc, size_t size) {/* Global IDを 算 出 */int globalID = blockDim.x * blockIdx.x + threadIdx.x;}if (globalID < size) {/* 自 スレッド 担 当 の 要 素 のみ、 処 理 */dDst[globalID] = dSrc[globalID];}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!