1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-02-02 01:44:23 +00:00

Allow writing of multiple worksizes to the configuration file.

This commit is contained in:
ckolivas 2012-02-22 20:13:23 +11:00
parent 1b1fa5cd89
commit d3ad87f5d2
2 changed files with 5 additions and 0 deletions

View File

@ -2308,6 +2308,10 @@ void write_config(FILE *fcfg)
for(i = 0; i < nDevs; i++)
fprintf(fcfg, "%s%d", i > 0 ? "," : "",
gpus[i].vwidth);
fputs("\",\n\"worksize\" : \"", fcfg);
for(i = 0; i < nDevs; i++)
fprintf(fcfg, "%s%d", i > 0 ? "," : "",
(int)gpus[i].work_size);
#ifdef HAVE_ADL
fputs("\",\n\"gpu-engine\" : \"", fcfg);
for(i = 0; i < nDevs; i++)

1
ocl.c
View File

@ -356,6 +356,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
clState->wsize = 64;
else
clState->wsize = (clState->max_work_size <= 256 ? clState->max_work_size : 256) / clState->vwidth;
gpus[gpu].work_size = clState->wsize;
/* Create binary filename based on parameters passed to opencl
* compiler to ensure we only load a binary that matches what would