Results 1 to 2 of 2

Thread: Array reduction example

  1. #1

    Array reduction example

    Hello there, I'm having some trouble with the Array Reduction example in the specification.

    The kernel, in the final stages of its reduction starts to sum up the stored sums in local memory. At first it is checking if it is in the lower half of the pairs begin summed

    Code :
    #if (GROUP_SIZE >= 512)
    if (lid < 256)
    shared[lid] += shared[lid + 256];

    That's fine by me. What twists my nugget is that you cease to check if you're in the lower half once your local ID is smaller than 32?

    Code :
    if (lid < 32)
    #if (GROUP_SIZE >= 64)
    shared[lid] += shared[lid + 32];
    #if (GROUP_SIZE >= 32)
    shared[lid] += shared[lid + 16];

    I found the Apple example code here, and their kernel still checks if they're in the lower half.

    Can some one please tell me if I've missed something?

  2. #2
    Junior Member
    Join Date
    Nov 2009

    Re: Array reduction example

    Hello All
    I am Mathew I have problem of Array,I am getting its properly work in program,Anyone can help me give me the some basic program Example of Array list..
    Example of Array Reduction Is Really very Nice..I like this method.

Similar Threads

  1. dot product of two vectors using reduction
    By shahsaurabh1990 in forum OpenCL
    Replies: 1
    Last Post: 02-01-2013, 08:15 AM
  2. Reduction within one work item
    By unknown in forum OpenCL
    Replies: 0
    Last Post: 01-06-2013, 03:05 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