mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Allow different kernels to be used by different devices and fix the logic fail of overcorrecting on last commit with !strstr.
This commit is contained in:
parent
196e8a0f76
commit
4822cca72b
16
ocl.c
16
ocl.c
@ -356,20 +356,22 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
|
|||||||
* have otherwise created. The filename is:
|
* have otherwise created. The filename is:
|
||||||
* name + kernelname +/i bitalign + v + vectors + w + work_size + sizeof(long) + .bin
|
* name + kernelname +/i bitalign + v + vectors + w + work_size + sizeof(long) + .bin
|
||||||
*/
|
*/
|
||||||
|
enum cl_kernel this_kernel;
|
||||||
char binaryfilename[255];
|
char binaryfilename[255];
|
||||||
char numbuf[10];
|
|
||||||
char filename[16];
|
char filename[16];
|
||||||
|
char numbuf[10];
|
||||||
|
|
||||||
if (chosen_kernel == KL_NONE) {
|
if (chosen_kernel == KL_NONE) {
|
||||||
if (!strstr(name, "Tahiti"))
|
if (strstr(name, "Tahiti"))
|
||||||
chosen_kernel = KL_DIAKGCN;
|
this_kernel = KL_DIAKGCN;
|
||||||
else if (!clState->hasBitAlign)
|
else if (!clState->hasBitAlign)
|
||||||
chosen_kernel = KL_POCLBM;
|
this_kernel = KL_POCLBM;
|
||||||
else
|
else
|
||||||
chosen_kernel = KL_PHATK;
|
this_kernel = KL_PHATK;
|
||||||
}
|
} else
|
||||||
|
this_kernel = chosen_kernel;
|
||||||
|
|
||||||
switch (chosen_kernel) {
|
switch (this_kernel) {
|
||||||
case KL_DIAKGCN:
|
case KL_DIAKGCN:
|
||||||
strcpy(filename, DIAKGCN_KERNNAME".cl");
|
strcpy(filename, DIAKGCN_KERNNAME".cl");
|
||||||
strcpy(binaryfilename, DIAKGCN_KERNNAME);
|
strcpy(binaryfilename, DIAKGCN_KERNNAME);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user