From 3afaaf1bfa21aba1bffd913f654edf43c88527ab Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Wed, 26 Feb 2014 03:45:14 +0200 Subject: [PATCH] ocl: rename nfactor to N where appropriate. N = 2^nfactor, so `nfactor` was a bad name choice here. --- ocl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ocl.c b/ocl.c index 3f28b765..de6ea650 100644 --- a/ocl.c +++ b/ocl.c @@ -225,7 +225,9 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize) cl_uint numPlatforms; cl_uint numDevices; cl_int status; - cl_uint nfactor = (1<opt_tc) { unsigned int sixtyfours; - sixtyfours = cgpu->max_alloc / 131072 / 64 / (nfactor/1024) - 1; + sixtyfours = cgpu->max_alloc / 131072 / 64 / (N/1024) - 1; cgpu->thread_concurrency = sixtyfours * 64; if (cgpu->shaders && cgpu->thread_concurrency > cgpu->shaders) { cgpu->thread_concurrency -= cgpu->thread_concurrency % cgpu->shaders; @@ -779,7 +781,7 @@ built: return NULL; } - size_t ipt = (nfactor / cgpu->lookup_gap + (nfactor % cgpu->lookup_gap > 0)); + size_t ipt = (N / cgpu->lookup_gap + (N % cgpu->lookup_gap > 0)); size_t bufsize = 128 * ipt * cgpu->thread_concurrency; /* Use the max alloc value which has been rounded to a power of