mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-24 07:59:01 +00:00
Avoid use of rand in test_rw_image_access_qualifier (#1322)
There is no particular reason to limit the domain of unsigned 32-bit integers in the input, so use genrand_int32 directly. Signed-off-by: Stuart Brady <stuart.brady@arm.com>
This commit is contained in:
@@ -98,10 +98,13 @@ int test_rw_image_access_qualifier(cl_device_id device_id, cl_context context, c
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MTdata mtData = init_genrand(gRandomSeed);
|
||||||
/* Fill input array with random values */
|
/* Fill input array with random values */
|
||||||
for (i = 0; i < size; i++) {
|
for (i = 0; i < size; i++) {
|
||||||
input[i] = (unsigned int)(rand()/((double)RAND_MAX + 1)*255);
|
input[i] = genrand_int32(mtData);
|
||||||
}
|
}
|
||||||
|
free_mtdata(mtData);
|
||||||
|
mtData = NULL;
|
||||||
|
|
||||||
/* Zero out output array */
|
/* Zero out output array */
|
||||||
for (i = 0; i < size; i++) {
|
for (i = 0; i < size; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user