-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathprop.cu
More file actions
52 lines (48 loc) · 2.26 KB
/
prop.cu
File metadata and controls
52 lines (48 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <stdio.h>
int main()
{
cudaDeviceProp prop;
int count;
// count devices found.
cudaGetDeviceCount( &count );
// print properties of each device.
for (int i=0; i<count; i++)
{
cudaGetDeviceProperties( &prop, i );
printf("---General device information---\n");
printf(" > Name: %s\n", prop.name);
printf(" > Computer capability: %d.%d\n",
prop.major, prop.minor);
printf(" > Clock rate: %d\n", prop.clockRate);
printf(" > Device copy overlap: %s\n",
prop.deviceOverlap ? "Enabled" : "Disabled");
printf("---Memory Information---\n");
printf(" > Total global memory: %ld\n",
prop.totalGlobalMem);
printf(" > Total constant memory: %ld\n",
prop.totalConstMem);
printf(" > Max memory pitch: %ld\n",
prop.memPitch);
printf(" > Texture Alignment: %ld\n",
prop.textureAlignment);
printf("---MP Information for device---\n");
printf(" > Multiprocessor count: %d\n",
prop.multiProcessorCount);
printf(" > Shared memory per MP: %ld\n",
prop.sharedMemPerBlock);
printf(" > Registers per MP: %d\n",
prop.regsPerBlock);
printf(" > Threads in warp: %d\n",
prop.warpSize);
printf(" > Maximum threads per block: %d\n",
prop.maxThreadsPerBlock);
printf(" > Maximum thread dimensions: (%d, %d, %d)\n",
prop.maxThreadsDim[0],
prop.maxThreadsDim[1],
prop.maxThreadsDim[2]);
printf(" > Maximum grid dimentions: (%d, %d, %d)\n\n\n",
prop.maxGridSize[0],
prop.maxGridSize[1],
prop.maxGridSize[2]);
}
}