devices.h
348 Bytes
#ifndef RTS_CUDA_DEVICES
#define RTS_CUDA_DEVICES
#include <cuda.h>
namespace stim{
int maxThreadsPerBlock()
{
int device;
cudaGetDevice(&device); //get the id of the current device
cudaDeviceProp props; //device property structure
cudaGetDeviceProperties(&props, device);
return props.maxThreadsPerBlock;
}
} //end namespace rts
#endif