math_brute_force: Use clKernelWrapper in threaded tests (#1562)

Simplify code by relying on RAII to free resources.  Reduce code
duplication.

This commit only affects tests that use `BuildKernelInfo`, which are
the multi-threaded tests.  Another patch will deal with the
single-threaded tests, i.e., those using `BuildKernelInfo2`.

Original patch by Marco Antognini.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
Sven van Haastregt
2022-11-27 21:25:32 +00:00
committed by GitHub
parent e9d2abf705
commit 6ecf824122
16 changed files with 171 additions and 444 deletions

View File

@@ -85,9 +85,6 @@ float Bruteforce_Ulp_Error_Double(double test, long double reference);
int MakeKernel(const char **c, cl_uint count, const char *name, cl_kernel *k,
cl_program *p, bool relaxedMode);
int MakeKernels(const char **c, cl_uint count, const char *name,
cl_uint kernel_count, cl_kernel *k, cl_program *p,
bool relaxedMode);
// used to convert a bucket of bits into a search pattern through double
inline double DoubleFromUInt32(uint32_t bits)