Blame view

stim/cuda/cudatools/devices.h 578 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
  
  int maxThreadsPerBlock()
  {
  	int device;
  	cudaGetDevice(&device);		//get the id of the current device
  	cudaDeviceProp props;		//device property structure
  	cudaGetDeviceProperties(&props, device);
  	return props.maxThreadsPerBlock;
  }
f186dbda   Tianshu Cheng   header file for b...
16
17
18
19
20
21
22
23
24
  
  int sharedMemPerBlock()
  {
  	int device;
  	cudaGetDevice(&device);		//get the id of the current device
  	cudaDeviceProp props;		//device property structure
  	cudaGetDeviceProperties(&props, device);
  	return props.sharedMemPerBlock;
  }
a9275be5   David Mayerich   added vector fiel...
25
26
  }	//end namespace rts
  
8a86bd56   David Mayerich   changed rts names...
27
  #endif