SWDEV-275828 - Fix api negative_get_platform_info test

Change-Id: Iffbcd4fe3b3b59a072e3374c0af3409338eeeca2


[ROCm/clr commit: 4ea3e44ac8]
Этот коммит содержится в:
Jason Tang
2021-03-05 11:34:38 -05:00
родитель 092391b551
Коммит b681f1c159
2 изменённых файлов: 6 добавлений и 2 удалений
+2 -2
Просмотреть файл
@@ -56,8 +56,8 @@ clGetInfo(
cl_int ret = CL_SUCCESS;
if (param_value != NULL && param_value_size < valueSize) {
if (!std::is_pointer<T>() || !std::is_same<typename std::remove_const<
typename std::remove_pointer<T>::type>::type, char>()) {
if ((param_value_size == 0) || !std::is_pointer<T>() || !std::is_same<typename
std::remove_const<typename std::remove_pointer<T>::type>::type, char>()) {
return CL_INVALID_VALUE;
}
// For char* and char[] params, we will at least fill up to
+4
Просмотреть файл
@@ -37,6 +37,10 @@ amd::PlatformIDS amd::PlatformID::Platform = //{ NULL };
static cl_int CL_API_CALL icdGetPlatformInfo(cl_platform_id platform, cl_platform_info param_name,
size_t param_value_size, void* param_value,
size_t* param_value_size_ret) {
if (platform != reinterpret_cast<cl_platform_id>(&amd::PlatformID::Platform)) {
return CL_INVALID_PLATFORM;
}
return clGetPlatformInfo(NULL, param_name, param_value_size, param_value, param_value_size_ret);
}