Blame view

stim/cuda/cudatools/devices.h 348 Bytes
a9275be5   David Mayerich   added vector fiel...
1
2
3
4
5
  #ifndef RTS_CUDA_DEVICES
  #define RTS_CUDA_DEVICES
  
  #include <cuda.h>
  
8a86bd56   David Mayerich   changed rts names...
6
  namespace stim{
a9275be5   David Mayerich   added vector fiel...
7
8
9
10
11
12
13
14
15
16
17
  
  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
  
8a86bd56   David Mayerich   changed rts names...
18
  #endif