3 Replies Latest reply on Sep 16, 2008 3:28 PM by udeepta@amd

    type struct in kernel

    bjang

      Is "structure" allowed inside kernel?

      I know it is allowed in non-kernel code in brook file but it doesn't seem to be supported inside kernel? There is a comment on this in Brook+ spec, page 10 but it is not clear.

        • type struct in kernel
          Ceq
          It should work, you have an example in your Brook+ directory: " samples / tests / struct / struct.br "
          However there could be a few issues in the current version, for example, if you try to use pointer type
          inside a typedef structure and you don't use it in any kernel you'll get a compiler assertion failure.
          (If you use it inside a kernel it will report "type not supported", but it would be very strange to require pointers inside kernels)
            • type struct in kernel
              JiaweiOu

               

              Originally posted by: Ceq It should work, you have an example in your Brook+ directory: " samples / tests / struct / struct.br " However there could be a few issues in the current version, for example, if you try to use pointer type inside a typedef structure and you don't use it in any kernel you'll get a compiler assertion failure. (If you use it inside a kernel it will report "type not supported", but it would be very strange to require pointers inside kernels)


              I found that if I declare a float array inside the struct. The brook+ compile will complain too.  I think their don't like any form of pointer in the structure.