Skip to content

Wrong step size in ReadMemory functions #38

@EnricoChiarello

Description

@EnricoChiarello

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions