#2 Add ability to use part of an array as a parameter to OpenCL

closed-accepted
nobody
None
5
2010-03-16
2010-03-15
Jeff Adams
No

If I am processing data sets larger than will fit in GPU memory, I currently have to copy each piece into a smaller .NET array, then pass that array to a new ComputeBuffer(...), or get an array from ComputeCommandQueue.Read(...) and copy its contents into my larger result array.

Here is a patch that overloads the ComputeBuffer constructor and the ComputeCommandQueue.Read method to allow them to take an array with a start offset and count.

Discussion

  • Jeff Adams

    Jeff Adams - 2010-03-15

    Patch to ComputeBuffer.cs and ComputeCommandQueue.cs

     
  • nythrix

    nythrix - 2010-03-15
     
  • nythrix

    nythrix - 2010-03-15

    Actually, it is possible to easily achieve this functionality, provided you have the latest version. I've attached a small example which demonstrates this. Let me know if you need further help.

    Thanks for the patch. Because of issues with non-blocking calls it is not directly applicable but it reminded me of a feature I'd forgotten about.

     
  • nythrix

    nythrix - 2010-03-16
    • status: open --> closed-accepted
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks