Browse Source

Report preferred vector width.

nfactor-troky
ckolivas 14 years ago committed by Con Kolivas
parent
commit
33352213eb
  1. 8
      ocl.c

8
ocl.c

@ -271,6 +271,7 @@ _clState *initCl(int gpu, char *name, size_t nameSize) @@ -271,6 +271,7 @@ _clState *initCl(int gpu, char *name, size_t nameSize)
for (i = 0; i < numDevices; i++) {
const char * camo = "cl_amd_media_ops";
cl_uint preferred_vwidth;
size_t retlen;
char *find;
@ -282,6 +283,13 @@ _clState *initCl(int gpu, char *name, size_t nameSize) @@ -282,6 +283,13 @@ _clState *initCl(int gpu, char *name, size_t nameSize)
find = strstr(extensions, camo);
if (find)
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)

Loading…
Cancel
Save