Create struct

Aug 23, 2014 at 2:31 PM
Dear all

I wrote a simple code with new struct:
public struct cuColor
    {
        public byte R;
        public byte G;

        public byte B;
        public byte A;
    };
    public struct cuPoint
        {
            public cuColor PointColor;
            public int X;
            public int Y;
            public double ClusterIndex;

        };
when I try to copy this new struct to the GPU, the program give me this message: identifier "cuPoint" is undefined

how can I make cudefy to understand the new struct ??

regards.
Coordinator
Aug 25, 2014 at 7:09 AM
Did you add the [Cudafy] attribute to the structs? You will also have to tell the Cudafy translator to handle these structs, too.
See the CudafyByExample project for example of how to do this - ray tracing sample would be useful.