Share BuildKernelInfo struct definition (#1453)

Move the main `BuildKernelInfo` definition into `common.h` to reduce
code duplication.

Some tests (e.g. `i_unary_double.cpp`) use a different struct; rename
those structs to `BuildKernelInfo2` for now to avoid ambiguity.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
Sven van Haastregt
2022-07-29 18:22:18 +01:00
committed by GitHub
parent 0a5a8f90c9
commit b06ccc6cd9
27 changed files with 68 additions and 178 deletions

View File

@@ -112,16 +112,6 @@ int BuildKernel(const char *name, int vectorSize, cl_uint kernel_count,
relaxedMode);
}
struct BuildKernelInfo
{
cl_uint offset; // the first vector size to build
cl_uint kernel_count;
KernelMatrix &kernels;
Programs &programs;
const char *nameInCode;
bool relaxedMode; // Whether to build with -cl-fast-relaxed-math.
};
cl_int BuildKernelFn(cl_uint job_id, cl_uint thread_id UNUSED, void *p)
{
BuildKernelInfo *info = (BuildKernelInfo *)p;