From bdfce54c3b887ea360aa6c100724febe65541ed9 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Mon, 17 Nov 2014 14:47:58 +0100 Subject: [PATCH] x11: restore default intensity to 19 on windows --- x11/x11.cu | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/x11/x11.cu b/x11/x11.cu index 8c2b5b6..121d416 100644 --- a/x11/x11.cu +++ b/x11/x11.cu @@ -128,6 +128,15 @@ extern "C" void x11hash(void *output, const void *input) memcpy(output, hash, 32); } +/* reduce by one default intensity on windows */ +static int is_windows(void) +{ +#ifdef WIN32 + return 1; +#else + return 0; +#endif +} extern "C" int scanhash_x11(int thr_id, uint32_t *pdata, const uint32_t *ptarget, uint32_t max_nonce, @@ -135,7 +144,7 @@ extern "C" int scanhash_x11(int thr_id, uint32_t *pdata, { const uint32_t first_nonce = pdata[19]; static bool init[8] = { 0 }; - int intensity = (device_sm[device_map[thr_id]] >= 500) ? 20 : 19; + int intensity = (device_sm[device_map[thr_id]] >= 500 && !is_windows()) ? 20 : 19; int throughput = opt_work_size ? opt_work_size : (1 << intensity); // 20=256*256*16; throughput = min(throughput, (int)(max_nonce - first_nonce));