Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong step size in ReadMemory functions #38

Open
EnricoChiarello opened this issue May 25, 2016 · 1 comment
Open

Wrong step size in ReadMemory functions #38

EnricoChiarello opened this issue May 25, 2016 · 1 comment

Comments

@EnricoChiarello
Copy link

I am getting inconsistent results and sometimes LabVIEW crashes when using the ReadMemory VIs with a user defined "Dimensions" argument.
I think the problem is in clLabviewDevice.cpp in all the various ReadMemory_xx functions.

In the call to the OpenCL function
clEnqueueReadBufferRect(d->GetQueue(), DeviceMem, true, Origin, HostOrigin, Region, HostRowPitch, HostSlicePitch, DevRowPitch, DevSlicePitch, Data, NULL, NULL, d->GetEvent());

HostRowPitch and HostSlicePitch should be switched with DevRowPitch and DevSlicePitch, respectively.

That is, the arguments given to clEnqueueReadBufferRect in the body of ReadMemory_xx should be equal (with the same order) to the ones given to clEnqueueWriteBufferRect in the WriteMemory_xx functions (which are working correctly).

See in OpenCL API:
clEnqueueWriteBufferRect
clEnqueueReadBufferRect

that both functions have exactly the same parameters.

thanks,
Enrico

@amcelroy
Copy link
Owner

Hey Enrico,

Added you to the project to allow you to make changes. It has honestly been several years since I've looked at the code. If you find this solves the problem, please feel free to push to GIT.

Thanks for tracking down the issue and working to resolve it. Hopefully other parts of the OpenCLV have been working well for you!

Austin

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

No branches or pull requests

2 participants