mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Broke source generated program. Fix.
This commit is contained in:
parent
d100281df3
commit
a095f0fae2
12
ocl.c
12
ocl.c
@ -328,12 +328,16 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
|
|||||||
char binaryfilename[255];
|
char binaryfilename[255];
|
||||||
char numbuf[10];
|
char numbuf[10];
|
||||||
char filename[10];
|
char filename[10];
|
||||||
|
if (clState->hasBitAlign)
|
||||||
|
strcpy(filename, "phatk.cl");
|
||||||
|
else
|
||||||
|
strcpy(filename, "poclbm.cl");
|
||||||
FILE *binaryfile;
|
FILE *binaryfile;
|
||||||
size_t *binary_sizes;
|
size_t *binary_sizes;
|
||||||
char **binaries;
|
char **binaries;
|
||||||
size_t nDevices = 1;
|
size_t nDevices = 1;
|
||||||
int pl;
|
int pl;
|
||||||
char *source, *rawsource;
|
char *source, *rawsource = file_contents(filename, &pl);
|
||||||
size_t sourceSize[] = {(size_t)pl};
|
size_t sourceSize[] = {(size_t)pl};
|
||||||
|
|
||||||
source = malloc(pl);
|
source = malloc(pl);
|
||||||
@ -342,12 +346,6 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clState->hasBitAlign)
|
|
||||||
strcpy(filename, "phatk.cl");
|
|
||||||
else
|
|
||||||
strcpy(filename, "poclbm.cl");
|
|
||||||
rawsource = file_contents(filename, &pl);
|
|
||||||
|
|
||||||
binary_sizes = (size_t *)malloc(sizeof(size_t)*nDevices);
|
binary_sizes = (size_t *)malloc(sizeof(size_t)*nDevices);
|
||||||
if (unlikely(!binary_sizes)) {
|
if (unlikely(!binary_sizes)) {
|
||||||
applog(LOG_ERR, "Unable to malloc binary_sizes");
|
applog(LOG_ERR, "Unable to malloc binary_sizes");
|
||||||
|
Loading…
Reference in New Issue
Block a user