Before this change, `add_index_bin_test` would not release `cl_mem`
resources or `malloc`ed memory when encountering an error. Fix by
using `clMemWrapper` and `std::unique_ptr` to automatically release
resources.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Remove a variable that was set when an OpenCL API call failed, but
never read again. Instead, return immediately upon failure.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
The "succeed" variables are never read and they don't seem to serve
any purpose that's not already provided by the "fail" variables.
In `add_index_bin_test` the "fail" variable is also set but unused,
but that may require an actual fix, so leaving that out of this
commit.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Add some clang-format off/on comments to keep lists and kernel code
readable.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>