Fix typo in error handling (#1152)

When creating sub-buffers in math_brute_force, the wrong variables were
checked for runtime errors. This patch fixes this and ensures the logs
are consistent.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
This commit is contained in:
Marco Antognini
2021-02-11 11:38:01 +00:00
committed by GitHub
parent 5d7be40e68
commit b398f8c1b2
5 changed files with 17 additions and 17 deletions

View File

@@ -1342,7 +1342,6 @@ static int TestFunc_Double_Double_Double_common(const Func *f, MTdata d,
/ (sizeof(cl_double) * RoundUpToNextPowerOfTwo(test_info.threadCount));
test_info.scale = getTestScale(sizeof(cl_double));
if (gWimpyMode)
{
test_info.subBufferSize = gWimpyBufferSize
@@ -1412,9 +1411,9 @@ static int TestFunc_Double_Double_Double_common(const Func *f, MTdata d,
test_info.tinfo[i].inBuf2 =
clCreateSubBuffer(gInBuffer2, CL_MEM_READ_ONLY,
CL_BUFFER_CREATE_TYPE_REGION, &region, &error);
if (error || NULL == test_info.tinfo[i].inBuf)
if (error || NULL == test_info.tinfo[i].inBuf2)
{
vlog_error("Error: Unable to create sub-buffer of gInBuffer for "
vlog_error("Error: Unable to create sub-buffer of gInBuffer2 for "
"region {%zd, %zd}\n",
region.origin, region.size);
goto exit;