5 Replies Latest reply on Dec 21, 2009 6:25 AM by @lex

    Reduction Kernels

    attilagenc
      How to use reduction kernels in ATI CAL

      Hi,

      Does anybody know how to compile reduction kernels to use in ATI CAL environment?

       

      thx

        • Reduction Kernels
          attilagenc

           

          Originally posted by: attilagenc Hi,

           

          Does anybody know how to compile reduction kernels to use in ATI CAL environment?

           

           

           

          thx

           

           

          Hi all again

           

          Can somebody suggest me a sample of reduction kernel usage in ATI CAL?

           

          thx

           

            • Reduction Kernels
              riza.guntur

              maybe using generated code from ati stream kernel analyzer?

                • Reduction Kernels
                  @lex

                  Hello.

                  I've decided to ask here for not to create new topic.

                  I have a kernel:

                  reduce void krnl(int input<>, reduce int n<>
                  {
                     n += 1;
                  }

                  Let's say input is 1D stream of 160 elements (the number of stream processors on my 4850). What value should I get in first element of n? I was expecting 160, but I'm getting very strange results, 14 in this case. If I change kernel to n += 2 I get 23...

                  Please excuse my stupid question, I've only started learning Stream, and obviously I don't understand something about reduction kernels, but what's wrong in my example?

                  Thanks.

                    • Reduction Kernels
                      riza.guntur

                       

                      I documented that in reduction kernel we only can do these

                      reduce void reduceGPU(float input<>, reduce float output<>)

                      {

                          //comparison

                          //if(output < input)

                          //if(output > input)

                          //if(output <= input)

                          //if(output >= input)

                          //if(output == input)

                          //if(output < a value for example 1.0f)

                          //if(output > a value)

                          //if(output <= a value)

                          //if(output >= a value)

                          //if(output == a value)

                       

                          if(output < input)

                          output += input;

                          //output -= input;

                          //output *= input;

                          //output /= input;

                      }