29.01.2013 Views

Tutorial CUDA

Tutorial CUDA

Tutorial CUDA

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Host Runtime Component:<br />

Memory Management<br />

Two kinds of memory:<br />

© NVIDIA Corporation 2008<br />

Linear memory: accessed through 32-bit pointers<br />

<strong>CUDA</strong> arrays: opaque layouts with dimensionality, only<br />

readable through texture fetching<br />

Device memory allocation<br />

cudaMalloc(), cudaMallocPitch(), cudaFree(),<br />

cudaMallocArray(), cudaFreeArray()<br />

Memory copy from host to device, device to host,<br />

device to device<br />

cudaMemcpy(), cudaMemcpy2D(),<br />

cudaMemcpyToArray(), cudaMemcpyFromArray(), etc.<br />

cudaMemcpyToSymbol(), cudaMemcpyFromSymbol()<br />

Memory addressing<br />

cudaGetSymbolAddress()

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

Saved successfully!

Ooh no, something went wrong!