Skip to content

basic arraycopy fix#2622

Open
AhmedAmraniAkdi wants to merge 2 commits intoKhronosGroup:mainfrom
AhmedAmraniAkdi:basic_arraycopy
Open

basic arraycopy fix#2622
AhmedAmraniAkdi wants to merge 2 commits intoKhronosGroup:mainfrom
AhmedAmraniAkdi:basic_arraycopy

Conversation

@AhmedAmraniAkdi
Copy link
Contributor

For the second subtest, map streams[0] (created with input_ptr as CL_MEM_USE_HOST_PTR]) before modifying its host_ptr.

Set err to error_count at the end of the test, otherwise if the second subtest fails, it will print the last one failed too.

Rest of changes is formatting.

Copy link
Contributor

@lakshmih lakshmih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't clear what additional coverage this is adding or why so would like that clarification

@AhmedAmraniAkdi
Copy link
Contributor Author

Hi, input_ptr is being used as a host_ptr for streams[0], but then it is modified and used for clEnqueueWriteBuffer:

err = clEnqueueWriteBuffer(queue, streams[2], CL_TRUE, 0, sizeof(cl_uint) * num_elements, input_ptr, 0, NULL, NULL);

To ensure latest data is seen in input_ptr, the test needs to map streams[0] first before modifying input_ptr as this acts as a synchronisation point between host and device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants