#include <iostream>
using namespace std;
int main()
{
cudaDeviceProp prop;
int count;
cudaGetDeviceCount(&count); /*count number of devices*/
for(int i=0;i<count;i++)
{
cudaGetDeviceProperties(∝,i); /*get properties of device*/
cout<<"General Information for device----"<<i<<endl;
cout<<"Name "<<prop.name<<endl;
cout<<"Compute capability "<<prop.major<<". "<<prop.minor<<endl;
cout<<"Clock Rate "<<prop.clockRate<<endl;
cout<<"Device copy overlap: ";
if(prop.deviceOverlap)
cout<<"Enable\n";
else cout<<"Disabled\n";
if(prop.kernelExecTimeoutEnabled)
cout<<"Enable\n";
else cout<<"Disabled\n";
cout<<"---Memory Information for device "<<i<<endl;
cout<<"Total global Mem: "<<prop.totalGlobalMem<<endl;
cout<<"Total COnstant Mem: "<<prop.totalConstMem<<endl;
cout<<"Max mem pitch: "<<prop.memPitch<<endl;
cout<<"Texture ALignment "<<prop.textureAlignment;
cout<<"\n -------MP Information for devices "<<i;
cout<<" \nMultiprocessor count : "<<prop.multiProcessorCount<<endl;
cout<<"Shared mem per mp: "<<prop.sharedMemPerBlock<<endl;
cout<<"Registers per mp: "<<prop.regsPerBlock<<endl;
cout<<"Threads in warp: "<<prop.warpSize<<endl;
cout<<"Max Threads per block "<<prop.maxThreadsPerBlock<<endl;
cout<<"Max Threads dimensions: ("<<prop.maxThreadsDim[0]<<","<<prop.maxThreadsDim[1]
<<","<<prop.maxThreadsDim[2]<<")\n";
cout<<"Max grid dimensions: ("<<prop.maxGridSize[0]<<","<<prop.maxGridSize[1]
<<","<<prop.maxGridSize[2]<<")\n";
}
return 0;
}
see you!!! xD
No hay comentarios:
Publicar un comentario