Results 1 to 2 of 2

Thread: explicit copy from host to device

  1. #1

    explicit copy from host to device

    Hi forum,

    I am allocating a host memory and then i am creating a device memory buffer with the host copy pointer.

    Do i have to explicitly copy the contents from host to device then?

    If the host pointer is null while creating the device read & write buffer , then i think you need to copy explicitly from host to device .

    What do you guys think?


  2. #2

    Re: explicit copy from host to device

    If you're passing CL_MEM_COPY_HOST_PTR when creating the buffer, the implementation will take care of doing the copy (and it will do it synchronously). In this situation you can't pass a NULL pointer.

    Alternatively you can leave out the CL_MEM_COPY_HOST_PTR, pass a NULL host pointer, and handle the copy yourself.

Similar Threads

  1. Replies: 1
    Last Post: 08-22-2011, 06:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean