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:
Sven van Haastregt
2022-08-04 15:03:52 +01:00
committed by GitHub
parent c44b5b6ae3
commit c12bff46c6
27 changed files with 164 additions and 183 deletions

View File

@@ -28,14 +28,21 @@ 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>;
// Information to generate OpenCL kernels.
struct BuildKernelInfo
{
cl_uint offset; // the first vector size to build
cl_uint kernel_count;
// Number of kernels to build, one for each thread to avoid data races.
cl_uint threadCount;
KernelMatrix &kernels;
Programs &programs;
// Function, macro or symbol tested by the kernel.
const char *nameInCode;
bool relaxedMode; // Whether to build with -cl-fast-relaxed-math.
// Whether to build with -cl-fast-relaxed-math.
bool relaxedMode;
};
#endif /* COMMON_H */