Use clProgramWrapper in math_brute_force (#1451)

Simplify code by avoiding manual resource management.

This allows removing clReleaseProgram from `MakeKernels` to reduce
behavioral differences between `MakeKernels` and `MakeKernel`.

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:
Sven van Haastregt
2022-07-28 13:33:16 +01:00
committed by GitHub
parent 2cf24e63b7
commit 0a5a8f90c9
28 changed files with 120 additions and 105 deletions

View File

@@ -16,6 +16,7 @@
#ifndef COMMON_H
#define COMMON_H
#include "harness/typeWrappers.h"
#include "utility.h"
#include <array>
@@ -24,4 +25,7 @@
// Array of thread-specific kernels for each vector size.
using KernelMatrix = std::array<std::vector<cl_kernel>, VECTOR_SIZE_COUNT>;
// Array of programs for each vector size.
using Programs = std::array<clProgramWrapper, VECTOR_SIZE_COUNT>;
#endif /* COMMON_H */