code optimization

svn path=/trunk/boinc/; revision=24373
This commit is contained in:
Charlie Fenton 2011-10-11 00:35:52 +00:00
parent 3f180b0278
commit 37837fc394
2 changed files with 18 additions and 8 deletions

View File

@ -7037,3 +7037,9 @@ Rom 10 Oct 2011
coproc_detect.cpp
lib/
diagnostics.cpp
Charlie 10 Oct 2011
- code optimization
client/
coproc_detect.cpp

View File

@ -280,10 +280,12 @@ void COPROCS::get_opencl(
prop.get_device_version_int();
if (strstr(prop.vendor, GPU_TYPE_NVIDIA)) {
prop.device_num = (int)(nvidia_opencls.size());
COPROC_NVIDIA c;
c.opencl_prop = prop;
c.set_peak_flops();
prop.peak_flops = c.peak_flops;
if (!nvidia.have_cuda) {
COPROC_NVIDIA c;
c.opencl_prop = prop;
c.set_peak_flops();
prop.peak_flops = c.peak_flops;
}
nvidia_opencls.push_back(prop);
}
if ((strstr(prop.vendor, GPU_TYPE_ATI)) ||
@ -299,10 +301,12 @@ void COPROCS::get_opencl(
(!strstr("1.1", prop.opencl_platform_version))) {
prop.global_mem_size *= 2;
}
COPROC_ATI c;
c.opencl_prop = prop;
c.set_peak_flops();
prop.peak_flops = c.peak_flops;
if (!ati.have_cal) {
COPROC_ATI c;
c.opencl_prop = prop;
c.set_peak_flops();
prop.peak_flops = c.peak_flops;
}
ati_opencls.push_back(prop);
}
}