mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Tidy up BuildKernelInfo (#1461)
Remove the `offset` field from both structures, because it was always set to the global `gMinVectorSizeIndex`. Improve documentation and rename some variables: - `i` becomes `vectorSize`; - `kernel_count` becomes `threadCount`. 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
c44b5b6ae3
commit
c12bff46c6
@@ -113,10 +113,10 @@ int BuildKernel(const char *name, int vectorSize, cl_uint kernel_count,
|
||||
cl_int BuildKernelFn(cl_uint job_id, cl_uint thread_id UNUSED, void *p)
|
||||
{
|
||||
BuildKernelInfo *info = (BuildKernelInfo *)p;
|
||||
cl_uint i = info->offset + job_id;
|
||||
return BuildKernel(info->nameInCode, i, info->kernel_count,
|
||||
info->kernels[i].data(), &(info->programs[i]),
|
||||
info->relaxedMode);
|
||||
cl_uint vectorSize = gMinVectorSizeIndex + job_id;
|
||||
return BuildKernel(info->nameInCode, vectorSize, info->threadCount,
|
||||
info->kernels[vectorSize].data(),
|
||||
&(info->programs[vectorSize]), info->relaxedMode);
|
||||
}
|
||||
|
||||
// Thread specific data for a worker thread
|
||||
@@ -898,10 +898,9 @@ int TestFunc_Float_Float_Float(const Func *f, MTdata d, bool relaxedMode)
|
||||
|
||||
// Init the kernels
|
||||
{
|
||||
BuildKernelInfo build_info = {
|
||||
gMinVectorSizeIndex, test_info.threadCount, test_info.k,
|
||||
test_info.programs, f->nameInCode, relaxedMode
|
||||
};
|
||||
BuildKernelInfo build_info{ test_info.threadCount, test_info.k,
|
||||
test_info.programs, f->nameInCode,
|
||||
relaxedMode };
|
||||
if ((error = ThreadPool_Do(BuildKernelFn,
|
||||
gMaxVectorSizeIndex - gMinVectorSizeIndex,
|
||||
&build_info)))
|
||||
|
||||
Reference in New Issue
Block a user