1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-03-13 06:01:03 +00:00

Allow writing of multiple vector sizes to the configuration file.

This commit is contained in:
ckolivas 2012-02-22 20:08:29 +11:00
parent 994cd77501
commit 1b1fa5cd89
2 changed files with 7 additions and 1 deletions

View File

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

4
ocl.c
View File

@ -345,8 +345,10 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
if (gpus[gpu].vwidth)
clState->vwidth = gpus[gpu].vwidth;
else
else {
clState->vwidth = preferred_vwidth;
gpus[gpu].vwidth = preferred_vwidth;
}
if (gpus[gpu].work_size && gpus[gpu].work_size <= clState->max_work_size)
clState->wsize = gpus[gpu].work_size;