Results 1 to 2 of 2

Thread: Using pair barriers in the condtional statement

  1. #1
    Junior Member
    Join Date
    Sep 2011
    Posts
    2

    Using pair barriers in the condtional statement

    Can we use following statement on OpenCL
    kernel
    {
    .....
    if(i < 10)
    {
    .....
    barrier(CLK_LOCAL_MEM_FENCE);
    .....
    }
    else
    {
    .....
    barrier(CLK_LOCAL_MEM_FENCE);
    .....
    }
    .....
    }
    Is it correct?

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

    Re: Using pair barriers in the condtional statement

    No, it's not correct. See viewtopic.php?f=28&t=4392
    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. Specifics of barriers
    By xgromd in forum OpenCL
    Replies: 1
    Last Post: 09-30-2011, 02:12 PM
  2. Global Barriers?
    By guillona in forum OpenCL
    Replies: 2
    Last Post: 02-20-2010, 04:58 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
  •