Search:

Type: Posts; User: zhugh

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    7
    Views
    4,928

    Re: Kernels and mutexes

    I think I've fixed my problems. I've coded a global memory barrier that synchronizes work-items in different work-groups. The important functions are atom_cmpxchg and atom_xchg, and these are...
  2. Replies
    7
    Views
    4,928

    Re: Kernels and mutexes

    That link is very informative, but I'm looking for a good way to implement a spinlock, where one work-item waits repeatedly for the lock to be available.

    I've tried implementing this with...
  3. Replies
    7
    Views
    4,928

    Kernels and mutexes

    The goal of a mutex is to make sure only one work-item can access critical data at a time. I've tried to implement a mutex with the atomic_cmpxchg function, which atomically performs the ternary...
  4. Replies
    1
    Views
    1,467

    Memory object allocation

    If you create a memory object with clCreateBuffer or clCreateImage2D/3D, is the memory immediately allocated on the device? Or is it allocated when you make the memory object a kernel argument and...
  5. Replies
    4
    Views
    2,068

    Re: Events and callback functions

    You're right. Since the callback requires three arguments, I thought you'd have to send three arguments with clSetEventCallback. But as it turns out, you don't have to do that at all.

    My mistake....
  6. Replies
    4
    Views
    2,068

    Re: Events and callback functions

    Hello David,

    Thanks for the response, but your code doesn't work. I declared the callback function properly. My problem is clSetEventCallback. I tried code similar to your suggestion:

    ...
  7. Replies
    4
    Views
    2,068

    Events and callback functions

    Hello,

    I've been trying to code an application that calls clSetEventCallback, but it's not working. Are there any examples that call this function?

    Here's my code:


    typedef void...
Results 1 to 7 of 41
Page 1 of 2 1 2