-
Notifications
You must be signed in to change notification settings - Fork 8
Description
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