mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-21 23: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
@@ -118,7 +118,9 @@ struct ThreadInfo
|
||||
cl_mem outBuf[VECTOR_SIZE_COUNT]; // output buffers for the thread
|
||||
float maxError; // max error value. Init to 0.
|
||||
double maxErrorValue; // position of the max error value. Init to 0.
|
||||
cl_command_queue tQueue; // per thread command queue to improve performance
|
||||
|
||||
// Per thread command queue to improve performance
|
||||
clCommandQueueWrapper tQueue;
|
||||
};
|
||||
|
||||
struct TestInfo
|
||||
@@ -693,7 +695,6 @@ exit:
|
||||
clReleaseMemObject(threadInfo.inBuf);
|
||||
for (auto j = gMinVectorSizeIndex; j < gMaxVectorSizeIndex; j++)
|
||||
clReleaseMemObject(threadInfo.outBuf[j]);
|
||||
clReleaseCommandQueue(threadInfo.tQueue);
|
||||
}
|
||||
|
||||
return error;
|
||||
|
||||
Reference in New Issue
Block a user