I have defined a struct
typedef struct ElementRec {
float a,b,c,d,e,f,g,h;
} Element;
My first problem is whether CUDA support types like Element.
Second problem is that, if it does, can i write to output randomly, that is, the destination of output is decided in the runtime ?
like
output[idx mod 8 ].a = input[idx].a
output[idx mod 8 + 1].b = input[idx].b
output[idx mod 8 + 2].c = input[idx].c
output[idx mod 8 + 3].d = input[idx].e
…
output[idx mod 8 + 7].h = input[idx].h
Thanks