mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Remove duplicated random_in_ranges function (#763)
This function is duplicated across clCopyImages files, so just keep one definition in common file, and get rid of the duplicated ones. Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
This commit is contained in:
@@ -158,3 +158,10 @@ int get_format_list(cl_context context, cl_mem_object_type imageType,
|
||||
test_error(error, "Unable to get list of supported image formats");
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t random_in_ranges(size_t minimum, size_t rangeA, size_t rangeB, MTdata d)
|
||||
{
|
||||
if (rangeB < rangeA) rangeA = rangeB;
|
||||
if (rangeA < minimum) return rangeA;
|
||||
return (size_t)random_in_range((int)minimum, (int)rangeA - 1, d);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user