SWDEV-275828 - Fix api negative_get_platform_info test

Change-Id: Iffbcd4fe3b3b59a072e3374c0af3409338eeeca2
Este commit está contenido en:
Jason Tang
2021-03-05 11:34:38 -05:00
padre cddfd9e301
commit 4ea3e44ac8
Se han modificado 2 ficheros con 6 adiciones y 2 borrados
+2 -2
Ver fichero
@@ -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
Ver fichero
@@ -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);
}