You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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!
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
andHostSlicePitch
should be switched withDevRowPitch
andDevSlicePitch
, 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 toclEnqueueWriteBufferRect
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
The text was updated successfully, but these errors were encountered: