19.11.2014 Views

Tutorial: Introduction to CUDA Fortran | GTC 2013

Tutorial: Introduction to CUDA Fortran | GTC 2013

Tutorial: Introduction to CUDA Fortran | GTC 2013

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Device Management API<br />

• cudaGetDeviceCount(nDevices)<br />

– Returns number of <strong>CUDA</strong>-enabled devices attached <strong>to</strong> system<br />

– Devices are enumerated from 0 <strong>to</strong> nDevices-1<br />

• cudaGetDeviceProperties(prop, dev)<br />

– Inquiry function for device dev<br />

– prop is of type cudaDeviceProp<br />

• cudaSetDevice(dev)<br />

– Sets the current device <strong>to</strong> dev<br />

– All device operations are associated with current device

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

Saved successfully!

Ooh no, something went wrong!