Skip to content

Commit

Permalink
Fix multiple work size entry.
Browse files Browse the repository at this point in the history
  • Loading branch information
ckolivas committed Feb 22, 2012
1 parent 26c59fb commit a54f760
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion device-gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,7 @@ static uint64_t opencl_scanhash(struct thr_info *thr, struct work *work,
cl_int status;

size_t globalThreads[1];
size_t localThreads[1] = { clState->work_size };
size_t localThreads[1] = { clState->wsize };
unsigned int threads;
unsigned int hashes;

Expand Down
8 changes: 4 additions & 4 deletions ocl.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
sprintf(numbuf, "%d", clState->vwidth);
strcat(binaryfilename, numbuf);
strcat(binaryfilename, "w");
sprintf(numbuf, "%d", (int)clState->work_size);
sprintf(numbuf, "%d", (int)clState->wsize);
strcat(binaryfilename, numbuf);
strcat(binaryfilename, "l");
sprintf(numbuf, "%d", (int)sizeof(long));
Expand Down Expand Up @@ -497,8 +497,8 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
char *CompilerOptions = calloc(1, 256);

sprintf(CompilerOptions, "-D WORKSIZE=%d -D VECTORS%d",
(int)clState->work_size, clState->vwidth);
applog(LOG_DEBUG, "Setting worksize to %d", clState->work_size);
(int)clState->wsize, clState->vwidth);
applog(LOG_DEBUG, "Setting worksize to %d", clState->wsize);
if (clState->vwidth > 1)
applog(LOG_DEBUG, "Patched source to suit %d vectors", clState->vwidth);

Expand Down Expand Up @@ -649,7 +649,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
free(binary_sizes);

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) {
/* create a cl program executable for all the devices specified */
Expand Down
1 change: 0 additions & 1 deletion ocl.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ typedef struct {
bool hasOpenCL11plus;
cl_uint vwidth;
size_t max_work_size;
size_t work_size;
size_t wsize;
enum cl_kernels chosen_kernel;
} _clState;
Expand Down

0 comments on commit a54f760

Please sign in to comment.