Commit daaa489d2c9a640c053190df962b2aed8e4da34f

Luke Dashjr 2012-01-19T23:27:38

Bugfix: -n should show GPU count, even though GPUs aren't probed yet

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/main.c b/main.c
index 6a16eb2..44164c8 100644
--- a/main.c
+++ b/main.c
@@ -1839,8 +1839,11 @@ static void load_default_config(void)
 }
 
 #ifdef HAVE_OPENCL
+struct device_api opencl_api;
+
 static char *print_ndevs_and_exit(int *ndevs)
 {
+	opencl_api.api_detect();
 	printf("%i GPU devices detected\n", *ndevs);
 	fflush(stdout);
 	exit(*ndevs);