Browse Source

Merge commit '3c3fbdc' into cg_merges_20130513

Reverts: 9e627b685bf341e97700161a2a22cb786082dd37

Conflicts:
	ocl.c
Luke Dashjr 12 years ago
parent
commit
2eaf6f3d53
1 changed files with 1 additions and 17 deletions
  1. 1 17
      ocl.c

+ 1 - 17
ocl.c

@@ -676,8 +676,6 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
 
 #ifdef USE_SCRYPT
 	if (opt_scrypt) {
-		cl_ulong ma = cgpu->max_alloc, mt;
-
 		if (!cgpu->opt_lg) {
 			applog(LOG_DEBUG, "GPU %d: selecting lookup gap of 2", gpu);
 			cgpu->lookup_gap = 2;
@@ -685,29 +683,15 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
 			cgpu->lookup_gap = cgpu->opt_lg;
 
 		if (!cgpu->opt_tc) {
-			cgpu->thread_concurrency = ma / 32768 / cgpu->lookup_gap;
+			cgpu->thread_concurrency = cgpu->max_alloc / 32768 / cgpu->lookup_gap;
 			if (cgpu->shaders && cgpu->thread_concurrency > cgpu->shaders) {
 				cgpu->thread_concurrency -= cgpu->thread_concurrency % cgpu->shaders;
 				if (cgpu->thread_concurrency > cgpu->shaders * 5)
 					cgpu->thread_concurrency = cgpu->shaders * 5;
 			}
-				
 			applog(LOG_DEBUG, "GPU %u: selecting thread concurrency of %lu", gpu,  (unsigned long)cgpu->thread_concurrency);
 		} else
 			cgpu->thread_concurrency = cgpu->opt_tc;
-
-		/* If we have memory to spare, try to find a power of 2 value
-		 * >= required amount to map nicely to an intensity */
-		mt = cgpu->thread_concurrency * 32768 * cgpu->lookup_gap;
-		if (ma > mt) {
-			ma = 1;
-			while (ma < mt)
-				ma <<= 1;
-			if (ma < cgpu->max_alloc) {
-				cgpu->max_alloc = ma;
-				applog(LOG_DEBUG, "Max alloc decreased to %lu", (unsigned long)cgpu->max_alloc);
-			}
-		}
 	}
 #endif