Results 1 to 4 of 4

Thread: copy from global memory to local memory..problem

  1. #1

    copy from global memory to local memory..problem

    I want to copy from global memory to local memory about image data.
    So I researched the opencl specification document and I found a function(async_work_group_copy() function).
    This function perform an async copy of elements from src to dst.
    But I didn't found example of async_work_group_copy() function.
    Evne if I found it, I didn't understand how am I control it..

    So, I have to copy from global data to local data(also to copy from local data to global data)..
    I want to your advise
    What can I do??

  2. #2

    Re: copy from global memory to local memory..problem

    Code :
    __local ulong	clientPixelData[2048];
    __global ulong *sourcepos = (__global ulong *)(source + (sourceWidth * hexTop)+(hexLeft * 4));
     
    event_t events = async_work_group_copy(&clientPixelData, sourcepos, cWidth,0);
    				wait_group_events(1, &events);

    I have tree error
    :178: error: no matching overload found for arguments of type 'long __attribute_
    _((address_space(3)))*, long __attribute__((address_space(1)))*, int, int'
    event_t events = async_work_group_copy(clientPixelData, sourcepos, cWidth,0);
    ^~~~~~~~~~~~~~~~~~~~~
    :238: error: no matching overload found for arguments of type 'ulong __attribute
    __((address_space(3)))(*)[2048], long __attribute__((address_space(1)))*, int, int'
    event_t events = async_work_group_copy(&clientPixelData, sourcepos, cWidth,0);
    ^~~~~~~~~~~~~~~~~~~~~
    :353: error: no matching overload found for arguments of type 'ulong __attribute
    __((address_space(3)))(*)[2048], long __attribute__((address_space(1)))*, int, int'
    event_t events = async_work_group_copy(&clientPixelData, sourcepos, cWidth,0);
    ^~~~~~~~~~~~~~~~~~~~~

    I have tree error
    :178: error: no matching overload found for arguments of type 'long __attribute_
    _((address_space(3)))*, long __attribute__((address_space(1)))*, int, int'
    event_t events = async_work_group_copy(clientPixelData, sourcepos, cWidth,0);
    ^~~~~~~~~~~~~~~~~~~~~
    :238: error: no matching overload found for arguments of type 'ulong __attribute
    __((address_space(3)))(*)[2048], long __attribute__((address_space(1)))*, int, int'
    event_t events = async_work_group_copy(&clientPixelData, sourcepos, cWidth,0);
    ^~~~~~~~~~~~~~~~~~~~~
    :353: error: no matching overload found for arguments of type 'ulong __attribute
    __((address_space(3)))(*)[2048], long __attribute__((address_space(1)))*, int, int'
    event_t events = async_work_group_copy(&clientPixelData, sourcepos, cWidth,0);
    ^~~~~~~~~~~~~~~~~~~~~

  3. #3

    Re: copy from global memory to local memory..problem

    anybody help me~~~~

  4. #4
    Junior Member
    Join Date
    Apr 2010
    Posts
    11

    Re: copy from global memory to local memory..problem

    Try changing
    event_t events = async_work_group_copy(&clientPixelData, sourcepos, cWidth,0);

    to
    event_t events = async_work_group_copy(clientPixelData, sourcepos, cWidth,0);
    or
    event_t events = async_work_group_copy(&clientPixelData[0], sourcepos, cWidth,0);

    Your first argument is a ulong** instead of a ulong*.

Similar Threads

  1. How to copy global memory to local memory
    By howaidi in forum OpenCL
    Replies: 1
    Last Post: 07-20-2011, 12:45 PM
  2. Replies: 9
    Last Post: 11-15-2010, 03:15 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
  •