OpenCL: JSON format support

This commit is contained in:
李通洲
2023-09-07 09:20:52 +08:00
parent 98833b4d74
commit cdaf5e9281
3 changed files with 31 additions and 1 deletions
+3
View File
@@ -49,14 +49,17 @@ static const char* openCLHandleData(OpenCLData* data, FFOpenCLResult* result)
if(ffStrStartsWithIgnCase(version, "OpenCL "))
versionPretty = version + strlen("OpenCL ");
ffStrbufSetS(&result->version, versionPretty);
ffStrbufTrim(&result->version, ' ');
ffStrbufEnsureFree(&result->device, 128);
data->ffclGetDeviceInfo(deviceID, CL_DEVICE_NAME, result->device.allocated, result->device.chars, NULL);
ffStrbufRecalculateLength(&result->device);
ffStrbufTrim(&result->device, ' ');
ffStrbufEnsureFree(&result->vendor, 32);
data->ffclGetDeviceInfo(deviceID, CL_DEVICE_VENDOR, result->vendor.allocated, result->vendor.chars, NULL);
ffStrbufRecalculateLength(&result->vendor);
ffStrbufTrim(&result->vendor, ' ');
return NULL;
}