Results 1 to 3 of 3

Thread: In-band copy operation

  1. #1
    Junior Member
    Join Date
    Apr 2004
    Posts
    2

    In-band copy operation

    Hi,

    I've read the OpenML spec inside out I think, but I still can't understand what exactly happens during a mlSendControls().
    In the spec it says two opposite things, it says on one hand "Enqueueing entails a _copy_ operation, so the application is free to delete/alter the message as soon as the call returns", but on the other hand it says "Notice that the divice performs _no memory allocation_, but rather use the memory allocated when the application enqueued the message".

    What is happening here? If I send an MLpv and set pByte to be memory I've allocated, then that memory will be copied, i.e. a new malloc() within the mlSendControls(), will it not?

    Thanks.

    ~ Daniel

  2. #2
    Member
    Join Date
    Jul 2003
    Location
    Montreal
    Posts
    75

    Re: In-band copy operation

    It is true that a 'pByte' contained in an MLpv that you send in a mlSendControls() will be copied over (so you can delete your pByte when the function returns).

    However, no malloc() is performed: the data is copied over to a pre-allocated memory area (this memory is actually allocated by the device as its 'queue data' storage).

    (You can check this out for yourself in the SDK source tree -- see 'mlpublic.c' and 'mlqueue.c' in the oss/lib/ml/common/src directory. You'll also need to look at one of the sample devices, to see its end of things)

  3. #3
    Junior Member
    Join Date
    Apr 2004
    Posts
    2

    Re: In-band copy operation

    Ok, thanks.

    ~ Daniel

Similar Threads

  1. band and partial update
    By giugio in forum OpenCL
    Replies: 1
    Last Post: 12-12-2012, 05:10 AM
  2. Invalid Operation using clBuildProgram
    By Banjobeni in forum OpenCL
    Replies: 8
    Last Post: 07-06-2011, 03:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •