Results 1 to 2 of 2

Thread: using workgroups

  1. #1
    Junior Member
    Join Date
    Jun 2011
    Posts
    13

    using workgroups

    Hey guys, I am just starting using OpenCl, and have been programming c++ for awhile. I just have some general questions on workgroups.

    If I specify a number of workgroups in EnqueueNDRangeKernel, does it automatically split my work?

    If so, as long as I dont have any "local" code, my kernel will still work?

    Also, can I still use get_global_id(), or should I use something else that is quicker?

    I am passing a large array of floats into global memory, but the access has to be faster, so I am trying to cut the NDRange into workgroups, so that multiple workgroups are accessing global memory. I just dont know if it will access everything the same way...

  2. #2
    Senior Member
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    845

    Re: using workgroups

    If I specify a number of workgroups in EnqueueNDRangeKernel, does it automatically split my work?
    clEnqueueNDRangeKernel() does not take the number of work-groups as an input. It takes the number of work-items. If you do not specify a given work-group size, then the implementation will automatically choose a work-group size for you.

    Code :
    If so, as long as I dont have any "local" code, my kernel will still work?

    Right. As long as you are not using any local memory your code probably does not care about work-group size.

    Also, can I still use get_global_id(), or should I use something else that is quicker?
    get_global_id() works fine
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

Similar Threads

  1. OpenCL Synchronization between workgroups.
    By abhisrn in forum OpenCL
    Replies: 3
    Last Post: 10-21-2012, 04:14 PM
  2. Workgroups and global IDs
    By stephennt in forum OpenCL
    Replies: 12
    Last Post: 07-26-2011, 05:19 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
  •