Browse Source

Don't mess with GPU stuff if we don't have them.

nfactor-troky
Scott Dial 13 years ago
parent
commit
760b0064d6
  1. 4
      main.c

4
main.c

@ -5344,6 +5344,7 @@ int main (int argc, char *argv[]) @@ -5344,6 +5344,7 @@ int main (int argc, char *argv[])
} else
chosen_kernel = KL_NONE;
#ifdef HAVE_OPENCL
gpu_threads = nDevs * opt_g_threads;
if (total_devices) {
if (total_devices > nDevs)
@ -5366,6 +5367,9 @@ int main (int argc, char *argv[]) @@ -5366,6 +5367,9 @@ int main (int argc, char *argv[])
gpu_devices[i] = true;
total_devices = nDevs;
}
#else
gpu_threads = 0;
#endif
if (!gpu_threads && !forced_n_threads) {
/* Maybe they turned GPU off; restore default CPU threads. */

Loading…
Cancel
Save