Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jszuppe
Copy link
Contributor

@jszuppe jszuppe commented Apr 21, 2017

This PR adds AppVayor CI and fixes some bugs in tests.

2a69955 is the most interesting bug-fix. clEnqueueWriteBuffer is not "100% blocking". OpenCL specification only promises that for clEnqueueWriteBuffer:

if blocking_write is CL_TRUE, the OpenCL implementation copies the data referred to by ptr and enqueues the write operation in the command-queue. The memory pointed to by ptr can be reused by the application after the clEnqueueWriteBuffer call returns.

Which means that blocking clEnqueueWriteBuffer can return after it copies memory pointer by ptr to some temporary memory (on host), and it doesn't have to wait for the write to the buffer to be completed. (To be honest OpenCL specification is not 100% clear about that.) Anyway, in case of the Intel implementation for CPU, clEnqueueWriteBuffer does not wait for the data to be written into the buffer. Every other platform waits (AMD, NVIDIA, pocl), but the fact is that Intel implementation is in line with the specification. (See also https://software.intel.com/en-us/forums/opencl/topic/731519.)

That caused random errors when writing and reading using [] operator, because each call of [] operator creates it's own temporary command queue (so calls were not ordered). Long story short: It was possible to do vector[0] = 3; and right after that vector[0] == 3 could be false.

@jszuppe jszuppe requested a review from kylelutz April 21, 2017 18:58
@jszuppe
Copy link
Contributor Author

jszuppe commented Apr 21, 2017

@kylelutz I guess we need some connection with AppVeyor CI in repository settings. I don't have permissions to do it. When it's activate, send me the code with the badge, so I'll update commit 1e8d292. It would be great if I can have access to the AppVeyor CI of Boost.Compute like I have in Travis CI.

Check https://ci.appveyor.com/project/jszuppe/compute-e97yn/build/1.0.17 to see how AppVeyor builds work.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.004%) to 83.357% when pulling 1e8d292 on haahh:pr_add_appvayor_ci into 2e790df on boostorg:develop.

@jszuppe
Copy link
Contributor Author

jszuppe commented Apr 25, 2017

I'll move fixes to separate pull request.

@jszuppe jszuppe force-pushed the pr_add_appvayor_ci branch from 1e8d292 to 531c475 Compare April 29, 2017 11:50
@coveralls
Copy link

Coverage Status

Coverage remained the same at 83.676% when pulling 531c475 on haahh:pr_add_appvayor_ci into 863371d on boostorg:develop.

@jszuppe jszuppe force-pushed the pr_add_appvayor_ci branch from 531c475 to f3a2e4c Compare May 3, 2017 17:17
@coveralls
Copy link

Coverage Status

Coverage remained the same at 83.676% when pulling f3a2e4c on jszuppe:pr_add_appvayor_ci into 863371d on boostorg:develop.

@kylelutz kylelutz merged commit a965a8d into boostorg:develop May 4, 2017
@kylelutz
Copy link
Collaborator

kylelutz commented May 4, 2017

Awesome! Merged!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants