mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-24 13:34:22 +00:00
Report preferred vector width.
This commit is contained in:
parent
237a5067c3
commit
33352213eb
8
ocl.c
8
ocl.c
@ -271,6 +271,7 @@ _clState *initCl(int gpu, char *name, size_t nameSize)
|
|||||||
|
|
||||||
for (i = 0; i < numDevices; i++) {
|
for (i = 0; i < numDevices; i++) {
|
||||||
const char * camo = "cl_amd_media_ops";
|
const char * camo = "cl_amd_media_ops";
|
||||||
|
cl_uint preferred_vwidth;
|
||||||
size_t retlen;
|
size_t retlen;
|
||||||
char *find;
|
char *find;
|
||||||
|
|
||||||
@ -282,6 +283,13 @@ _clState *initCl(int gpu, char *name, size_t nameSize)
|
|||||||
find = strstr(extensions, camo);
|
find = strstr(extensions, camo);
|
||||||
if (find)
|
if (find)
|
||||||
hasBitAlign = true;
|
hasBitAlign = true;
|
||||||
|
|
||||||
|
status = clGetDeviceInfo(devices[i], CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT, sizeof(cl_uint), (void *)&preferred_vwidth, NULL);
|
||||||
|
if (status != CL_SUCCESS) {
|
||||||
|
applog(LOG_ERR, "Error: Failed to clGetDeviceInfo when trying to get CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
applog(LOG_INFO, "Preferred vector width reported %d", preferred_vwidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasBitAlign == false)
|
if (hasBitAlign == false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user