12.07.2015 Views

NVIDIA CUDA

NVIDIA CUDA

NVIDIA CUDA

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.

10 Module Documentation3.4.2.2 cudaError_t cudaGetDevice (int ∗ device)Returns in ∗device the device on which the active host thread executes the device code.Parameters:device - Returns the device on which the active host thread executes the device code.Returns:cudaSuccessNote:Note that this function may also return error codes from previous, asynchronous launches.See also:cudaGetDeviceCount, cudaSetDevice, cudaGetDeviceProperties, cudaChooseDevice3.4.2.3 cudaError_t cudaGetDeviceCount (int ∗ count)Returns in ∗count the number of devices with compute capability greater or equal to 1.0 that are available forexecution. If there is no such device, cudaGetDeviceCount() returns 1 and device 0 only supports deviceemulation mode. Since this device will be able to emulate all hardware features, this device will report major andminor compute capability versions of 9999.Parameters:count - Returns the number of devices with compute capability greater or equal to 1.0Returns:Note:See also:cudaSuccessNote that this function may also return error codes from previous, asynchronous launches.cudaGetDevice, cudaSetDevice, cudaGetDeviceProperties, cudaChooseDevice3.4.2.4 cudaError_t cudaGetDeviceProperties (struct cudaDeviceProp ∗ prop, int device)Returns in ∗prop the properties of device dev. The cudaDeviceProp structure is defined as:struct cudaDeviceProp {char name[256];size_t totalGlobalMem;size_t sharedMemPerBlock;int regsPerBlock;int warpSize;size_t memPitch;int maxThreadsPerBlock;int maxThreadsDim[3];int maxGridSize[3];Generated on Wed Apr 1 16:11:42 2009 for <strong>NVIDIA</strong> <strong>CUDA</strong> Library by Doxygen

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

Saved successfully!

Ooh no, something went wrong!