mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Use clCommandQueueWrapper in math_brute_force (#1463)
Simplify code by avoiding manual resource management. This commit only modifies tests that use one queue per thread. The other unmodified tests are single-threaded and use the global `gQueue`. Original patch by Marco Antognini. Signed-off-by: Marco Antognini <marco.antognini@arm.com> Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
committed by
GitHub
parent
9666ca3c70
commit
c82dabd4bb
@@ -131,7 +131,9 @@ struct ThreadInfo
|
||||
double maxErrorValue2; // position of the max error value (param 2). Init
|
||||
// to 0.
|
||||
MTdata d;
|
||||
cl_command_queue tQueue; // per thread command queue to improve performance
|
||||
|
||||
// Per thread command queue to improve performance
|
||||
clCommandQueueWrapper tQueue;
|
||||
};
|
||||
|
||||
struct TestInfo
|
||||
@@ -952,7 +954,6 @@ exit:
|
||||
clReleaseMemObject(threadInfo.inBuf2);
|
||||
for (auto j = gMinVectorSizeIndex; j < gMaxVectorSizeIndex; j++)
|
||||
clReleaseMemObject(threadInfo.outBuf[j]);
|
||||
clReleaseCommandQueue(threadInfo.tQueue);
|
||||
}
|
||||
|
||||
return error;
|
||||
|
||||
Reference in New Issue
Block a user