fixed some warnings and errors under g++

This commit is contained in:
Alexey Spizhevoy
2011-02-03 14:51:58 +00:00
parent 97b0335ef6
commit 50429d8a3e
8 changed files with 30 additions and 25 deletions

View File

@@ -59,9 +59,12 @@ int main()
for (int i = 0; i < num_devices; ++i)
{
if (!DeviceInfo(i).isCompatible())
DeviceInfo dev_info(i);
if (!dev_info.isCompatible())
{
cout << "GPU module isn't built for GPU #" << i << " (" << DeviceInfo(i).name() << ")";
cout << "GPU module isn't built for GPU #" << i << " ("
<< dev_info.name() << ", CC " << dev_info.majorVersion()
<< dev_info.minorVersion() << "\n";
return -1;
}
}
@@ -131,4 +134,4 @@ void destroyContexts()
safeCall(cuCtxDestroy(contexts[1]));
}
#endif
#endif