mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Fix multiple work size entry.
This commit is contained in:
parent
26c59fbf0f
commit
a54f76061b
@ -1262,7 +1262,7 @@ static uint64_t opencl_scanhash(struct thr_info *thr, struct work *work,
|
|||||||
cl_int status;
|
cl_int status;
|
||||||
|
|
||||||
size_t globalThreads[1];
|
size_t globalThreads[1];
|
||||||
size_t localThreads[1] = { clState->work_size };
|
size_t localThreads[1] = { clState->wsize };
|
||||||
unsigned int threads;
|
unsigned int threads;
|
||||||
unsigned int hashes;
|
unsigned int hashes;
|
||||||
|
|
||||||
|
8
ocl.c
8
ocl.c
@ -432,7 +432,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
|
|||||||
sprintf(numbuf, "%d", clState->vwidth);
|
sprintf(numbuf, "%d", clState->vwidth);
|
||||||
strcat(binaryfilename, numbuf);
|
strcat(binaryfilename, numbuf);
|
||||||
strcat(binaryfilename, "w");
|
strcat(binaryfilename, "w");
|
||||||
sprintf(numbuf, "%d", (int)clState->work_size);
|
sprintf(numbuf, "%d", (int)clState->wsize);
|
||||||
strcat(binaryfilename, numbuf);
|
strcat(binaryfilename, numbuf);
|
||||||
strcat(binaryfilename, "l");
|
strcat(binaryfilename, "l");
|
||||||
sprintf(numbuf, "%d", (int)sizeof(long));
|
sprintf(numbuf, "%d", (int)sizeof(long));
|
||||||
@ -497,8 +497,8 @@ build:
|
|||||||
char *CompilerOptions = calloc(1, 256);
|
char *CompilerOptions = calloc(1, 256);
|
||||||
|
|
||||||
sprintf(CompilerOptions, "-D WORKSIZE=%d -D VECTORS%d",
|
sprintf(CompilerOptions, "-D WORKSIZE=%d -D VECTORS%d",
|
||||||
(int)clState->work_size, clState->vwidth);
|
(int)clState->wsize, clState->vwidth);
|
||||||
applog(LOG_DEBUG, "Setting worksize to %d", clState->work_size);
|
applog(LOG_DEBUG, "Setting worksize to %d", clState->wsize);
|
||||||
if (clState->vwidth > 1)
|
if (clState->vwidth > 1)
|
||||||
applog(LOG_DEBUG, "Patched source to suit %d vectors", clState->vwidth);
|
applog(LOG_DEBUG, "Patched source to suit %d vectors", clState->vwidth);
|
||||||
|
|
||||||
@ -649,7 +649,7 @@ built:
|
|||||||
free(binary_sizes);
|
free(binary_sizes);
|
||||||
|
|
||||||
applog(LOG_INFO, "Initialising kernel %s with%s bitalign, %d vectors and worksize %d",
|
applog(LOG_INFO, "Initialising kernel %s with%s bitalign, %d vectors and worksize %d",
|
||||||
filename, clState->hasBitAlign ? "" : "out", clState->vwidth, clState->work_size);
|
filename, clState->hasBitAlign ? "" : "out", clState->vwidth, clState->wsize);
|
||||||
|
|
||||||
if (!prog_built) {
|
if (!prog_built) {
|
||||||
/* create a cl program executable for all the devices specified */
|
/* create a cl program executable for all the devices specified */
|
||||||
|
1
ocl.h
1
ocl.h
@ -23,7 +23,6 @@ typedef struct {
|
|||||||
bool hasOpenCL11plus;
|
bool hasOpenCL11plus;
|
||||||
cl_uint vwidth;
|
cl_uint vwidth;
|
||||||
size_t max_work_size;
|
size_t max_work_size;
|
||||||
size_t work_size;
|
|
||||||
size_t wsize;
|
size_t wsize;
|
||||||
enum cl_kernels chosen_kernel;
|
enum cl_kernels chosen_kernel;
|
||||||
} _clState;
|
} _clState;
|
||||||
|
Loading…
Reference in New Issue
Block a user