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.

Device Management<br />

CPU can query and select GPU devices<br />

© NVIDIA Corporation 2008<br />

cudaGetDeviceCount( int *count )<br />

cudaSetDevice( int device )<br />

cudaGetDevice( int *current_device )<br />

cudaGetDeviceProperties( cudaDeviceProp* prop,<br />

int device )<br />

cudaChooseDevice( int *device, cudaDeviceProp* prop )<br />

Multi-GPU setup:<br />

device 0 is used by default<br />

one CPU thread can control only one GPU<br />

multiple CPU threads can control the same GPU<br />

– calls are serialized by the driver<br />

48

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

Saved successfully!

Ooh no, something went wrong!