4 Replies Latest reply on Aug 7, 2009 8:53 AM by hagen

    How to return self defined structs from kernel (with brook+)

      First try causes segmentation fault

      Hi all together!


      I have a little problem to return a self definded struct from a kernel.

      Code is relativ simple so here it comes:


      ------ test.br -------

      typedef struct hugeInt_def
          uint4 a;
          uint4 b;
          uint4 c;
          uint4 d;
      } hugeInt;

      kernel hugeInt addHugeInt (hugeInt input1, hugeInt input2) {
      return input1; // Just testing

      kernel void gpu_test(hugeInt in1<>, hugeInt in2<>, out hugeInt out1<> {
      out1 = addHugeInt(in1, in2);

      ------ test.br -------

      Compiling this with brook fails

      "wilke@wilke-desktop:~$ '/usr/local/atibrook/sdk/bin/brcc' -p CAL '-here my path-/test.br'
      Segmentation fault"

      How to fix this?



      Edit: Used System is Ubuntu 9.04 (x32) with Kernel 2.6.28 on a Intel Core 2 Duo E8400, Radeon HD4850 (Driver 9.5 / 8.612) with Stream SDK 1.4 installed.